[chef] Re: Problem with "chef-sync-ctl sync-log": Unauthorized


Chronological Thread 
  • From: Steven Danna < >
  • To: " " < >
  • Subject: [chef] Re: Problem with "chef-sync-ctl sync-log": Unauthorized
  • Date: Tue, 28 Oct 2014 16:00:00 +0000

Hi Tiago,

The show-config issue looks like a bug we should address.  I'll make
sure that gets filed.  As for the 401, your instinct to look at the
key is correct.  Could you try the following to see if the key works
outside of the sync service:

From the replica:

   /opt/chef-server/embedded/bin/knife node list -s
https://chef12-server1.datac.test.com/organizations/test -u
ec_sync_user -k /etc/chef-sync/ec_sync_user.pem
   /opt/chef-server/embedded/bin/knife node list -s
https://localhost/organizations/test -u ec_sync_user -k
/etc/chef-sync/ec_sync_user.pem

Both of those command should succeed without error.  Could you also
post the output of

    chef-sync-ctl manager-log

Cheers,

Steven



On Tue, Oct 28, 2014 at 3:02 PM, Tiago Cruz 
< >
 wrote:
> Hello Guys,
>
> I'm testing the replication feature
> https://docs.getchef.com/server/server_replication.html
>
> Package: chef-server-core-12.0.0_rc.5-1.el5.x86_64.rpm
> OS: CentOS release 6.5
> chef12-server1 = master / us-east-1
> chef12-server2 = replica / sa-east-1
>
> The problem is:
>
> ============
>
> 
>  ~]# chef-sync-ctl sync-log test
> # Logfile created on 2014-10-28 14:26:03 +0000 by logger.rb/31641
> I, [2014-10-28T14:26:03.073474 #14407]  INFO -- : ec_sync_client: worker for
> https://chef12-server1.datac.test.com/organizations/test/organizations/test
> -> https://127.0.0.1/organizations/test started
> I, [2014-10-28T14:29:04.326504 #15188]  INFO -- : ec_sync_client: worker for
> https://chef12-server1.datac.test.com/organizations/test/organizations/test
> -> https://127.0.0.1/organizations/test started
> I, [2014-10-28T14:29:04.881830 #15188]  INFO -- : HTTP Request Returned 404
> Not Found:
> I, [2014-10-28T14:32:03.081657 #16173]  INFO -- : ec_sync_client: worker for
> https://chef12-server1.datac.test.com/organizations/test ->
> https://127.0.0.1/organizations/test started
> I, [2014-10-28T14:32:03.697880 #16173]  INFO -- : Bootrapping started.
> I, [2014-10-28T14:32:04.681163 #16173]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:32:05.294182 #16173]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:32:05.927196 #16173]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:32:06.564459 #16173]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:33:52.138190 #16938]  INFO -- : ec_sync_client: worker for
> https://chef12-server1.datac.test.com/organizations/test ->
> https://127.0.0.1/organizations/test started
> I, [2014-10-28T14:33:52.756533 #16938]  INFO -- : Bootrapping started.
> I, [2014-10-28T14:33:53.743989 #16938]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:33:54.377393 #16938]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:33:54.998467 #16938]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:33:55.630469 #16938]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:42:12.312655 #8098]  INFO -- : ec_sync_client: worker for
> https://chef12-server1.datac.test.com/organizations/test ->
> https://127.0.0.1/organizations/test started
> I, [2014-10-28T14:42:12.925787 #8098]  INFO -- : Bootrapping started.
> I, [2014-10-28T14:42:14.763716 #8098]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:42:15.422438 #8098]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:42:16.066673 #8098]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
> I, [2014-10-28T14:42:16.664576 #8098]  INFO -- : HTTP Request Returned 401
> Unauthorized: error
>
> ============
>
> The /etc/chef-sync/ec_sync_user.pem is the same on both machines (generated
> on master "server1" copied to replica "server2"), and the command
> "chef-sync-ctl prepare-org test" was executed on both sides.
>
> Also, the "show config" does not work, both in server1 or in server2:
>
> 
>  ~]# chef-sync-ctl show-config
> Starting Chef Client, version 11.12.2
> Compiling Cookbooks...
>
> ================================================================================
> Recipe Compile Error
> ================================================================================
>
>
> Chef::Exceptions::RecipeNotFound
> --------------------------------
> could not find recipe show_config for cookbook chef-sync
>
>
>
> Running handlers:
> Running handlers complete
>
> [2014-10-28T14:59:08+00:00] FATAL: Stacktrace dumped to
> /opt/chef-sync/embedded/cookbooks/cache/chef-stacktrace.out
> Chef Client failed. 0 resources updated in 3.848546996 seconds
> [2014-10-28T14:59:08+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
> Chef run process exited unsuccessfully (exit code 1)
>
>
> Can you help me please?
>
> Thanks a lot!
>
> --
> -- Tiago Cruz
>



Archive powered by MHonArc 2.6.16.

§