Delphix Products

Expand all | Collapse all

Error refreshing state error while setting up the free trial environment

  • 1.  Error refreshing state error while setting up the free trial environment

    Posted 03-30-2017 11:50:00 AM

    May I know what is the issue prompting the below error in Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type - ami-0b33d91d


    [root@ip-172-31-66-155 Delphix_Demo]# ./terraform apply
    data.aws_ami.ls_ami: Refreshing state...
    data.aws_ami.lt_ami: Refreshing state...
    data.aws_ami.de_ami: Refreshing state...
    Error refreshing state: 3 error(s) occurred:

    * data.aws_ami.lt_ami: 1 error(s) occurred:

    * data.aws_ami.lt_ami: data.aws_ami.lt_ami: Your query returned no results. Please change your search criteria and try again.
    * data.aws_ami.de_ami: 1 error(s) occurred:

    * data.aws_ami.de_ami: data.aws_ami.de_ami: Your query returned no results. Please change your search criteria and try again.
    * data.aws_ami.ls_ami: 1 error(s) occurred:

    * data.aws_ami.ls_ami: data.aws_ami.ls_ami: Your query returned no results. Please change your search criteria and try again.



  • 2.  RE: Error refreshing state error while setting up the free trial environment
    Best Answer

    Posted 03-30-2017 01:56:00 PM
    Yes, it appears the AMI was not shared with your AWS account. You either skipped this step below, or entered the incorrect account number or region

    https://docs.delphix.com/docs/delphix-free-trial/setup-and-installation-guide/step-3-accessing-the-f...


  • 3.  RE: Error refreshing state error while setting up the free trial environment

    Posted 03-31-2017 05:35:00 AM

    Thanks Adam, I have shared the AMI with AWS account. Now I am able to run "./terraform apply" but I am getting the following error.

    May I know what causes the below issue:

    aws_instance.lt (remote-exec): Connecting to remote host via SSH...
    aws_instance.lt (remote-exec):   Host: 34.207.166.254
    aws_instance.lt (remote-exec):   User: centos
    aws_instance.lt (remote-exec):   Password: false
    aws_instance.lt (remote-exec):   Private key: true
    aws_instance.lt (remote-exec):   SSH Agent: false
    aws_instance.lt: Still creating... (10m10s elapsed)
    aws_instance.lt: Still creating... (10m20s elapsed)
    Error applying plan:

    2 error(s) occurred:

    * aws_instance.ls: 1 error(s) occurred:

    * timeout
    * aws_instance.lt: 1 error(s) occurred:

    * timeout

    Terraform does not automatically rollback in the face of errors.
    Instead, your Terraform state file has been partially updated with
    any resources that successfully completed. Please address the error
    above and apply again to incrementally change your infrastructure.



  • 4.  RE: Error refreshing state error while setting up the free trial environment

    Posted 03-31-2017 07:18:00 AM
    This error means your system that is running the terraform command cannot reach the servers in AWS via ssh. So, one of two things are likely the source.First, check that you ip is correct in the variables.tf:curl ipv4.icanhazip.comThe value returned from that command should be the value in the variables.tf file.If you are on a corporate network, then ensure your network policy allows outbound ssh and httpto aws-based servers.


  • 5.  RE: Error refreshing state error while setting up the free trial environment

    Posted 03-31-2017 01:41:00 PM

    Adams, as you said I am on a corporate network and I changed the network policy allows outbound to accept all traffic and protocol to "ALL", Port range 0-65535, Destination to "anywhere" and one more rule with destination as "My IP".

    Still I am getting the same error



  • 6.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-01-2017 09:43:00 AM
    Suresh,
    by "network policy" I did not mean your terraform main.tf, I meant your corporate network policy. Your corporate network policy may prohibit you from outbound SSH, which would not allow this to complete. Either try this from home, or ask your corporate network to allow you to do outbound SSH.

    You really shouldn't open your security group to "anywhere", that is just asking for trouble. 


  • 7.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 10:27:00 AM

    Adams, I understand the network policy which you are trying to say,

    Now I am able to run command "./Terraform apply". Instance was creating almost for one and half hours. and I got the following output:

    aws_instance.lt: Still creating... (1h37m13s elapsed)
    aws_instance.lt: Still creating... (1h37m23s elapsed)
    ^CInterrupt received. Gracefully shutting down...
    Interrupt received. Gracefully shutting down...

    Apply complete! Resources: 7 added, 0 changed, 0 destroyed.

    The state of your infrastructure has been saved to the path
    below. This state is required to modify and destroy your
    infrastructure, so keep it safe. To inspect the complete state
    use the 'terraform show' command.

    State path:

    Outputs:

    DE = [
        Delphix Engine - Public IP: 54.158.194.49 Private IP: 10.0.1.10
        Access via http://54.158.194.49
        Username: delphix_admin Password: landshark
    ]
    LS = [
        Linux Source - Public IP: 34.207.121.148 Private IP: 10.0.1.20
        Access via SSH @34.207.121.148
        Username: delphix Password: delphix
        Prod Employee App: http://34.207.121.148:1080
    ]
    LT = [
        Linux Target - Public IP: 34.207.154.242 Private IP: 10.0.1.30
        Access via SSH @34.207.154.242
        Username: delphix Password: delphix
        Dev Employee App: http://34.207.154.242:2080
        QA Employee App: http://34.207.154.242:3080
    ]
    [ec2-user@ip-172-31-3-30 Delphix_Demo]$


    I see that the apply is complete. To launch the Delphix engine we have to access via the ip of the first output (http://54.158.194.49). How do I launch inside a Linux instance and how do I access the URL of Delphix engine inside a Linux instance in which I ran "./terraform apply"



  • 8.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 12:10:00 PM
    You ctrl+c to cancel it, so it didn't complete. It should only take 15-25 minutes to finish. run terraform destroy to destroy the environment, then terraform apply again to create it. If it doesn't complete in 30 minutes, cancel it and we figure it out from there.


  • 9.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 12:12:00 PM
    To answer your other question, you do not have to "launch inside the linux instance" to access the DE. All of the steps to access, etc, are written in the documentation pages. I would suggest working with those to get the best experience.


  • 10.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 12:22:00 PM

    Adam,

    I ran "./terraform destroy" and again ran "./terraform apply" :

    Instance is creating for long time and it is taking more than 30 min as you can see in the below screen shot, may I know why it is taking long time. The max I saw was one hour 39 min and still its creating.


    aws_instance.lt: Still creating... (48m36s elapsed)
    aws_instance.lt: Still creating... (48m46s elapsed)
    aws_instance.lt: Still creating... (48m56s elapsed)
    aws_instance.lt: Still creating... (49m6s elapsed)



  • 11.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 12:44:00 PM
    are you operating with the original main.tf, or on your modified version? I would guess that your environment cannot reach outbound to complete the setup.


  • 12.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 12:50:00 PM

    Im using main.tf original file only...only thing I changed in main.tf file is "instance_type=t2.micro" for LS,LT and DE

    Nothing else is modified in main.tf file after downloading from Free trial page.



  • 13.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 01:12:00 PM
    That will definitely be a problem. I advise you to follow the directions to deploy. At least do it once successfully as prescribed, before making customizations.


  • 14.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 01:23:00 PM

    the reason why I changed the instance type as "t2.micro" in AWS is , only micro instance is free in AWS ...in main.tf file instance type is "m4.large" which will cost more in AWS.

    So there is no option to set it in AWS for free right?



  • 15.  RE: Error refreshing state error while setting up the free trial environment

    Posted 04-06-2017 01:31:00 PM
    https://docs.delphix.com/docs/delphix-free-trial/architectural-overview The cost of running the trial, as prescribed, is 36 cents USD / hour