Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

I was following http://deis.io/deis-on-digital-ocean/ #396

Closed
lvnilesh opened this issue Dec 15, 2013 · 37 comments
Closed

I was following http://deis.io/deis-on-digital-ocean/ #396

lvnilesh opened this issue Dec 15, 2013 · 37 comments
Labels

Comments

@lvnilesh
Copy link

but got stuck with this https://gist.github.com/lvnilesh/7969975

Appreciate help in understanding what went wronh

@bacongobbler
Copy link
Member

I have a faint feeling that this is somehow related to commit 78efe2c... I'll investigate this one.

@bacongobbler
Copy link
Member

Well firstly, https://github.com/opdemand/deis/blob/master/contrib/digitalocean/provision-digitalocean-controller.sh#L127 and https://github.com/opdemand/deis/blob/master/contrib/digitalocean/provision-digitalocean-controller.sh#L129 need to be updated to use $node_name instead of the hardcoded value.

Your issue seems to be just an issue SSH'ing to the machine. Can you try SSH'ing into 162.243.11.189? It should still be up unless you removed it from your digitalocean account :)

ssh root@162.243.11.189

If that fails, please try to run rm ~/.ssh/known_hosts before bootstrapping again. This is due to an issue on Digital Ocean's side with reusing their images, and there's nothing we can do to control that on our end :(

ref to the issue I'm talking about: http://missingm.co/2013/07/identical-droplets-in-the-digitalocean-regenerate-your-ubuntu-ssh-host-keys-now/

@bacongobbler
Copy link
Member

Also, just in case this gist is ever deleted:

(deis)➜  deis git:(master) knife digital_ocean droplet list 
ID      Name           Size   Region      IPv4           Image                         Status
863221  deis-snapshot  512MB  New York 2  162.243.90.16  1505447 (Ubuntu 12.04.3 x64)  active
(deis)➜  deis git:(master) knife node list 
chefserver.4a552dd75b474a4aac07aa6d2944a04f.chefserver.181993521.uswest.internal.cloudapp.net
test
(deis)➜  deis git:(master) knife client list 
chef-validator
chef-webui
chefserver.4a552dd75b474a4aac07aa6d2944a04f.chefserver.181993521.uswest.internal.cloudapp.net
nilesh
(deis)➜  deis git:(master) knife data bag list
deis-apps
deis-formations
deis-users
postgresql
(deis)➜  deis git:(master) ./contrib/digitalocean/provision-digitalocean-controller.sh 4
tr: Illegal byte sequence
WARNING: SSH key /Users/nilesh/.ssh/deis-controller exists, skipping upload
Data bag deis-users already exists
Data bag deis-formations already exists
Data bag deis-apps already exists
Provisioning deis-controller-A1H with knife digital_ocean...
+ knife digital_ocean droplet create --bootstrap-version 11.6.2 --server-name deis-controller-A1H --image 1547654 --location 4 --size 62 60 --ssh-keys 62061 --identity-file /Users/nilesh/.ssh/deis-controller --bootstrap --run-list 'recipe[deis::controller]'
Droplet creation for deis-controller-A1H started. Droplet-ID is 863356
Waiting for IPv4-Address................................................done
IPv4 address is: 162.243.11.189
Waiting for sshd:.done
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
WARNING: Specifying the encrypted data bag secret key using an 'encrypted_data_bag_secret'
entry in 'knife.rb' is deprecated. Please see CHEF-4011 for more details. You
can supress this warning and still distribute the secret key to all bootstrapped
machines by adding the following to your 'knife.rb' file:

  knife[:secret_file] = "/path/to/your/secret"

If you would like to selectively distribute a secret key during bootstrap
please use the '--secret' or '--secret-file' options of this command instead.

IMPORTANT: In a future version of Chef, this
behavior will be removed and any 'encrypted_data_bag_secret' entries in
'knife.rb' will be ignored completely.
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
Bootstrapping Chef on 162.243.11.189
ERROR: Net::SSH::Disconnect: connection closed by remote host
+ result=100
+ set +x
Knife botstrap failed.
Destroying Droplet 863356...
OK
Deleting Chef client...
ERROR: The object you are looking for could not be found
Response: Cannot load client deis-controller
Deleting Chef node...
ERROR: The object you are looking for could not be found
Response: Cannot load node deis-controller
(deis)➜  deis git:(master) 

@lvnilesh
Copy link
Author

I had removed known_hosts to begin with. Also, manual ssh root@ip was impossible as the script destroyed my droplet at the end... notice this line

Destroying Droplet 863356...

@lvnilesh
Copy link
Author

I will try one more time... from scratch... and report.

@bacongobbler
Copy link
Member

It should still be there. Check your account.

ERROR: The object you are looking for could not be found

@lvnilesh
Copy link
Author

Destroying Droplet 863356...
OK

so I run knife digital_ocean droplet list which shows only

➜  ~  knife digital_ocean droplet list
ID      Name           Size   Region      IPv4           Image                         Status
863221  deis-snapshot  512MB  New York 2  162.243.90.16  1505447 (Ubuntu 12.04.3 x64)  active

so here is another attempt.

(deis)➜  deis git:(master) rm -rf ~/.ssh/known_hosts
(deis)➜  deis git:(master) ./contrib/digitalocean/provision-digitalocean-controller.sh 4
tr: Illegal byte sequence
WARNING: SSH key /Users/nilesh/.ssh/deis-controller exists, skipping upload
Data bag deis-users already exists
Data bag deis-formations already exists
Data bag deis-apps already exists
Provisioning deis-controller- with knife digital_ocean...
+ knife digital_ocean droplet create --bootstrap-version 11.6.2 --server-name deis-controller- --image 1547654 --location 4 --size 62 60 --ssh-keys 62061 --identity-file /Users/nilesh/.ssh/deis-controller --bootstrap --run-list 'recipe[deis::controller]'
ERROR: Droplet could not be started #<Hashie::Rash error_message="Name Only valid hostname characters are allowed. (a-z, A-Z, 0-9, . and -)" message="Name Only valid hostname characters are allowed. (a-z, A-Z, 0-9, . and -)" status="ERROR">
+ result=1
+ set +x
Knife botstrap failed.
Destroying Droplet ...
/Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/mixlib-cli-1.3.0/lib/mixlib/cli.rb:226:in `parse_options': missing argument: -S (OptionParser::MissingArgument)
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/chef-11.8.0/lib/chef/knife.rb:300:in `parse_options'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/chef-11.8.0/lib/chef/knife.rb:280:in `initialize'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/chef-11.8.0/lib/chef/knife.rb:172:in `new'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/chef-11.8.0/lib/chef/knife.rb:172:in `run'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/chef-11.8.0/lib/chef/application/knife.rb:133:in `run'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/chef-11.8.0/bin/knife:25:in `<top (required)>'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/bin/knife:23:in `load'
    from /Users/nilesh/.rbenv/versions/2.0.0-p353/bin/knife:23:in `<main>'
Deleting Chef client...
ERROR: The object you are looking for could not be found
Response: Cannot load client deis-controller
Deleting Chef node...
ERROR: The object you are looking for could not be found
Response: Cannot load node deis-controller
(deis)➜  deis git:(master) 

@lvnilesh
Copy link
Author

I do not understand this

tr: Illegal byte sequence

and this

"Name Only valid hostname characters are allowed. (a-z, A-Z, 0-9, . and -)"

@lvnilesh
Copy link
Author

Strange ending with a - notice this --server-name deis-controller-

@lvnilesh
Copy link
Author

Another run.

(deis)➜  deis git:(master) rm -rf ~/.ssh/known_hosts       
(deis)➜  deis git:(master) knife digital_ocean droplet list
ID      Name           Size   Region      IPv4           Image                         Status
863221  deis-snapshot  512MB  New York 2  162.243.90.16  1505447 (Ubuntu 12.04.3 x64)  active
(deis)➜  deis git:(master) ./contrib/digitalocean/provision-digitalocean-controller.sh 4
tr: Illegal byte sequence
WARNING: SSH key /Users/nilesh/.ssh/deis-controller exists, skipping upload
Data bag deis-users already exists
Data bag deis-formations already exists
Data bag deis-apps already exists
Provisioning deis-controller-q with knife digital_ocean...
+ knife digital_ocean droplet create --bootstrap-version 11.6.2 --server-name deis-controller-q --image 1547654 --location 4 --size 62 60 --ssh-keys 62061 --identity-file /Users/nilesh/.ssh/deis-controller --bootstrap --run-list 'recipe[deis::controller]'
Droplet creation for deis-controller-q started. Droplet-ID is 864736
Waiting for IPv4-Addressdone
IPv4 address is: 162.243.11.189
Waiting for sshd:.............

stuck waiting for sshd

In another terminal window

➜  ~  knife digital_ocean droplet list
ID      Name               Size   Region      IPv4            Image                         Status
863221  deis-snapshot      512MB  New York 2  162.243.90.16   1505447 (Ubuntu 12.04.3 x64)  active
864736  deis-controller-q  2GB    New York 2  162.243.11.189  1547654 (deis-base)           active
➜  ~  ssh root@162.243.11.189
ssh: connect to host 162.243.11.189 port 22: Operation timed out

@lvnilesh
Copy link
Author

I broke the process and prevented droplet from self-destruction. Now I will get a root password and try logging in through digital ocean website based console.

@lvnilesh
Copy link
Author

generating root password rebooted the droplet and now I can ssh just fine no need for root password. now I think I need to bootstrap that node but don't know how.

@lvnilesh
Copy link
Author

Manually attempt to bootstrap after ssh root@162.243.11.189

knife bootstrap 162.243.11.189 --bootstrap-version 11.6.2 --identity-file /Users/nilesh/.ssh/deis-controller --run-list 'recipe[deis::controller]'

@lvnilesh
Copy link
Author

looks like my chef server is missing the cookbooks which I need to provide.

(deis)➜  deis git:(master) knife bootstrap 162.243.11.189 --bootstrap-version 11.6.2 --identity-file /Users/nilesh/.ssh/deis-controller --run-list 'recipe[deis::controller]'
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
WARNING: Specifying the encrypted data bag secret key using an 'encrypted_data_bag_secret'
entry in 'knife.rb' is deprecated. Please see CHEF-4011 for more details. You
can supress this warning and still distribute the secret key to all bootstrapped
machines by adding the following to your 'knife.rb' file:

  knife[:secret_file] = "/path/to/your/secret"

If you would like to selectively distribute a secret key during bootstrap
please use the '--secret' or '--secret-file' options of this command instead.

IMPORTANT: In a future version of Chef, this
behavior will be removed and any 'encrypted_data_bag_secret' entries in
'knife.rb' will be ignored completely.
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
Bootstrapping Chef on 162.243.11.189
162.243.11.189 --2013-12-15 12:37:28--  https://www.opscode.com/chef/install.sh
162.243.11.189 Resolving www.opscode.com (www.opscode.com)... 184.106.28.91
162.243.11.189 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... connected.
162.243.11.189 HTTP request sent, awaiting response... 200 OK
162.243.11.189 Length: 14101 (14K) [application/x-sh]
162.243.11.189 Saving to: `STDOUT'
162.243.11.189 
100%[======================================>] 14,101      --.-K/s   in 0.002s  
162.243.11.189 
162.243.11.189 2013-12-15 12:37:28 (5.39 MB/s) - written to stdout [14101/14101]
162.243.11.189 
162.243.11.189 Downloading Chef 11.6.2 for ubuntu...
162.243.11.189 downloading https://www.opscode.com/chef/metadata?v=11.6.2&prerelease=false&p=ubuntu&pv=12.04&m=x86_64
162.243.11.189   to file /tmp/install.sh.1425/metadata.txt
162.243.11.189 trying wget...
162.243.11.189 url  https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.6.2-1.ubuntu.12.04_amd64.deb
162.243.11.189 md5  a809b8cfeaea71c20c0de0e492c7f86f
162.243.11.189 sha256   74d5283b597299efbff3c66897c79876cc11aade6dc8810ddf38101526203651
162.243.11.189 downloaded metadata file looks valid...
162.243.11.189 downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.6.2-1.ubuntu.12.04_amd64.deb
162.243.11.189   to file /tmp/install.sh.1425/chef_11.6.2_amd64.deb
162.243.11.189 trying wget...
162.243.11.189 Checksum compare with sha256sum succeeded.
162.243.11.189 Installing Chef 11.6.2
162.243.11.189 installing with dpkg...
162.243.11.189 Selecting previously unselected package chef.
(Reading database ... 58597 files and directories currently installed.)
162.243.11.189 Unpacking chef (from .../chef_11.6.2_amd64.deb) ...
162.243.11.189 Setting up chef (11.6.2-1.ubuntu.12.04) ...
162.243.11.189 Thank you for installing Chef!
162.243.11.189 Starting Chef Client, version 11.6.2
162.243.11.189 Creating a new client identity for localhost using the validator key.
162.243.11.189 resolving cookbooks for run list: ["deis::controller"]
162.243.11.189 
162.243.11.189 ================================================================================
162.243.11.189 Error Resolving Cookbooks for Run List:
162.243.11.189 ================================================================================
162.243.11.189 
162.243.11.189 
162.243.11.189 Missing Cookbooks:
162.243.11.189 ------------------
162.243.11.189 The following cookbooks are required by the client but don't exist on the server:
162.243.11.189 * deis
162.243.11.189 
162.243.11.189 
162.243.11.189 
162.243.11.189 
162.243.11.189 Expanded Run List:
162.243.11.189 ------------------
162.243.11.189 * deis::controller
162.243.11.189 
162.243.11.189 
162.243.11.189 [2013-12-15T12:37:39-05:00] ERROR: Running exception handlers
162.243.11.189 [2013-12-15T12:37:39-05:00] ERROR: Exception handlers complete
162.243.11.189 [2013-12-15T12:37:39-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
162.243.11.189 Chef Client failed. 0 resources updated
162.243.11.189 [2013-12-15T12:37:40-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
(deis)➜  deis git:(master) 

@bacongobbler
Copy link
Member

I'm blaming this on the tr command. Can you please try setting node_name in ./contrib/digitalocean/provision-* to 'deis-controller', removing all the commands listed there?

Also, can you please let us know what is your host operating system so I can try debugging the 'tr' command? It works on Mac, but maybe not on other host operating systems.

On Dec 15, 2013, at 9:40 AM, Nilesh notifications@github.com wrote:

looks like my chef server is missing the cookbooks which I need to provide.

(deis)➜ deis git:(master) knife bootstrap 162.243.11.189 --bootstrap-version 11.6.2 --identity-file /Users/nilesh/.ssh/deis-controller --run-list 'recipe[deis::controller]'
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
WARNING: Specifying the encrypted data bag secret key using an 'encrypted_data_bag_secret'
entry in 'knife.rb' is deprecated. Please see CHEF-4011 for more details. You
can supress this warning and still distribute the secret key to all bootstrapped
machines by adding the following to your 'knife.rb' file:

knife[:secret_file] = "/path/to/your/secret"

If you would like to selectively distribute a secret key during bootstrap
please use the '--secret' or '--secret-file' options of this command instead.

IMPORTANT: In a future version of Chef, this
behavior will be removed and any 'encrypted_data_bag_secret' entries in
'knife.rb' will be ignored completely.
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Bootstrapping Chef on 162.243.11.189
162.243.11.189 --2013-12-15 12:37:28-- https://www.opscode.com/chef/install.sh
162.243.11.189 Resolving www.opscode.com (www.opscode.com)... 184.106.28.91
162.243.11.189 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... connected.
162.243.11.189 HTTP request sent, awaiting response... 200 OK
162.243.11.189 Length: 14101 (14K) [application/x-sh]
162.243.11.189 Saving to: `STDOUT'
162.243.11.189
100%[======================================>] 14,101 --.-K/s in 0.002s
162.243.11.189
162.243.11.189 2013-12-15 12:37:28 (5.39 MB/s) - written to stdout [14101/14101]
162.243.11.189
162.243.11.189 Downloading Chef 11.6.2 for ubuntu...
162.243.11.189 downloading https://www.opscode.com/chef/metadata?v=11.6.2&prerelease=false&p=ubuntu&pv=12.04&m=x86_64
162.243.11.189 to file /tmp/install.sh.1425/metadata.txt
162.243.11.189 trying wget...
162.243.11.189 url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.6.2-1.ubuntu.12.04_amd64.deb
162.243.11.189 md5 a809b8cfeaea71c20c0de0e492c7f86f
162.243.11.189 sha256 74d5283b597299efbff3c66897c79876cc11aade6dc8810ddf38101526203651
162.243.11.189 downloaded metadata file looks valid...
162.243.11.189 downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.6.2-1.ubuntu.12.04_amd64.deb
162.243.11.189 to file /tmp/install.sh.1425/chef_11.6.2_amd64.deb
162.243.11.189 trying wget...
162.243.11.189 Checksum compare with sha256sum succeeded.
162.243.11.189 Installing Chef 11.6.2
162.243.11.189 installing with dpkg...
162.243.11.189 Selecting previously unselected package chef.
(Reading database ... 58597 files and directories currently installed.)
162.243.11.189 Unpacking chef (from .../chef_11.6.2_amd64.deb) ...
162.243.11.189 Setting up chef (11.6.2-1.ubuntu.12.04) ...
162.243.11.189 Thank you for installing Chef!
162.243.11.189 Starting Chef Client, version 11.6.2
162.243.11.189 Creating a new client identity for localhost using the validator key.
162.243.11.189 resolving cookbooks for run list: ["deis::controller"]
162.243.11.189
162.243.11.189 ================================================================================
162.243.11.189 Error Resolving Cookbooks for Run List:
162.243.11.189 ================================================================================
162.243.11.189
162.243.11.189
162.243.11.189 Missing Cookbooks:
162.243.11.189 ------------------
162.243.11.189 The following cookbooks are required by the client but don't exist on the server:
162.243.11.189 * deis
162.243.11.189
162.243.11.189
162.243.11.189
162.243.11.189
162.243.11.189 Expanded Run List:
162.243.11.189 ------------------
162.243.11.189 * deis::controller
162.243.11.189
162.243.11.189
162.243.11.189 [2013-12-15T12:37:39-05:00] ERROR: Running exception handlers
162.243.11.189 [2013-12-15T12:37:39-05:00] ERROR: Exception handlers complete
162.243.11.189 [2013-12-15T12:37:39-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
162.243.11.189 Chef Client failed. 0 resources updated
162.243.11.189 [2013-12-15T12:37:40-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
(deis)➜ deis git:(master)


Reply to this email directly or view it on GitHub.

@lvnilesh
Copy link
Author

I am on mac mavericks

I went off and fetched the cookbooks needed from the community.

➜  coooooo  knife cookbook upload --all -o ./                         
Uploading apt          [2.3.1]
Uploading deis-cookbook [0.3.1]
Uploading rsyslog      [1.9.1]
Uploading sudo         [2.2.3]
Uploaded all cookbooks.
➜  coooooo  

now manually bootstrapping again.

@lvnilesh
Copy link
Author

still failed - needs deis but I provided deis-cookbook.

I will now retry setting node_name as you suggest.

@lvnilesh
Copy link
Author

Do you mean replace this line 44

https://github.com/opdemand/deis/blob/master/contrib/digitalocean/provision-digitalocean-controller.sh#L44

by this line

node_name="deis-controller"

and rerun from the beginning?

@bacongobbler
Copy link
Member

Precisely. This probably has to do with a fix we pulled earlier this week so that users could have multiple controllers up on digital ocean. We'll probably have to find a cross-compatible command to do this for us. See #392 for more details.

@tombh, do you know of a solution to make this cross-compatible with Mac/Linux host systems?

@lvnilesh
Copy link
Author

failed again - missing cookbook

(deis)➜  deis git:(master) ✗ rm ~/.ssh/known
rm: /Users/nilesh/.ssh/known: No such file or directory
(deis)➜  deis git:(master) ✗ rm ~/.ssh/known_hosts 
(deis)➜  deis git:(master) ✗ ./contrib/digitalocean/provision-digitalocean-controller.sh 4
WARNING: SSH key /Users/nilesh/.ssh/deis-controller exists, skipping upload
Data bag deis-users already exists
Data bag deis-formations already exists
Data bag deis-apps already exists
Provisioning deis-controller with knife digital_ocean...
+ knife digital_ocean droplet create --bootstrap-version 11.6.2 --server-name deis-controller --image 1547654 --location 4 --size 62 60 --ssh-keys 62061 --identity-file /Users/nilesh/.ssh/deis-controller --bootstrap --run-list 'recipe[deis::controller]'
Droplet creation for deis-controller started. Droplet-ID is 865250
Waiting for IPv4-Addressdone
IPv4 address is: 162.243.11.189
Waiting for sshd:done
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
WARNING: Specifying the encrypted data bag secret key using an 'encrypted_data_bag_secret'
entry in 'knife.rb' is deprecated. Please see CHEF-4011 for more details. You
can supress this warning and still distribute the secret key to all bootstrapped
machines by adding the following to your 'knife.rb' file:

  knife[:secret_file] = "/path/to/your/secret"

If you would like to selectively distribute a secret key during bootstrap
please use the '--secret' or '--secret-file' options of this command instead.

IMPORTANT: In a future version of Chef, this
behavior will be removed and any 'encrypted_data_bag_secret' entries in
'knife.rb' will be ignored completely.
WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
Bootstrapping Chef on 162.243.11.189
162.243.11.189 --2013-12-15 13:13:07--  https://www.opscode.com/chef/install.sh
162.243.11.189 Resolving www.opscode.com (www.opscode.com)... 184.106.28.90
162.243.11.189 Connecting to www.opscode.com (www.opscode.com)|184.106.28.90|:443... connected.
162.243.11.189 HTTP request sent, awaiting response... 200 OK
162.243.11.189 Length: 14101 (14K) [application/x-sh]
162.243.11.189 Saving to: `STDOUT'
162.243.11.189 
100%[======================================>] 14,101      --.-K/s   in 0s      
162.243.11.189 
162.243.11.189 2013-12-15 13:13:07 (549 MB/s) - written to stdout [14101/14101]
162.243.11.189 
162.243.11.189 Downloading Chef 11.6.2 for ubuntu...
162.243.11.189 downloading https://www.opscode.com/chef/metadata?v=11.6.2&prerelease=false&p=ubuntu&pv=12.04&m=x86_64
162.243.11.189   to file /tmp/install.sh.1371/metadata.txt
162.243.11.189 trying wget...
162.243.11.189 url  https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.6.2-1.ubuntu.12.04_amd64.deb
162.243.11.189 md5  a809b8cfeaea71c20c0de0e492c7f86f
162.243.11.189 sha256   74d5283b597299efbff3c66897c79876cc11aade6dc8810ddf38101526203651
162.243.11.189 downloaded metadata file looks valid...
162.243.11.189 downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.6.2-1.ubuntu.12.04_amd64.deb
162.243.11.189   to file /tmp/install.sh.1371/chef_11.6.2_amd64.deb
162.243.11.189 trying wget...
162.243.11.189 Checksum compare with sha256sum succeeded.
162.243.11.189 Installing Chef 11.6.2
162.243.11.189 installing with dpkg...
162.243.11.189 Selecting previously unselected package chef.
(Reading database ... 58597 files and directories currently installed.)
162.243.11.189 Unpacking chef (from .../chef_11.6.2_amd64.deb) ...
162.243.11.189 Setting up chef (11.6.2-1.ubuntu.12.04) ...
162.243.11.189 Thank you for installing Chef!
162.243.11.189 Starting Chef Client, version 11.6.2
162.243.11.189 Creating a new client identity for deis-controller using the validator key.
162.243.11.189 resolving cookbooks for run list: ["deis::controller"]
162.243.11.189 
162.243.11.189 ================================================================================
162.243.11.189 Error Resolving Cookbooks for Run List:
162.243.11.189 ================================================================================
162.243.11.189 
162.243.11.189 
162.243.11.189 Missing Cookbooks:
162.243.11.189 ------------------
162.243.11.189 The following cookbooks are required by the client but don't exist on the server:
162.243.11.189 * deis
162.243.11.189 
162.243.11.189 
162.243.11.189 
162.243.11.189 
162.243.11.189 Expanded Run List:
162.243.11.189 ------------------
162.243.11.189 * deis::controller
162.243.11.189 
162.243.11.189 
162.243.11.189 [2013-12-15T13:13:16-05:00] ERROR: Running exception handlers
162.243.11.189 [2013-12-15T13:13:16-05:00] ERROR: Exception handlers complete
162.243.11.189 [2013-12-15T13:13:16-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
162.243.11.189 Chef Client failed. 0 resources updated
162.243.11.189 [2013-12-15T13:13:16-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
+ result=1
+ set +x
Knife botstrap failed.
Destroying Droplet 865250...
OK
Deleting Chef client...
Deleted client[deis-controller]
Deleting Chef node...
Deleted node[deis-controller]
(deis)➜  deis git:(master) ✗ 

@lvnilesh
Copy link
Author

Which cookbook do I need to select and make it available via my chef server?

@bacongobbler
Copy link
Member

Which cookbook do I need to select and make it available via my chef server?

Before you bootstrapped, did you run

$ bundle install
$ berks install
$ berks upload

? You'll need the deis cookbook to run this, which is available at https://github.com/opdemand/deis-cookbook.git, or just by running berks install && berks upload in github.com/opdemand/deis.

@lvnilesh
Copy link
Author

I did not. I must have missed this while following your blog. Will do now.

@bacongobbler
Copy link
Member

Sorry, I just realized that I missed that command in my blog. The blog post has been updated now :)

@lvnilesh
Copy link
Author

progress. but no success. yet.

https://gist.github.com/lvnilesh/7976620

@lvnilesh
Copy link
Author

Error executing action `start` on resource 'service[deis-server]'

Error executing action `restart` on resource 'service[deis-worker]'

@lvnilesh
Copy link
Author

one more attempt from scratch leads to same errors.

https://gist.github.com/lvnilesh/7976814

@lvnilesh
Copy link
Author

I am going to follow through the very beginning of your blog...like a newbie. all over again.

@bacongobbler
Copy link
Member

Sounds like opdemand/deis-cookbook#14 to me.

tombh added a commit to tombh/deis that referenced this issue Dec 15, 2013
@tombh
Copy link
Contributor

tombh commented Dec 15, 2013

Sorry about that, I did try and make the random string generator cross-platform, just assumed tr was standard *NIX. Also fixed the $node_name bug for chef objects, I should have noticed that. Digital Ocean isn't creating droplets with SSH access at the moment, so I haven't been able to test it. I'll PR it once DO is back to normal.

@lvnilesh
Copy link
Author

same problems


162.243.90.16   * service[deis-server] action stop (up to date)
162.243.90.16   * service[deis-server] action start
162.243.90.16 ================================================================================
162.243.90.16 Error executing action `start` on resource 'service[deis-server]'
162.243.90.16 ================================================================================
162.243.90.16 
162.243.90.16 
162.243.90.16 Chef::Exceptions::Exec
162.243.90.16 ----------------------
162.243.90.16 /sbin/start deis-server returned 1, expected 0
162.243.90.16 
162.243.90.16 
162.243.90.16 Resource Declaration:
162.243.90.16 ---------------------
162.243.90.16 # In /var/chef/cache/cookbooks/deis/recipes/server.rb
162.243.90.16 
162.243.90.16 120: service 'deis-server' do
162.243.90.16 121:   provider Chef::Provider::Service::Upstart
162.243.90.16 122:   action [:enable]
162.243.90.16 123:   subscribes :restart, "git[#{controller_dir}]", :delayed
162.243.90.16 124: end
162.243.90.16 125: 
162.243.90.16 
162.243.90.16 
162.243.90.16 
162.243.90.16 Compiled Resource:
162.243.90.16 ------------------
162.243.90.16 # Declared in /var/chef/cache/cookbooks/deis/recipes/server.rb:120:in `from_file'
162.243.90.16 
162.243.90.16 service("deis-server") do
162.243.90.16   provider Chef::Provider::Service::Upstart
162.243.90.16   action [:enable]
162.243.90.16   supports {:restart=>false, :reload=>false, :status=>false}
162.243.90.16   retries 0
162.243.90.16   retry_delay 2
162.243.90.16   service_name "deis-server"
162.243.90.16   enabled true
162.243.90.16   pattern "deis-server"
162.243.90.16   startup_type :automatic
162.243.90.16   cookbook_name "deis"
162.243.90.16   recipe_name "server"
162.243.90.16 end
162.243.90.16 
162.243.90.16 
162.243.90.16 
162.243.90.16 Recipe: deis::postgresql
162.243.90.16   * service[postgresql] action reload
162.243.90.16     - reload service service[postgresql]
162.243.90.16 
162.243.90.16 Recipe: deis::server
162.243.90.16   * service[deis-server] action restart
162.243.90.16     - restart service service[deis-server]
162.243.90.16 
162.243.90.16   * service[deis-worker] action restart
162.243.90.16 ================================================================================
162.243.90.16 Error executing action `restart` on resource 'service[deis-worker]'
162.243.90.16 ================================================================================
162.243.90.16 
162.243.90.16 
162.243.90.16 Chef::Exceptions::Exec
162.243.90.16 ----------------------
162.243.90.16 /sbin/start deis-worker returned 1, expected 0
162.243.90.16 
162.243.90.16 
162.243.90.16 Resource Declaration:
162.243.90.16 ---------------------
162.243.90.16 # In /var/chef/cache/cookbooks/deis/recipes/server.rb
162.243.90.16 
162.243.90.16 138: service 'deis-worker' do
162.243.90.16 139:   provider Chef::Provider::Service::Upstart
162.243.90.16 140:   action [:enable]
162.243.90.16 141:   subscribes :restart, "git[#{controller_dir}]", :delayed
162.243.90.16 142: end
162.243.90.16 143: 
162.243.90.16 
162.243.90.16 
162.243.90.16 
162.243.90.16 Compiled Resource:
162.243.90.16 ------------------
162.243.90.16 # Declared in /var/chef/cache/cookbooks/deis/recipes/server.rb:138:in `from_file'
162.243.90.16 
162.243.90.16 service("deis-worker") do
162.243.90.16   provider Chef::Provider::Service::Upstart
162.243.90.16   action [:enable]
162.243.90.16   supports {:restart=>false, :reload=>false, :status=>false}
162.243.90.16   retries 0
162.243.90.16   retry_delay 2
162.243.90.16   service_name "deis-worker"
162.243.90.16   pattern "deis-worker"
162.243.90.16   startup_type :automatic
162.243.90.16   cookbook_name "deis"
162.243.90.16   recipe_name "server"
162.243.90.16 end
162.243.90.16 
162.243.90.16 
162.243.90.16 
162.243.90.16 [2013-12-15T15:02:39-05:00] ERROR: Running exception handlers
162.243.90.16 [2013-12-15T15:02:39-05:00] ERROR: Exception handlers complete
162.243.90.16 [2013-12-15T15:02:39-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
162.243.90.16 Chef Client failed. 30 resources updated
162.243.90.16 [2013-12-15T15:02:39-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
+ result=1
+ set +x
Knife botstrap failed.
Destroying Droplet 865880...
OK
Deleting Chef client...
Deleted client[deis-controller]
Deleting Chef node...
Deleted node[deis-controller]
(deis)➜  deis git:(master) ✗ 

@lvnilesh
Copy link
Author

I will try some thing other than digital ocean next.

@mboersma
Copy link
Member

@lvnilesh, I'm wondering if you are working with current (v0.3.0 or master) Deis code locally to provision your controller, but have a DigitalOcean "deis-base" snapshot that was created earlier? That could cause problems since we updated celery and thus the way we invoke it in the deis-worker upstart script. I wonder if doing "pip install -r requirements.txt" on the server as the "deis" user might fix things.

@lvnilesh
Copy link
Author

I am using master (not v0.3.0) and I snapshotted deis-base using master.

@lvnilesh
Copy link
Author

I destroyed all my digital_ocean droplets and snapshots. Now trying out deis on AWS. I want to get my own paas to work first on AWS and then I will come back to digital_ocean.

@mboersma
Copy link
Member

We haven't been able to reproduce this issue and haven't gotten new information, so I'm closing it.

@Milodv
Copy link
Contributor

Milodv commented Jan 21, 2014

I had the same issue and can reproduce it. I think the underlying issue is that on the first start deis-server 'fails' with the following error: http://paste.ubuntu.com/6791380/. Strangely enough, if I run the cookbook again it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants