Upgrade Chef Server 11.0.8-1 to 12.0.8

Hi,

I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an article
that I have to upgrade to 11.1 first and then go to 12.0.8

I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8 I
got this error:

root@chef-server-test:~# chef-server-ctl upgrade

Open source Chef 11 server detected.

Would you like to upgrade? [yN]

y

Upgrading the open source Chef 11 server.

……

ERROR: /environments failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

Hmmm I wonder if you are hitting this because Chef Client 12 turns SSL
verification mode on by default and the server now ships with Chef Client
12.

Since your logs indicate that you are just going over localhost (i.e.
everything is installed on the same server), you don’t need to worry about
ssl for requests to localhost, try the following:

  1. $ find / -name open_source_chef12_upgrade.rb
  2. $ (nano|emacs|vi)
  3. At line 344 (right above EOH) add: ssl_verify_mode :verify_none
  4. Re-run migration (but if you re-install the Chef Server 12 package, you
    will have to repeat step 3 since it will overwrite your file edit)

Let me know if that works for you or at least changes the error up!

Tyler

On Wed, Jun 10, 2015 at 10:37 AM, Mohammad Fattahian <
mfattahian@masterfile.com> wrote:

Hi,

I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an article
that I have to upgrade to 11.1 first and then go to 12.0.8

I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8 I
got this error:

root@chef-server-test:~# chef-server-ctl upgrade

Open source Chef 11 server detected.

Would you like to upgrade? [yN]

y

Upgrading the open source Chef 11 server.

……

ERROR: /environments failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

Thanks Tyler,

I’ll try that. I figured it out by removing (uninstall Chef Server 11) and
installing 12. Is there any way to upgrade from 11 to 12 directly?

Mohammad

From: Tyler Cloke [mailto:tyler@chef.io]
Sent: Friday, June 12, 2015 4:13 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Upgrade Chef Server 11.0.8-1 to 12.0.8

Hmmm I wonder if you are hitting this because Chef Client 12 turns SSL
verification mode on by default and the server now ships with Chef Client
12.

Since your logs indicate that you are just going over localhost (i.e.
everything is installed on the same server), you don’t need to worry about
ssl for requests to localhost, try the following:

  1. $ find / -name open_source_chef12_upgrade.rb

  2. $ (nano|emacs|vi)

  3. At line 344 (right above EOH) add: ssl_verify_mode :verify_none

  4. Re-run migration (but if you re-install the Chef Server 12 package, you
    will have to repeat step 3 since it will overwrite your file edit)

Let me know if that works for you or at least changes the error up!

Tyler

On Wed, Jun 10, 2015 at 10:37 AM, Mohammad Fattahian <
mfattahian@masterfile.com> wrote:

Hi,

I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an article
that I have to upgrade to 11.1 first and then go to 12.0.8

I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8 I
got this error:

root@chef-server-test:~# chef-server-ctl upgrade

Open source Chef 11 server detected.

Would you like to upgrade? [yN]

y

Upgrading the open source Chef 11 server.

……

ERROR: /environments failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

Hi Mohammad,

Chef Server 12 supports upgrades from Chef Server 11.1.0 and greater. For instructions and guidance on the upgrade process, please follow along at http://docs.chef.io/upgrade_server.html#from-chef-server-osc

Cheers!


Stephen Delano - Engineering Lead, Chef

On Wed, Jun 10, 2015 at 10:37 AM, Mohammad Fattahian
mfattahian@masterfile.com wrote:

Hi,
I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an article
that I have to upgrade to 11.1 first and then go to 12.0.8
I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8 I
got this error:
root@chef-server-test:~# chef-server-ctl upgrade
Open source Chef 11 server detected.
Would you like to upgrade? [yN]
y
Upgrading the open source Chef 11 server.
……
ERROR: /environments failed to children: HTTP error retrieving children:
401 "Unauthorized"
ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"
ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"
ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"
ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"
ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem
Response: Invalid signature for user or client 'admin’
ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

Tyler,

It didn’t work. Same error.

Mohammad

From: Tyler Cloke [mailto:tyler@chef.io]
Sent: Friday, June 12, 2015 4:13 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Upgrade Chef Server 11.0.8-1 to 12.0.8

Hmmm I wonder if you are hitting this because Chef Client 12 turns SSL
verification mode on by default and the server now ships with Chef Client
12.

Since your logs indicate that you are just going over localhost (i.e.
everything is installed on the same server), you don’t need to worry about
ssl for requests to localhost, try the following:

  1. $ find / -name open_source_chef12_upgrade.rb

  2. $ (nano|emacs|vi)

  3. At line 344 (right above EOH) add: ssl_verify_mode :verify_none

  4. Re-run migration (but if you re-install the Chef Server 12 package, you
    will have to repeat step 3 since it will overwrite your file edit)

Let me know if that works for you or at least changes the error up!

Tyler

On Wed, Jun 10, 2015 at 10:37 AM, Mohammad Fattahian <
mfattahian@masterfile.com> wrote:

