跟踪Apache2日志记录

时间:2016-09-21 22:05:50

标签: apache2

我的Apache2有错误,你能帮忙吗?

[ 2016-09-22 00:06:55.8065 31498/7ff59d1f8740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.53', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.53', 'web_server_pid' => '31496', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2016-09-22 00:06:55.8183 31501/7f99c561c740 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.31496/generation-0/request
[ 2016-09-22 00:06:55.8425 31507/7f8d9302e780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.31496/generation-0/logging
[ 2016-09-22 00:06:55.8442 31498/7ff59d1f8740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Thu Sep 22 00:06:55.850365 2016] [suexec:notice] [pid 31496] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Sep 22 00:06:55.931920 2016] [auth_digest:notice] [pid 31518] AH01757: generating secret for digest authentication ...
[Thu Sep 22 00:06:55.934507 2016] [:notice] [pid 31522] FastCGI: process manager initialized (pid 31522)
[ 2016-09-22 00:06:55.9491 31524/7fd7b0c70740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.53', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.53', 'web_server_pid' => '31518', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2016-09-22 00:06:55.9612 31527/7f3a3c6c4740 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.31518/generation-0/request
[ 2016-09-22 00:06:55.9891 31534/7f4b93425780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.31518/generation-0/logging
[ 2016-09-22 00:06:55.9895 31524/7fd7b0c70740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Thu Sep 22 00:06:56.088702 2016] [:error] [pid 31518] python_init: Python version mismatch, expected '2.7.5+', found '2.7.9'.
[Thu Sep 22 00:06:56.089019 2016] [:error] [pid 31518] python_init: Python executable found '/usr/bin/python'.
[Thu Sep 22 00:06:56.089032 2016] [:error] [pid 31518] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Thu Sep 22 00:06:56.089096 2016] [:notice] [pid 31518] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Thu Sep 22 00:06:56.089106 2016] [:notice] [pid 31518] mod_python: using mutex_directory /tmp 
[Thu Sep 22 00:06:56.140013 2016] [mpm_prefork:notice] [pid 31518] AH00163: Apache/2.4.10 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.9 Phusion_Passenger/4.0.53 mod_python/3.3.1 Python/2.7.9 OpenSSL/1.0.1t configured -- resuming normal operations
[Thu Sep 22 00:06:56.140121 2016] [core:notice] [pid 31518] AH00094: Command line: '/usr/sbin/apache2'

1 个答案:

答案 0 :(得分:0)

似乎mod_python会抛出错误。

[:error] python_init: Python version mismatch, expected '2.7.5+', found '2.7.9'

为了摆脱它,你需要recompile mod_python使用与运行时相同的版本,或者更快的解决方法remove and reinstall mod_python

$ apt-get update
$ apt-get remove libapache2-mod-python
$ apt-get build-dep libapache2-mod-python

您似乎同时运行mod_passengermod_python。因此,您可以使用乘客来代替您的python应用程序。 这是passenger python how-to,您可能还想查看mod_wsgi。

我会选择你想要如何提供python应用程序,注释掉你不需要的模块并重新启动apache。

相关问题