打印

设置SMTP 显示nginx 502 bad gateway

设置SMTP 显示nginx 502 bad gateway

置好smtp点发送测试邮件马上就跳转502 bad gateway
复制内容到剪贴板
代码:
[15-Oct-2017 18:08:44]  [pool www] pid 16084
script_filename = /home/wwwroot/img.gztown.net/index.php
[0x00007fb6fb90ac10] stream_socket_client() /home/wwwroot/img.gztown.net/app/vendor/phpmailer/class.smtp.php:283
[0x00007fb6fb90a108] connect() /home/wwwroot/img.gztown.net/app/vendor/phpmailer/class.phpmailer.php:1579
[0x00007fb6fb908920] smtpConnect() /home/wwwroot/img.gztown.net/app/routes/route.dashboard.php:998
[0x00007fb6fb8f9900] {closure}() /home/wwwroot/img.gztown.net/lib/G/classes/class.handler.php:216
[0x00007fb6fb8f8918] processRequest() /home/wwwroot/img.gztown.net/lib/G/classes/class.handler.php:120
[0x00007fb6fb8f6e98] __construct() /home/wwwroot/img.gztown.net/app/loader.php:478
[0x00007fb6fb8f48f8] +++ dump failed
复制内容到剪贴板
代码:
[15-Oct-2017 13:45:43] NOTICE: fpm is running, pid 25642
[15-Oct-2017 15:38:08] WARNING: [pool www] child 12720, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (119.346177 sec), terminating
[15-Oct-2017 15:38:08] WARNING: [pool www] child 12720 exited on signal 15 (SIGTERM) after 412.624682 seconds from start
[15-Oct-2017 15:38:08] NOTICE: [pool www] child 12732 started
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12730, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (110.911371 sec), terminating
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12725, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (111.623411 sec), terminating
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12724, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (111.465622 sec), terminating
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12723, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (111.784756 sec), terminating
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12722, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (111.974126 sec), terminating
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12721, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (112.283068 sec), terminating
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12721 exited on signal 15 (SIGTERM) after 416.230920 seconds from start
[15-Oct-2017 15:39:15] NOTICE: [pool www] child 12735 started
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12722 exited on signal 15 (SIGTERM) after 413.229281 seconds from start
[15-Oct-2017 15:39:15] NOTICE: [pool www] child 12736 started
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12723 exited on signal 15 (SIGTERM) after 379.188954 seconds from start
[15-Oct-2017 15:39:15] NOTICE: [pool www] child 12737 started
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12724 exited on signal 15 (SIGTERM) after 366.688753 seconds from start
[15-Oct-2017 15:39:15] NOTICE: [pool www] child 12738 started
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12725 exited on signal 15 (SIGTERM) after 366.681535 seconds from start
[15-Oct-2017 15:39:15] NOTICE: [pool www] child 12739 started
[15-Oct-2017 15:39:15] WARNING: [pool www] child 12730 exited on signal 15 (SIGTERM) after 110.939204 seconds from start
[15-Oct-2017 15:39:15] NOTICE: [pool www] child 12740 started
[15-Oct-2017 16:08:01] NOTICE: Finishing ...
[15-Oct-2017 16:08:01] NOTICE: exiting, bye-bye!
[15-Oct-2017 16:08:04] NOTICE: fpm is running, pid 13400
[15-Oct-2017 16:08:04] NOTICE: ready to handle connections
[15-Oct-2017 16:16:24] WARNING: [pool www] child 13401, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (131.969308 sec), terminating
[15-Oct-2017 16:16:24] WARNING: [pool www] child 13401 exited on signal 15 (SIGTERM) after 500.022866 seconds from start
[15-Oct-2017 16:16:24] NOTICE: [pool www] child 13408 started
[15-Oct-2017 16:19:11] WARNING: [pool www] child 13408, script '/home/wwwroot/img.gztown.net/index.php' (request: "GET /index.php") execution timed out (113.038371 sec), terminating
[15-Oct-2017 16:19:11] WARNING: [pool www] child 13407, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (124.982571 sec), terminating
[15-Oct-2017 16:19:11] WARNING: [pool www] child 13408 exited on signal 15 (SIGTERM) after 166.662540 seconds from start
[15-Oct-2017 16:19:11] NOTICE: [pool www] child 13419 started
[15-Oct-2017 16:19:11] WARNING: [pool www] child 13407 exited on signal 15 (SIGTERM) after 192.191002 seconds from start
[15-Oct-2017 16:19:11] NOTICE: [pool www] child 13420 started
[15-Oct-2017 16:26:24] WARNING: [pool www] child 13420, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (124.691821 sec), terminating
[15-Oct-2017 16:26:24] WARNING: [pool www] child 13420 exited on signal 15 (SIGTERM) after 433.346117 seconds from start
[15-Oct-2017 16:26:24] NOTICE: [pool www] child 13436 started
[15-Oct-2017 17:05:51] WARNING: [pool www] child 13418, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (100.631150 sec), terminating
[15-Oct-2017 17:05:51] WARNING: [pool www] child 13418 exited on signal 15 (SIGTERM) after 2804.044849 seconds from start
[15-Oct-2017 17:05:51] NOTICE: [pool www] child 13792 started
[15-Oct-2017 17:23:05] WARNING: [pool www] child 13417, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (112.113225 sec), terminating
[15-Oct-2017 17:23:05] WARNING: [pool www] child 13417 exited on signal 15 (SIGTERM) after 3846.415783 seconds from start
[15-Oct-2017 17:23:05] NOTICE: [pool www] child 14237 started
[15-Oct-2017 17:25:51] WARNING: [pool www] child 14237, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (133.088822 sec), terminating
[15-Oct-2017 17:25:51] WARNING: [pool www] child 14237 exited on signal 15 (SIGTERM) after 166.662916 seconds from start
[15-Oct-2017 17:25:51] NOTICE: [pool www] child 14238 started
[15-Oct-2017 17:37:29] NOTICE: Finishing ...
[15-Oct-2017 17:37:29] NOTICE: exiting, bye-bye!
[15-Oct-2017 17:37:30] NOTICE: fpm is running, pid 14258
[15-Oct-2017 17:37:30] NOTICE: ready to handle connections
[15-Oct-2017 17:38:50] NOTICE: Finishing ...
[15-Oct-2017 17:38:50] NOTICE: exiting, bye-bye!
[15-Oct-2017 17:38:51] NOTICE: fpm is running, pid 14268
[15-Oct-2017 17:38:51] NOTICE: ready to handle connections
[15-Oct-2017 17:47:27] NOTICE: Finishing ...
[15-Oct-2017 17:47:27] NOTICE: exiting, bye-bye!
[15-Oct-2017 17:47:30] NOTICE: fpm is running, pid 14871
[15-Oct-2017 17:47:30] NOTICE: ready to handle connections
[15-Oct-2017 18:05:10] NOTICE: Finishing ...
[15-Oct-2017 18:05:10] NOTICE: exiting, bye-bye!
[15-Oct-2017 18:05:13] NOTICE: fpm is running, pid 15484
[15-Oct-2017 18:05:13] NOTICE: ready to handle connections
[15-Oct-2017 18:06:45] NOTICE: Finishing ...
[15-Oct-2017 18:06:45] NOTICE: exiting, bye-bye!
[15-Oct-2017 18:06:48] NOTICE: fpm is running, pid 16082
[15-Oct-2017 18:06:48] NOTICE: ready to handle connections
[15-Oct-2017 18:08:44] WARNING: [pool www] child 16084, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") executing too slow (3.278852 sec), logging
[15-Oct-2017 18:08:44] NOTICE: child 16084 stopped for tracing
[15-Oct-2017 18:08:44] NOTICE: about to trace 16084
[15-Oct-2017 18:08:44] ERROR: failed to ptrace(PEEKDATA) pid 16084: Input/output error (5)
[15-Oct-2017 18:08:44] NOTICE: finished trace of 16084
[15-Oct-2017 18:10:21] WARNING: [pool www] child 16084, script '/home/wwwroot/img.gztown.net/index.php' (request: "POST /index.php") execution timed out (100.390735 sec), terminating
[15-Oct-2017 18:10:21] WARNING: [pool www] child 16084 exited on signal 15 (SIGTERM) after 213.254989 seconds from start
[15-Oct-2017 18:10:21] NOTICE: [pool www] child 16086 started

TOP

可能连接smtp服务器信息有错误

TOP

回复 2# 的帖子

没有 我之前也是这样配置的 后来就不行了

TOP

回复 3# 的帖子

按上面提供的日志就是连接服务器时

TOP

回复 4# 的帖子

已经确认Digitalocean禁止使用IPV6发信了 如何配置使用IPV4发信?

[ 本帖最后由 koala 于 2017-10-16 23:02 编辑 ]

TOP

回复 5# 的帖子

编辑 /etc/gai.conf 文件加入
precedence ::ffff:0:0/96 100
保存,这样就设置为ipv4 优先了

如果不需要ipv6,禁用的话是编辑 /etc/sysctl.conf 加入
net.ipv6.conf.all.disable_ipv6 = 1  
net.ipv6.conf.default.disable_ipv6 = 1  
net.ipv6.conf.lo.disable_ipv6 = 1
保存,再 sysctl -p

TOP

回复 6# 的帖子

好的 非常感谢军哥!

TOP