【问题标题】:Unexpected error in mod_passenger Cannot connect to the helper agentmod_passenger 中的意外错误无法连接到帮助程序代理
【发布时间】:2017-01-24 08:09:38
【问题描述】:

我的服务器(redmine)有问题。 我已经安装了Apache2 + phusion 客。有时我有一个错误500。 当我看到 apache 日志(/var/log/apache2/error.log)时,我有以下内容,但我不明白:

[ 2017-01-24 08:27:50.0090 24342/7f8d9164f780 apache2/Hooks.cpp:718 ]: Unexpected error in mod_passenger: Cannot connect to the helper agent at /tmp/passenger.1.0.20176/generation-0/request
  Backtrace:
     in 'Passenger::FileDescriptor Hooks::connectToHelperAgent()' (Hooks.cpp:283)
     in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:532)

[Tue Jan 24 08:36:41.659372 2017] [mpm_prefork:notice] [pid 20176] AH00169: caught SIGTERM, shutting down
[ 2017-01-24 08:36:41.6769 20188/7ff6b3484780 agents/LoggingAgent/Main.cpp:289 ]: Caught signal, exiting...
[ 2017-01-24 08:36:43.6948 29025/7f612a691740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby1.9.1', 'default_
[ 2017-01-24 08:36:43.6976 29028/7ff0c7127740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.29024/generation-0/request
[ 2017-01-24 08:36:43.7020 29033/7fe594edb780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.29024/generation-0/logging
[ 2017-01-24 08:36:43.7021 29025/7f612a691740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2017-01-24 08:36:43.7205 29047/7fa61ed1c740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby1.9.1', 'default_
[ 2017-01-24 08:36:43.7234 29051/7f78162fe740 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.29045/generation-0/request
[ 2017-01-24 08:36:43.7277 29057/7f83146cc780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.29045/generation-0/logging
[ 2017-01-24 08:36:43.7279 29047/7fa61ed1c740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Tue Jan 24 08:36:43.737820 2017] [mpm_prefork:notice] [pid 29045] AH00163: Apache/2.4.6 (Ubuntu) Phusion_Passenger/4.0.40 PHP/5.5.3-1ubuntu2.2 configured -- resuming normal operations
[Tue Jan 24 08:36:43.737856 2017] [core:notice] [pid 29045] AH00094: Command line: '/usr/sbin/apache2'
App 29105 stdout:
App 29105 stderr: /var/lib/gems/1.9.1/gems/passenger-4.0.40/lib/phusion_passenger/platform_info.rb:352: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
[ 2017-01-24 08:36:50.8464 29051/7f7816207700 Pool2/SmartSpawner.h:301 ]: Preloader for /usr/share/redmine started on PID 29105, listening on unix:/tmp/passenger.1.0.29045/generation-0/backends/preloader.29105
App 29145 stdout:

我已经重新启动 apache2 并发出 clear 问题。

【问题讨论】:

    标签: ruby-on-rails apache passenger redmine


    【解决方案1】:

    错误行:

    "App 29105 stderr: /var/lib/gems/1.9.1/gems/passenger-4.0.40/lib/phusion_passenger/platform_info.rb:352: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777".
    

    建议文件夹 /usr/local/bin 对所有用户都是可写的。它可能会导致乘客 apache 模块的安全相关问题。您可以尝试将 /usr/local/bin 的权限设置为 775 并打开stick bit。

    对我来说 /usr/local/bin 有以下权限:

    drwxrwsr-x  2 root staff   4096 Jun  6  2016 .
    

    【讨论】:

    • 我设置了权限,警告Insecure world writable dirclear,但是我仍然有错误500 :2017-02-01 14:35:42.0092 27218/7f9204827780 apache2/Hooks.cpp:718 ]: Unexpected error in mod_passenger: Cannot connect to the helper agent at /tmp/ Backtrace: in 'Passenger::FileDescriptor Hooks::connectToHelperAgent()' (Hooks.cpp:283) in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:532)
    猜你喜欢
    • 1970-01-01
    • 2012-07-24
    • 2023-04-05
    • 2011-09-22
    • 2018-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多