【问题标题】:502 Bad Gateway Nginx & Chef Server502 Bad Gateway Nginx & Chef 服务器
【发布时间】:2016-11-23 03:56:39
【问题描述】:

我已经升级了我的厨师服务器。然后我成功运行chef-server-ctl reconfigure。 但是,当我运行chef-server-ctl test 时,我得到了错误:

Encountered an error attempting to create client pedant_admin_client
Response Code was: 502

502 Bad Gateway
nginx/1.4.4

谁能帮帮我?

【问题讨论】:

  • chef-server-ctl status 说什么?

标签: nginx chef-infra


【解决方案1】:

tl;博士

sudo chef-server-ctl upgrade

警告:我的组织已保留,但您的结果可能会有所不同

我也遇到过。我怀疑是意外。 “apt-get 升级”。对我来说,所有检查都通过状态。

chef-server-ctl status

但这失败了

sudo chef-server-ctl test

我运行了这个以获得更多细节(当心数千行输出;-)

sudo chef-server-ctl tail

并找到了这个 gem:(注意路径中的“..”表示路径配置错误)

2015-08-24_23:00 mkdir: cannot create directory '/opt/opscode/embedded/service/rabbitmq/sbin/../var': Permission denied

然后我运行了它并且它工作了

sudo chef-server-ctl upgrade

【讨论】:

    【解决方案2】:

    遇到同样的事情:这是我为解决问题所做的。

    Chef 有日志,但有很多服务。检查哪个失败

    chef-server-ctl 状态将指示发生了什么故障。

    去看看下面的日志

    /var/log/chef-server/<problem-service>/current
    

    我的特殊问题是

    2014-09-27_17:33:32.41439 FATAL:  could not create shared memory segment: Invalid argument
    2014-09-27_17:33:32.41441 DETAIL:  Failed system call was shmget(key=5432001, size=4050755584, 03600).
    2014-09-27_17:33:32.41442 HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 4050755584 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
    

    因此我需要做的就是chef-server-ctl reconfigure 问题解决了

    【讨论】:

    • 请注意,使用chef-server-ctl reconfigure 不会删除您的组织
    猜你喜欢
    • 2019-02-26
    • 2021-09-11
    • 2018-01-20
    • 2017-05-10
    • 2022-07-14
    • 2014-06-28
    • 2017-01-06
    • 2023-03-20
    • 1970-01-01
    相关资源
    最近更新 更多