Hi,

I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an article
that I have to upgrade to 11.1 first and then go to 12.0.8

I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8 I
got this error:

root@chef-server-test:~# chef-server-ctl upgrade

Open source Chef 11 server detected.

Would you like to upgrade? [yN]

y

Upgrading the open source Chef 11 server.

……

ERROR: /environments failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

Stephen,

I’ve upgrade 11.0.8 to 11.1 and the tried to upgrade to 12 using this
article but no success.

I got these errors:

ERROR: /environments failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

From: Stephen Delano [mailto:stephen@opscode.com]
Sent: Tuesday, June 16, 2015 2:52 PM
To: chef@lists.opscode.com
Cc: chef@lists.opscode.com
Subject: [chef] Re: Upgrade Chef Server 11.0.8-1 to 12.0.8

Hi Mohammad,

Chef Server 12 supports upgrades from Chef Server 11.1.0 and greater. For
instructions and guidance on the upgrade process, please follow along at
http://docs.chef.io/upgrade_server.html#from-chef-server-osc

Cheers!


Stephen Delano - Engineering Lead, Chef

On Wed, Jun 10, 2015 at 10:37 AM, Mohammad Fattahian <
mfattahian@masterfile.com> wrote:

Hi,

I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an article
that I have to upgrade to 11.1 first and then go to 12.0.8

I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8 I
got this error:

root@chef-server-test:~# chef-server-ctl upgrade

Open source Chef 11 server detected.

Would you like to upgrade? [yN]

y

Upgrading the open source Chef 11 server.

……

ERROR: /environments failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

Mohammad,

Is it possible the admin user that it tries to use by default isn’t
actually an admin user on your system? While the upgrade command tries
to use sensible defaults, it can’t guess everything in all situations
and if you changed the default admin user it might fail in this way.

If you have a user that you know is an admin user, you can tell the
upgrade command to use that user with the --user option. You’ll also
need to supply that user’s key with the --key command.

The upgrade command has an extensive help menu that you can access with
chef-server-ctl upgrade --help that explains all the possible options.
That said, I’d recommend just specifying the user and key and trying again.

Thanks,

Mark Mzyk

Mohammad Fattahian mailto:mfattahian@masterfile.com
June 17, 2015 at 4:59 PM

Stephen,

I’ve upgrade 11.0.8 to 11.1 and the tried to upgrade to 12 using this
article but no success.

I got these errors:

ERROR: /environments failed to children: HTTP error retrieving
children: 401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100

*From:*Stephen Delano [mailto:stephen@opscode.com
mailto:stephen@opscode.com]
Sent: Tuesday, June 16, 2015 2:52 PM
To: chef@lists.opscode.com mailto:chef@lists.opscode.com
Cc: chef@lists.opscode.com mailto:chef@lists.opscode.com
Subject: [chef] Re: Upgrade Chef Server 11.0.8-1 to 12.0.8

Hi Mohammad,

Chef Server 12 supports upgrades from Chef Server 11.1.0 and greater.
For instructions and guidance on the upgrade process, please follow
along at http://docs.chef.io/upgrade_server.html#from-chef-server-osc

Cheers!


Stephen Delano - Engineering Lead, Chef

On Wed, Jun 10, 2015 at 10:37 AM, Mohammad Fattahian
<mfattahian@masterfile.com mailto:mfattahian@masterfile.com> wrote:

Stephen Delano mailto:stephen@opscode.com
June 16, 2015 at 2:51 PM
Hi Mohammad,

Chef Server 12 supports upgrades from Chef Server 11.1.0 and greater.
For instructions and guidance on the upgrade process, please follow
along at http://docs.chef.io/upgrade_server.html#from-chef-server-osc

Cheers!


Stephen Delano - Engineering Lead, Chef

Mohammad Fattahian mailto:mfattahian@masterfile.com
June 10, 2015 at 1:37 PM

Hi,

I wanted to upgrade my Chef Server 11.0.8-1 to 12.0.8. I found an
article that I have to upgrade to 11.1 first and then go to 12.0.8

I upgraded to 11.1 completely but when I try to upgrade 11.1 to 12.0.8
I got this error:

root@chef-server-test:~# chef-server-ctl upgrade

Open source Chef 11 server detected.

Would you like to upgrade? [yN]

y

Upgrading the open source Chef 11 server.

……

ERROR: /environments failed to children: HTTP error retrieving
children: 401 “Unauthorized”

ERROR: /clients failed to children: HTTP error retrieving children:
401 “Unauthorized”

ERROR: /users failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /roles failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: /nodes failed to children: HTTP error retrieving children: 401
"Unauthorized"

ERROR: Failed to authenticate to https://localhost as admin with key
/etc/chef-server/admin.pem

Response: Invalid signature for user or client ‘admin’

ERROR: /data_bags failed to children: HTTP error getting children: 401
"Unauthorized"knife download failed with pid 16102 exit 100