From 0a673cf2bbe87339470971873d2d36808d13b751 Mon Sep 17 00:00:00 2001 From: xiaji Date: Fri, 29 Aug 2025 22:29:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Gunicorn=E7=9A=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=91=BD=E4=BB=A4=EF=BC=8C=E8=B0=83=E8=AF=95=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/django_tab.cpython-38.pyc | Bin 9578 -> 9966 bytes __pycache__/gunicorn_tab.cpython-38.pyc | Bin 16501 -> 16904 bytes __pycache__/remote_command_tab.cpython-38.pyc | Bin 8718 -> 9181 bytes __pycache__/threads.cpython-38.pyc | Bin 24893 -> 34652 bytes app.log | 347 ++++++++++++++++++ django_tab.py | 19 +- gunicorn_tab.py | 8 +- remote_command_tab.py | 34 +- threads.py | 344 +++++++++++++++-- 9 files changed, 715 insertions(+), 37 deletions(-) diff --git a/__pycache__/django_tab.cpython-38.pyc b/__pycache__/django_tab.cpython-38.pyc index f5086e5da2930935e5dcbc98185d2a0a03ca94ed..5e6725d2765038465e40f4de59a543bd9bf84977 100644 GIT binary patch delta 1751 zcmaJ>O>7%g5Pq}%VVkZU|8yNEX`DE5(^v&VOG8>{B*agP8bC-X2YkSFvThtFjm`6# zmda6t_-R#%@bgkCP!H<^2o8{1My=FJhzqB}AzTnXBAi4>AaSD-AZB)Lr!g^>_VesF zGw;oOZ{GfT^7rT5FS=YE41e#J%jsidW%pfhe~GUt76*;RC2d5g(uz+T*7m>2;_5|a zXYs%!i$*IIsi=s50i7`swE)m4PrmypVP5SXNZ0(NlYW0%};A@EctxiFJG zm7I#*n;-@|S7Al`&^a!?ljNl*DSsKE$P89uc|~I=7c;;TQ)6>7AFw!*Sc4J(Nskh1 zQr&hM_o37l?=)o1PPV=aqdGFX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n1T*bKeIqQKz?k?DM{9_kp>Voasdfl|BX3$Qm zXwWh<{kOf9x&Rh;qppX427mpASDUnVMZxQ?k$$k;nFa&L;thFw2cxvZK8n_}c2Y~CxXa$@?6MMFav2tV zpD?{hV^@EaV)l_bJ*7m z^MQnA3RMditrQf2?|~ZL1!cij?t<=MXdp`6^o}T8F1q5PlR)=D9462K6CuKN0##H{ eF$5VDbMQRaQ%$cL6PL?P7fkggqe+IJ!OcIE!V>-f diff --git a/__pycache__/gunicorn_tab.cpython-38.pyc b/__pycache__/gunicorn_tab.cpython-38.pyc index bed53daf84b662643bedd7b4a78a977414915efb..72bab4848772b0e277f2d790aef2152a075e1ea9 100644 GIT binary patch delta 1312 zcmZuw-EZ4e6!)= zm8tNuOXF4<*{!jN9vi(HkG9W_`)#|!#!fpDs0U6m=^!~2f6J*XAU~OpD{z>Q^tr$a~`Dt75% z{Ef5=L&d1=$98=^ZZK^cKaJ6&r#sXxyj$bjrJaqHakX^ry(y*i=;Cto&Mi_I=$}U#u(mH)Uo7q4`1|(dW5tQm2U9y+8`j0JF7R>u;9b7YsPz>rJ9Fi^^l7{T52-CbS$lmF&#?R4#@YOk6TpIOj4vcizgVL!9I6%Ceiy#XW zqnZPi=QUx@S%uRvjKzv^J#mS-1ZP+|AP491s|1F|^`xyiuZILVMCt0REj@$McaeL; zVbYgVoVLnjCHKnnD*fDAQa5iI&Dz3VpVyYHMMKI;4coA4%P4P4?FLzXcxSC3DPLnP zd61iihvdzn!z1b-`upo!oGlsm)S{$qigY*j^HfW?JXR|=NpmOfe0lmGw# delta 908 zcma)4&rcIk5Pq|}ZMUUeTIf%H*eVTlt1aCciUAKOk(wAu6fn`45W`Ar1FhK>4`fjj z5HNbt7cL^Y4QP}|46KH$9!&J$)r3DlB8hs_7-FKc3vzZR^X)hDW_M=3yxA%EaTA0A zm&-x$Szlhg5*}U^mV$y6Ll1g4dTE%x3C6lP4P;vd=E;Ob=2do{$aa-MbeLGBT97-< zyvyW*iPdJtz2NC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dbf7P8QT?}bU$i;_6P5_nbo8tLI~m?xk> zxK3atxJ)pOGoF5yF5mZTFqXm=?+81G)86#p9C?k>Hl5e4*fkw;C7?Fo3W3C-;#|pS z8C?fhz^YeDPSKrvS=E(NM$=Y{kTr|S!eYKyP?hDJt}N&Un8&DZgvluT;+*fAFPOf; zvt@s=pqPQ6YIpNG+~l5w148@@#t3FORGRb*)N1J~ut+zqzhyfp%78FgedQgWoyCuk zeef*EtCU*4QS6>&%U z95Ej=3+(50ho@ByUY((o!K)gIr~ct}jEB{D`N^sq*isJE)l5FWZ(tK`;d-7!JnI`j z|L}a)_A_EWelSnq$ve2!ehDL;0zM5qTg%|@4kYzT~T;%^t zrBnocZznveLRvT7^;(bC^iZ);Vok@Un1^}pF0w-r{1D!Xn3WIg(xLH;28OAY0Dg}Q zVJSMw+k6o{+)U!EQ?jvqJE`4=yV27ufWxtY@lgs&5TptE2#N$r0#YE5UVwHEv=N}G o0?`Dj40HH0Hpn`$8k1U^Tn#Qd&8`Lra%Un0;}kQAp00Pl0i7@;Pyhe` diff --git a/__pycache__/threads.cpython-38.pyc b/__pycache__/threads.cpython-38.pyc index fb045f6509981d3b1eb178d875e9f0e7516f3f29..ddf8600f2fc016713c78abb74cee3f665329fc48 100644 GIT binary patch literal 34652 zcmc(IdvILUnP!`(hjX0NI8BNfai5*brcd0@wtiaiR#_wk=y~iQC-) zdRq(xFy`T)gjW*mL?(~`A(&(m;$R-Nv$Hd^vzguO?C$*0yOlp?-LkYbwUgQ!PffYD zCj0w+=bYQOTUWA3U{|g_?(_Q2cV6H5Ugz{}O-;!F{?`2B$NM+Lf`R|Ri1#mo$kq7d z_67q1J75RL0)y)R;9wB(&{$|ZJQxl#Ej$((j}Au1V}pPsW#fbK&jjp<9epTZM;{Cg zCJ>9+am3=8=!4YQ8xe1mcq8H|y9x0oiKh^6wp$Qyk$4m0X}cBi zR*5$w-e$KW-Y)SL#5?R2h_8@%8u3oM3-KCGmE|d+pVT zuam$ncqiiP?DdG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 100644 --- a/app.log +++ b/app.log @@ -174,3 +174,350 @@ 2025-08-29 21:28:25.808 | INFO | gunicorn_tab:get_password:317 - 从对话框获取密码,长度: 5 2025-08-29 21:28:27.972 | INFO | gunicorn_tab:get_password:313 - 密码为空,弹出密码输入对话框 2025-08-29 21:28:31.580 | INFO | gunicorn_tab:get_password:317 - 从对话框获取密码,长度: 5 +2025-08-29 21:36:53.095 | INFO | __main__::109 - 应用程序启动 +2025-08-29 21:36:53.131 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 21:36:53.132 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 21:36:53.133 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 21:36:53.134 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 21:36:53.134 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 21:36:54.962 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:36:58.903 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:36:58.909 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 21:36:58.909 | INFO | threads:__init__:733 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:36:58.909 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 21:36:59.013 | INFO | threads:run:761 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 21:36:59.014 | INFO | threads:run:775 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 21:36:59.014 | INFO | threads:run:781 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:37:02.091 | INFO | threads:run:788 - Gunicorn进程检查结果: xiaji 81565 0.0 0.1 5756 1948 ? Ss 21:36 0:00 timeout 10 gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 81566 2.9 1.3 35456 23372 ? S 21:36 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 81567 6.5 2.5 57116 43136 ? S 21:36 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 81572 0.0 0.2 7432 3624 ? Ss 21:37 0:00 bash -c ps aux | grep gunicorn +xiaji 81574 0.0 0.1 6620 2356 ? S 21:37 0:00 grep gunicorn + +2025-08-29 21:37:02.137 | INFO | threads:run:796 - Gunicorn测试成功 - 项目: statuspage, 端口: 8000 +2025-08-29 21:37:02.138 | INFO | gunicorn_tab:on_test_gunicorn_result:397 - Gunicorn测试成功: Gunicorn测试成功 - 项目: statuspage, 端口: 8000 +2025-08-29 21:45:55.296 | INFO | __main__::109 - 应用程序启动 +2025-08-29 21:45:55.335 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 21:45:55.336 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 21:45:55.337 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 21:45:55.338 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 21:45:55.338 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 21:46:06.581 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:46:11.901 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:46:11.907 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 21:46:11.907 | INFO | threads:__init__:782 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:46:11.907 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 21:46:12.007 | INFO | threads:run:810 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 21:46:12.007 | INFO | threads:run:824 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 21:46:12.007 | INFO | threads:run:830 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:46:15.091 | INFO | threads:run:837 - Gunicorn进程检查结果: xiaji 82188 0.0 0.1 5756 1948 ? Ss 21:46 0:00 timeout 10 gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82189 2.9 1.3 35456 23348 ? S 21:46 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82190 6.5 2.5 57116 43104 ? S 21:46 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82191 0.0 0.2 7432 3660 ? Ss 21:46 0:00 bash -c ps aux | grep gunicorn +xiaji 82193 0.0 0.1 6620 2380 ? S 21:46 0:00 grep gunicorn + +2025-08-29 21:46:15.137 | INFO | threads:run:844 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 21:46:15.167 | INFO | threads:run:850 - ss命令检查端口8000结果: +2025-08-29 21:46:15.219 | INFO | threads:run:856 - netstat命令检查端口8000结果: +2025-08-29 21:46:15.219 | ERROR | threads:run:894 - Gunicorn进程运行正常,但端口8000未处于LISTEN状态 +2025-08-29 21:46:15.221 | ERROR | gunicorn_tab:on_test_gunicorn_result:400 - Gunicorn测试失败: Gunicorn进程运行正常,但端口8000未处于LISTEN状态 +2025-08-29 21:48:51.485 | INFO | __main__::109 - 应用程序启动 +2025-08-29 21:48:51.522 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 21:48:51.524 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 21:48:51.524 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 21:48:51.526 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 21:48:51.527 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 21:48:53.359 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:48:55.810 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:48:55.816 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 21:48:55.816 | INFO | threads:__init__:782 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:48:55.816 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 21:48:55.914 | INFO | threads:run:810 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 21:48:55.914 | INFO | threads:run:824 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 21:48:55.914 | INFO | threads:run:829 - 检查端口8000是否被其他进程占用 +2025-08-29 21:48:55.969 | INFO | threads:run:841 - 端口8000未被占用 +2025-08-29 21:48:55.969 | INFO | threads:run:845 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:48:59.049 | INFO | threads:run:852 - Gunicorn进程检查结果: xiaji 82445 0.0 0.1 5756 1944 ? Ss 21:48 0:00 timeout 10 gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82446 2.9 1.3 35456 23440 ? S 21:48 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82447 6.5 2.5 57116 43164 ? S 21:48 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 1 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82452 0.0 0.2 7432 3564 ? Ss 21:48 0:00 bash -c ps aux | grep gunicorn +xiaji 82454 0.0 0.1 6620 2380 ? S 21:48 0:00 grep gunicorn + +2025-08-29 21:48:59.050 | INFO | threads:run:856 - 检测到Gunicorn Worker进程数量: 4 +2025-08-29 21:48:59.096 | INFO | threads:run:872 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 21:48:59.112 | INFO | threads:run:878 - ss命令检查端口8000结果: tcp LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:(("gunicorn",pid=82447,fd=5),("gunicorn",pid=82446,fd=5)) + +2025-08-29 21:48:59.112 | INFO | threads:run:892 - 端口8000处于LISTEN状态,开始本地请求测试 +2025-08-29 21:48:59.176 | INFO | threads:run:899 - curl本地请求测试退出状态: 7 +2025-08-29 21:48:59.177 | INFO | threads:run:900 - curl本地请求测试输出: +2025-08-29 21:48:59.177 | ERROR | threads:run:918 - Gunicorn进程运行正常,但本地请求失败: +2025-08-29 21:48:59.178 | ERROR | gunicorn_tab:on_test_gunicorn_result:400 - Gunicorn测试失败: Gunicorn进程运行正常,但本地请求失败: +2025-08-29 21:52:42.996 | INFO | __main__::109 - 应用程序启动 +2025-08-29 21:52:43.035 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 21:52:43.036 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 21:52:43.036 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 21:52:43.037 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 21:52:43.038 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 21:52:45.467 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:52:48.446 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:52:48.452 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 21:52:48.452 | INFO | threads:__init__:782 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:52:48.452 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 21:52:48.545 | INFO | threads:run:810 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 21:52:48.545 | INFO | threads:run:824 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 21:52:48.545 | INFO | threads:run:829 - 检查端口8000是否被其他进程占用 +2025-08-29 21:52:48.601 | INFO | threads:run:841 - 端口8000未被占用 +2025-08-29 21:52:48.601 | INFO | threads:run:845 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.683 | INFO | threads:run:852 - Gunicorn进程检查结果: xiaji 82777 0.0 0.1 5756 1944 ? Ss 21:52 0:00 timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82778 2.9 1.3 35456 23464 ? S 21:52 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82779 6.5 2.5 57116 43028 ? S 21:52 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82780 6.6 2.5 57116 43216 ? S 21:52 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82781 6.7 2.5 57116 43352 ? S 21:52 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82782 6.6 2.5 57116 43168 ? S 21:52 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 82787 0.0 0.2 7432 3624 ? Ss 21:52 0:00 bash -c ps aux | grep gunicorn +xiaji 82789 0.0 0.1 6620 2380 ? S 21:52 0:00 grep gunicorn + +2025-08-29 21:52:51.685 | INFO | threads:run:856 - 检测到Gunicorn Worker进程数量: 7 +2025-08-29 21:52:51.686 | WARNING | threads:run:877 - 未检测到Gunicorn主进程 +2025-08-29 21:52:51.686 | INFO | threads:run:880 - 检测到6个Gunicorn Worker进程: +2025-08-29 21:52:51.687 | INFO | threads:run:882 - - Worker PID: 82777, 命令: timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.687 | INFO | threads:run:882 - - Worker PID: 82778, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.687 | INFO | threads:run:882 - - Worker PID: 82779, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.688 | INFO | threads:run:882 - - Worker PID: 82780, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.688 | INFO | threads:run:882 - - Worker PID: 82781, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.688 | INFO | threads:run:882 - - Worker PID: 82782, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:52:51.688 | ERROR | threads:run:892 - Gunicorn进程结构异常: 未检测到完整的进程结构 +2025-08-29 21:52:51.730 | INFO | threads:run:908 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 21:52:51.748 | INFO | threads:run:914 - ss命令检查端口8000结果: tcp LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:(("gunicorn",pid=82782,fd=5),("gunicorn",pid=82781,fd=5),("gunicorn",pid=82780,fd=5),("gunicorn",pid=82779,fd=5),("gunicorn",pid=82778,fd=5)) + +2025-08-29 21:52:51.749 | INFO | threads:run:928 - 端口8000处于LISTEN状态,开始本地请求测试 +2025-08-29 21:52:51.816 | INFO | threads:run:935 - curl本地请求测试退出状态: 7 +2025-08-29 21:52:51.816 | INFO | threads:run:936 - curl本地请求测试输出: +2025-08-29 21:52:51.817 | ERROR | threads:run:954 - Gunicorn进程运行正常,但本地请求失败: +2025-08-29 21:52:51.817 | ERROR | gunicorn_tab:on_test_gunicorn_result:400 - Gunicorn测试失败: Gunicorn进程运行正常,但本地请求失败: +2025-08-29 21:54:54.164 | ERROR | threads:run:212 - 设置时区失败: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper +sudo: a password is required + +2025-08-29 21:54:54.165 | ERROR | remote_command_tab:on_set_timezone_and_restart_result:227 - 时区设置失败: 设置时区失败: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper +sudo: a password is required + +2025-08-29 21:54:58.248 | ERROR | threads:run:212 - 设置时区失败: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper +sudo: a password is required + +2025-08-29 21:54:58.250 | ERROR | remote_command_tab:on_set_timezone_and_restart_result:227 - 时区设置失败: 设置时区失败: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper +sudo: a password is required + +2025-08-29 21:56:46.766 | INFO | __main__::109 - 应用程序启动 +2025-08-29 21:56:46.805 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 21:56:46.807 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 21:56:46.808 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 21:56:46.809 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 21:56:46.809 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 21:56:50.185 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:56:56.545 | INFO | threads:run:220 - 时区设置成功,服务器正在重启 +2025-08-29 21:56:56.547 | INFO | remote_command_tab:on_set_timezone_and_restart_result:229 - 时区设置成功: 时区设置成功,服务器正在重启 +2025-08-29 21:57:18.743 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:57:22.397 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:57:22.404 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 21:57:22.405 | INFO | threads:__init__:786 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:57:22.405 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 21:57:22.748 | INFO | threads:run:814 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 21:57:22.748 | INFO | threads:run:828 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 21:57:22.748 | INFO | threads:run:833 - 检查端口8000是否被其他进程占用 +2025-08-29 21:57:22.807 | INFO | threads:run:845 - 端口8000未被占用 +2025-08-29 21:57:22.807 | INFO | threads:run:849 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.886 | INFO | threads:run:856 - Gunicorn进程检查结果: xiaji 1304 0.0 0.1 5756 1948 ? Ss 21:57 0:00 timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1305 2.9 1.3 35456 23456 ? S 21:57 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1306 7.1 2.5 57116 43028 ? S 21:57 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1307 6.9 2.5 57116 43164 ? S 21:57 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1317 6.4 2.5 57116 43128 ? S 21:57 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1318 6.7 2.5 57116 43008 ? S 21:57 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1319 0.0 0.2 7432 3624 ? Ss 21:57 0:00 bash -c ps aux | grep gunicorn +xiaji 1321 0.0 0.1 6620 2356 ? S 21:57 0:00 grep gunicorn + +2025-08-29 21:57:25.886 | INFO | threads:run:860 - 检测到Gunicorn Worker进程数量: 7 +2025-08-29 21:57:25.886 | WARNING | threads:run:881 - 未检测到Gunicorn主进程 +2025-08-29 21:57:25.887 | INFO | threads:run:884 - 检测到6个Gunicorn Worker进程: +2025-08-29 21:57:25.887 | INFO | threads:run:886 - - Worker PID: 1304, 命令: timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.887 | INFO | threads:run:886 - - Worker PID: 1305, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.887 | INFO | threads:run:886 - - Worker PID: 1306, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.887 | INFO | threads:run:886 - - Worker PID: 1307, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.887 | INFO | threads:run:886 - - Worker PID: 1317, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.887 | INFO | threads:run:886 - - Worker PID: 1318, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 21:57:25.887 | ERROR | threads:run:896 - Gunicorn进程结构异常: 未检测到完整的进程结构 +2025-08-29 21:57:25.930 | INFO | threads:run:912 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 21:57:25.963 | INFO | threads:run:918 - ss命令检查端口8000结果: +2025-08-29 21:57:26.014 | INFO | threads:run:924 - netstat命令检查端口8000结果: +2025-08-29 21:57:26.015 | ERROR | threads:run:962 - Gunicorn进程运行正常,但端口8000未处于LISTEN状态 +2025-08-29 21:57:26.016 | ERROR | gunicorn_tab:on_test_gunicorn_result:400 - Gunicorn测试失败: Gunicorn进程运行正常,但端口8000未处于LISTEN状态 +2025-08-29 21:57:59.725 | INFO | threads:run:220 - 时区设置成功,服务器正在重启 +2025-08-29 21:57:59.727 | INFO | remote_command_tab:on_set_timezone_and_restart_result:229 - 时区设置成功: 时区设置成功,服务器正在重启 +2025-08-29 21:58:15.356 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:58:15.360 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 21:58:15.361 | INFO | threads:__init__:786 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 21:58:15.361 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 21:58:15.362 | ERROR | threads:run:984 - Gunicorn测试异常: SSH session not active +2025-08-29 21:58:15.366 | ERROR | gunicorn_tab:on_test_gunicorn_result:400 - Gunicorn测试失败: SSH session not active +2025-08-29 21:58:20.132 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 21:58:24.282 | INFO | gunicorn_tab:get_password:314 - 密码为空,弹出密码输入对话框 +2025-08-29 21:58:27.627 | WARNING | gunicorn_tab:get_password:323 - 用户取消了密码输入 +2025-08-29 22:10:48.195 | INFO | gunicorn_tab:test_gunicorn:376 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:10:48.198 | INFO | gunicorn_tab:test_gunicorn:383 - 创建Gunicorn测试线程 +2025-08-29 22:10:48.198 | INFO | threads:__init__:786 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:10:48.199 | INFO | gunicorn_tab:test_gunicorn:390 - Gunicorn测试线程已启动 +2025-08-29 22:10:48.635 | INFO | threads:run:814 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 22:10:48.635 | INFO | threads:run:828 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 22:10:48.636 | INFO | threads:run:833 - 检查端口8000是否被其他进程占用 +2025-08-29 22:10:48.695 | INFO | threads:run:845 - 端口8000未被占用 +2025-08-29 22:10:48.696 | INFO | threads:run:849 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.768 | INFO | threads:run:856 - Gunicorn进程检查结果: xiaji 1922 0.0 0.1 5756 1948 ? Ss 22:10 0:00 timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1923 2.9 1.3 35456 23328 ? S 22:10 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1924 7.2 2.5 57116 42888 ? S 22:10 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1925 7.3 2.5 57116 42980 ? S 22:10 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1926 7.0 2.5 57060 42932 ? S 22:10 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1927 7.2 2.5 57060 42888 ? S 22:10 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 1932 0.0 0.2 7432 3500 ? Ss 22:10 0:00 bash -c ps aux | grep gunicorn +xiaji 1934 0.0 0.1 6620 2272 ? S 22:10 0:00 grep gunicorn + +2025-08-29 22:10:51.768 | INFO | threads:run:860 - 检测到Gunicorn Worker进程数量: 7 +2025-08-29 22:10:51.769 | WARNING | threads:run:881 - 未检测到Gunicorn主进程 +2025-08-29 22:10:51.769 | INFO | threads:run:884 - 检测到6个Gunicorn Worker进程: +2025-08-29 22:10:51.769 | INFO | threads:run:886 - - Worker PID: 1922, 命令: timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.770 | INFO | threads:run:886 - - Worker PID: 1923, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.770 | INFO | threads:run:886 - - Worker PID: 1924, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.770 | INFO | threads:run:886 - - Worker PID: 1925, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.770 | INFO | threads:run:886 - - Worker PID: 1926, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.770 | INFO | threads:run:886 - - Worker PID: 1927, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:10:51.770 | ERROR | threads:run:896 - Gunicorn进程结构异常: 未检测到完整的进程结构 +2025-08-29 22:10:51.815 | INFO | threads:run:912 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 22:10:51.851 | INFO | threads:run:918 - ss命令检查端口8000结果: +2025-08-29 22:10:51.902 | INFO | threads:run:924 - netstat命令检查端口8000结果: +2025-08-29 22:10:51.902 | ERROR | threads:run:962 - Gunicorn进程运行正常,但端口8000未处于LISTEN状态 +2025-08-29 22:10:51.904 | ERROR | gunicorn_tab:on_test_gunicorn_result:400 - Gunicorn测试失败: Gunicorn进程运行正常,但端口8000未处于LISTEN状态 +2025-08-29 22:13:06.837 | INFO | __main__::109 - 应用程序启动 +2025-08-29 22:13:06.877 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 22:13:06.878 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 22:13:06.879 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 22:13:06.880 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 22:13:06.880 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 22:13:08.565 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 22:13:11.176 | INFO | gunicorn_tab:test_gunicorn:374 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:13:11.184 | INFO | gunicorn_tab:test_gunicorn:381 - 创建Gunicorn测试线程 +2025-08-29 22:13:11.185 | INFO | threads:__init__:786 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:13:11.185 | INFO | gunicorn_tab:test_gunicorn:388 - Gunicorn测试线程已启动 +2025-08-29 22:13:11.278 | INFO | threads:run:814 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 22:13:11.278 | INFO | threads:run:828 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 22:13:11.279 | INFO | threads:run:833 - 检查端口8000是否被其他进程占用 +2025-08-29 22:13:11.334 | INFO | threads:run:845 - 端口8000未被占用 +2025-08-29 22:13:11.334 | INFO | threads:run:849 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.409 | INFO | threads:run:856 - Gunicorn进程检查结果: xiaji 2165 0.0 0.1 5756 1948 ? Ss 22:13 0:00 timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 2166 2.9 1.3 35456 23432 ? S 22:13 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 2167 6.5 2.5 57116 43008 ? S 22:13 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 2168 6.5 2.5 57116 43228 ? S 22:13 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 2169 6.6 2.5 57116 43068 ? S 22:13 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 2171 6.5 2.5 57116 43080 ? S 22:13 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 2177 0.0 0.2 7432 3468 ? Ss 22:13 0:00 bash -c ps aux | grep gunicorn +xiaji 2179 0.0 0.1 6620 2360 ? S 22:13 0:00 grep gunicorn + +2025-08-29 22:13:14.411 | INFO | threads:run:860 - 检测到Gunicorn Worker进程数量: 7 +2025-08-29 22:13:14.411 | WARNING | threads:run:881 - 未检测到Gunicorn主进程 +2025-08-29 22:13:14.412 | INFO | threads:run:884 - 检测到6个Gunicorn Worker进程: +2025-08-29 22:13:14.412 | INFO | threads:run:886 - - Worker PID: 2165, 命令: timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.413 | INFO | threads:run:886 - - Worker PID: 2166, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.413 | INFO | threads:run:886 - - Worker PID: 2167, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.414 | INFO | threads:run:886 - - Worker PID: 2168, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.414 | INFO | threads:run:886 - - Worker PID: 2169, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.414 | INFO | threads:run:886 - - Worker PID: 2171, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:13:14.415 | ERROR | threads:run:896 - Gunicorn进程结构异常: 未检测到完整的进程结构 +2025-08-29 22:13:14.454 | INFO | threads:run:912 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 22:13:14.473 | INFO | threads:run:918 - ss命令检查端口8000结果: tcp LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:(("gunicorn",pid=2171,fd=5),("gunicorn",pid=2169,fd=5),("gunicorn",pid=2168,fd=5),("gunicorn",pid=2167,fd=5),("gunicorn",pid=2166,fd=5)) + +2025-08-29 22:13:14.473 | INFO | threads:run:932 - 端口8000处于LISTEN状态,开始本地请求测试 +2025-08-29 22:13:14.545 | INFO | threads:run:939 - curl本地请求测试退出状态: 7 +2025-08-29 22:13:14.546 | INFO | threads:run:940 - curl本地请求测试输出: +2025-08-29 22:13:14.546 | ERROR | threads:run:958 - Gunicorn进程运行正常,但本地请求失败: +2025-08-29 22:13:14.548 | ERROR | gunicorn_tab:on_test_gunicorn_result:398 - Gunicorn测试失败: Gunicorn进程运行正常,但本地请求失败: +2025-08-29 22:27:39.503 | INFO | __main__::109 - 应用程序启动 +2025-08-29 22:27:39.541 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 22:27:39.542 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 22:27:39.542 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 22:27:39.544 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 22:27:39.544 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 22:27:41.933 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 22:27:43.649 | INFO | gunicorn_tab:test_gunicorn:374 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:27:43.657 | INFO | gunicorn_tab:test_gunicorn:381 - 创建Gunicorn测试线程 +2025-08-29 22:27:43.658 | INFO | threads:__init__:786 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:27:43.658 | INFO | gunicorn_tab:test_gunicorn:388 - Gunicorn测试线程已启动 +2025-08-29 22:27:43.753 | INFO | threads:run:814 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 22:27:43.753 | INFO | threads:run:828 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 22:27:43.754 | INFO | threads:run:833 - 检查端口8000是否被其他进程占用 +2025-08-29 22:27:43.808 | INFO | threads:run:845 - 端口8000未被占用 +2025-08-29 22:27:43.808 | INFO | threads:run:849 - 执行Gunicorn测试命令: cd /home/xiaji/ && timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.881 | INFO | threads:run:856 - Gunicorn进程检查结果: xiaji 3008 0.0 0.1 5756 1948 ? Ss 22:27 0:00 timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3009 3.3 1.3 35456 23460 ? S 22:27 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3010 6.5 2.5 57116 43036 ? S 22:27 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3011 6.5 2.5 57116 43128 ? S 22:27 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3012 6.7 2.5 57116 43040 ? S 22:27 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3013 6.7 2.5 57116 43132 ? S 22:27 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3014 0.0 0.2 7432 3500 ? Ss 22:27 0:00 bash -c ps aux | grep gunicorn +xiaji 3016 0.0 0.1 6620 2380 ? S 22:27 0:00 grep gunicorn + +2025-08-29 22:27:46.882 | INFO | threads:run:860 - 检测到Gunicorn Worker进程数量: 7 +2025-08-29 22:27:46.882 | WARNING | threads:run:881 - 未检测到Gunicorn主进程 +2025-08-29 22:27:46.882 | INFO | threads:run:884 - 检测到6个Gunicorn Worker进程: +2025-08-29 22:27:46.882 | INFO | threads:run:886 - - Worker PID: 3008, 命令: timeout 10 gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.882 | INFO | threads:run:886 - - Worker PID: 3009, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.883 | INFO | threads:run:886 - - Worker PID: 3010, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.883 | INFO | threads:run:886 - - Worker PID: 3011, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.883 | INFO | threads:run:886 - - Worker PID: 3012, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.883 | INFO | threads:run:886 - - Worker PID: 3013, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:27:46.883 | ERROR | threads:run:896 - Gunicorn进程结构异常: 未检测到完整的进程结构 +2025-08-29 22:27:46.928 | INFO | threads:run:912 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 22:27:46.953 | INFO | threads:run:918 - ss命令检查端口8000结果: tcp LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:(("gunicorn",pid=3013,fd=5),("gunicorn",pid=3012,fd=5),("gunicorn",pid=3011,fd=5)) + +2025-08-29 22:27:46.953 | INFO | threads:run:932 - 端口8000处于LISTEN状态,开始本地请求测试 +2025-08-29 22:27:47.023 | INFO | threads:run:939 - curl本地请求测试退出状态: 7 +2025-08-29 22:27:47.024 | INFO | threads:run:940 - curl本地请求测试输出: +2025-08-29 22:27:47.024 | ERROR | threads:run:958 - Gunicorn进程运行正常,但本地请求失败: +2025-08-29 22:27:47.025 | ERROR | gunicorn_tab:on_test_gunicorn_result:398 - Gunicorn测试失败: Gunicorn进程运行正常,但本地请求失败: +2025-08-29 22:28:56.102 | INFO | __main__::109 - 应用程序启动 +2025-08-29 22:28:56.142 | INFO | remote_command_tab:load_git_config:109 - 从配置文件加载git配置: git_url=http://192.168.3.241:3000/xiaji/webstatus, project_path=/home/xiaji/ +2025-08-29 22:28:56.143 | INFO | django_tab:load_django_path:116 - 从当前服务器配置加载Django路径: /home/xiaji/ +2025-08-29 22:28:56.144 | INFO | django_tab:__init__:22 - Django标签已连接到服务器切换信号 +2025-08-29 22:28:56.145 | INFO | gunicorn_tab:load_gunicorn_config:191 - 从当前服务器配置加载Gunicorn配置: remote_directory=/home/xiaji/, project_name=statuspage +2025-08-29 22:28:56.145 | INFO | gunicorn_tab:__init__:50 - Gunicorn标签已连接到服务器切换信号 +2025-08-29 22:28:58.257 | INFO | threads:run:47 - SSH连接成功: 192.168.3.157 +2025-08-29 22:29:01.524 | INFO | gunicorn_tab:test_gunicorn:374 - 开始测试Gunicorn,Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:29:01.530 | INFO | gunicorn_tab:test_gunicorn:381 - 创建Gunicorn测试线程 +2025-08-29 22:29:01.530 | INFO | threads:__init__:786 - GunicornTestThread初始化 - Django路径: /home/xiaji/, 端口: 8000 +2025-08-29 22:29:01.530 | INFO | gunicorn_tab:test_gunicorn:388 - Gunicorn测试线程已启动 +2025-08-29 22:29:01.619 | INFO | threads:run:814 - 找到wsgi.py文件: /home/xiaji/statuspage/wsgi.py +2025-08-29 22:29:01.620 | INFO | threads:run:828 - 使用项目名: statuspage, 工作目录: /home/xiaji/ +2025-08-29 22:29:01.620 | INFO | threads:run:833 - 检查端口8000是否被其他进程占用 +2025-08-29 22:29:01.675 | INFO | threads:run:845 - 端口8000未被占用 +2025-08-29 22:29:01.676 | INFO | threads:run:849 - 执行Gunicorn测试命令: cd /home/xiaji/ && gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:29:04.746 | INFO | threads:run:856 - Gunicorn进程检查结果: xiaji 3215 3.3 1.3 35456 23456 ? Ss 22:29 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3217 6.5 2.5 57116 43172 ? S 22:29 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3218 6.7 2.5 57116 42960 ? S 22:29 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3222 6.5 2.5 57116 42972 ? S 22:29 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3223 6.6 2.5 57116 43064 ? S 22:29 0:00 /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +xiaji 3224 0.0 0.2 7432 3484 ? Ss 22:29 0:00 bash -c ps aux | grep gunicorn +xiaji 3226 0.0 0.1 6620 2368 ? S 22:29 0:00 grep gunicorn + +2025-08-29 22:29:04.747 | INFO | threads:run:860 - 检测到Gunicorn Worker进程数量: 6 +2025-08-29 22:29:04.748 | WARNING | threads:run:881 - 未检测到Gunicorn主进程 +2025-08-29 22:29:04.748 | INFO | threads:run:884 - 检测到5个Gunicorn Worker进程: +2025-08-29 22:29:04.749 | INFO | threads:run:886 - - Worker PID: 3215, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:29:04.749 | INFO | threads:run:886 - - Worker PID: 3217, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:29:04.749 | INFO | threads:run:886 - - Worker PID: 3218, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:29:04.750 | INFO | threads:run:886 - - Worker PID: 3222, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:29:04.750 | INFO | threads:run:886 - - Worker PID: 3223, 命令: /usr/bin/python3 /usr/local/bin/gunicorn --workers 4 --bind 0.0.0.0:8000 statuspage.wsgi:application --timeout 5 +2025-08-29 22:29:04.750 | ERROR | threads:run:896 - Gunicorn进程结构异常: 未检测到完整的进程结构 +2025-08-29 22:29:04.793 | INFO | threads:run:912 - Gunicorn进程运行正常,开始检查端口8000访问情况 +2025-08-29 22:29:04.809 | INFO | threads:run:918 - ss命令检查端口8000结果: tcp LISTEN 0 2048 0.0.0.0:8000 0.0.0.0:* users:(("gunicorn",pid=3223,fd=5),("gunicorn",pid=3222,fd=5),("gunicorn",pid=3218,fd=5),("gunicorn",pid=3217,fd=5),("gunicorn",pid=3215,fd=5)) + +2025-08-29 22:29:04.810 | INFO | threads:run:932 - 端口8000处于LISTEN状态,开始本地请求测试 +2025-08-29 22:29:04.907 | INFO | threads:run:939 - curl本地请求测试退出状态: 56 +2025-08-29 22:29:04.907 | INFO | threads:run:940 - curl本地请求测试输出: +2025-08-29 22:29:04.908 | ERROR | threads:run:958 - Gunicorn进程运行正常,但本地请求失败: +2025-08-29 22:29:04.908 | ERROR | gunicorn_tab:on_test_gunicorn_result:398 - Gunicorn测试失败: Gunicorn进程运行正常,但本地请求失败: diff --git a/django_tab.py b/django_tab.py index 22799f7..e1c059d 100644 --- a/django_tab.py +++ b/django_tab.py @@ -133,6 +133,18 @@ class DjangoTab(QWidget): # 不显示警告,避免影响用户体验 QMessageBox.warning(self, "警告", f"加载django路径失败: {str(e)}") + def get_password(self): + """从父类获取密码""" + if hasattr(self.parent, 'password_input'): + password = self.parent.password_input.text() + if not password: + QMessageBox.warning(self, "警告", "请输入服务器密码") + return None + return password + else: + QMessageBox.warning(self, "警告", "无法获取服务器密码") + return None + def check_ssh_connection(self): if not self.parent or not self.parent.ssh_client: QMessageBox.warning(self, "警告", "请先连接服务器") @@ -143,12 +155,17 @@ class DjangoTab(QWidget): if not self.check_ssh_connection(): return + # 获取密码 + password = self.get_password() + if password is None: + return + self.output_text.append("正在安装Django...") self.install_django_btn.setEnabled(False) self.progress_bar.setVisible(True) self.progress_bar.setValue(0) - self.django_install_thread = DjangoInstallThread(self.parent.ssh_client) + self.django_install_thread = DjangoInstallThread(self.parent.ssh_client, password) self.django_install_thread.progress_updated.connect(self.update_progress) self.django_install_thread.result_ready.connect(self.on_install_django_result) self.django_install_thread.start() diff --git a/gunicorn_tab.py b/gunicorn_tab.py index 54193d2..b0a06fb 100644 --- a/gunicorn_tab.py +++ b/gunicorn_tab.py @@ -240,9 +240,8 @@ WorkingDirectory={project_path} # 所有Gunicorn参数直接在这里配置 ExecStart=/usr/local/bin/gunicorn \\ --bind 0.0.0.0:8000 \\ - --workers 3 \\ + --workers 4 \\ --worker-class sync \\ - --timeout 60 \\ --name {project_name} \\ --access-logfile {project_path}/logs/gunicorn_access.log \\ --error-logfile {project_path}/logs/gunicorn_error.log \\ @@ -280,10 +279,9 @@ Group={username} WorkingDirectory={project_path} # 所有Gunicorn参数直接在这里配置 ExecStart=/usr/local/bin/gunicorn \\ - --bind 127.0.0.1:{port} \\ - --workers $(nproc --all * 2 + 1) \\ + --bind 0.0.0.0:{port} \\ + --workers 4 \\ --worker-class sync \\ - --timeout 60 \\ --name {project_name} \\ --access-logfile {project_path}/logs/gunicorn_access.log \\ --error-logfile {project_path}/logs/gunicorn_error.log \\ diff --git a/remote_command_tab.py b/remote_command_tab.py index 5434e91..845cf2b 100644 --- a/remote_command_tab.py +++ b/remote_command_tab.py @@ -210,10 +210,15 @@ class RemoteCommandTab(QWidget): if not self.check_ssh_connection(): return + # 获取密码 + password = self.get_password() + if password is None: + return + self.output_text.append("正在设置时区为Asia/Shanghai并重启服务器...") self.set_timezone_btn.setEnabled(False) - self.timezone_thread = SetTimezoneAndRestartThread(self.parent.ssh_client) + self.timezone_thread = SetTimezoneAndRestartThread(self.parent.ssh_client, password) self.timezone_thread.result_ready.connect(self.on_set_timezone_and_restart_result) self.timezone_thread.start() @@ -230,10 +235,15 @@ class RemoteCommandTab(QWidget): if not self.check_ssh_connection(): return + # 获取密码 + password = self.get_password() + if password is None: + return + self.output_text.append("正在检查防火墙状态...") self.check_firewall_btn.setEnabled(False) - self.firewall_thread = CheckFirewallThread(self.parent.ssh_client) + self.firewall_thread = CheckFirewallThread(self.parent.ssh_client, password) self.firewall_thread.result_ready.connect(self.on_check_firewall_result) self.firewall_thread.start() @@ -254,11 +264,16 @@ class RemoteCommandTab(QWidget): if not port: QMessageBox.warning(self, "警告", "请输入要开放的端口号") return + + # 获取密码 + password = self.get_password() + if password is None: + return self.output_text.append(f"正在开放端口 {port}...") self.open_port_btn.setEnabled(False) - self.open_port_thread = OpenPortThread(self.parent.ssh_client, port) + self.open_port_thread = OpenPortThread(self.parent.ssh_client, port, password) self.open_port_thread.result_ready.connect(self.on_open_port_result) self.open_port_thread.start() @@ -271,6 +286,19 @@ class RemoteCommandTab(QWidget): self.output_text.append(f"端口开放失败: {message}") logger.error(f"端口开放失败: {message}") + def get_password(self): + """获取服务器连接密码""" + if not self.parent or not hasattr(self.parent, 'password_input'): + QMessageBox.warning(self, "警告", "无法获取服务器密码") + return None + + password = self.parent.password_input.text() + if not password: + QMessageBox.warning(self, "警告", "请先输入服务器密码") + return None + + return password + def check_ssh_connection(self): if not self.parent or not self.parent.ssh_client: QMessageBox.warning(self, "警告", "请先连接服务器") diff --git a/threads.py b/threads.py index c692706..b1a839f 100644 --- a/threads.py +++ b/threads.py @@ -196,14 +196,15 @@ class DeleteDirectoryThread(QThread): class SetTimezoneAndRestartThread(QThread): result_ready = Signal(bool, str) - def __init__(self, ssh_client): + def __init__(self, ssh_client, password): super().__init__() self.ssh_client = ssh_client + self.password = password def run(self): try: - # 设置时区 - stdin, stdout, stderr = self.ssh_client.exec_command("sudo timedatectl set-timezone Asia/Shanghai") + # 设置时区,使用-S选项从标准输入读取密码 + stdin, stdout, stderr = self.ssh_client.exec_command(f"echo '{self.password}' | sudo -S timedatectl set-timezone Asia/Shanghai") exit_status = stdout.channel.recv_exit_status() if exit_status != 0: @@ -212,8 +213,8 @@ class SetTimezoneAndRestartThread(QThread): logger.error(f"设置时区失败: {error}") return - # 重启服务器 - stdin, stdout, stderr = self.ssh_client.exec_command("sudo reboot") + # 重启服务器,使用-S选项从标准输入读取密码 + stdin, stdout, stderr = self.ssh_client.exec_command(f"echo '{self.password}' | sudo -S reboot") self.result_ready.emit(True, "时区设置成功,服务器正在重启") logger.info("时区设置成功,服务器正在重启") @@ -227,14 +228,15 @@ class SetTimezoneAndRestartThread(QThread): class CheckFirewallThread(QThread): result_ready = Signal(bool, str) - def __init__(self, ssh_client): + def __init__(self, ssh_client, password): super().__init__() self.ssh_client = ssh_client + self.password = password def run(self): try: - # 检查UFW状态 - stdin, stdout, stderr = self.ssh_client.exec_command("sudo ufw status") + # 检查UFW状态,使用-S选项从标准输入读取密码 + stdin, stdout, stderr = self.ssh_client.exec_command(f"echo '{self.password}' | sudo -S ufw status") exit_status = stdout.channel.recv_exit_status() if exit_status == 0: @@ -255,20 +257,21 @@ class CheckFirewallThread(QThread): class OpenPortThread(QThread): result_ready = Signal(bool, str) - def __init__(self, ssh_client, port): + def __init__(self, ssh_client, port, password): super().__init__() self.ssh_client = ssh_client self.port = port + self.password = password def run(self): try: - # 开放端口 - stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo ufw allow {self.port}") + # 开放端口,使用-S选项从标准输入读取密码 + stdin, stdout, stderr = self.ssh_client.exec_command(f"echo '{self.password}' | sudo -S ufw allow {self.port}") exit_status = stdout.channel.recv_exit_status() if exit_status == 0: - # 重新加载防火墙 - stdin, stdout, stderr = self.ssh_client.exec_command("sudo ufw reload") + # 重新加载防火墙,使用-S选项从标准输入读取密码 + stdin, stdout, stderr = self.ssh_client.exec_command(f"echo '{self.password}' | sudo -S ufw reload") self.result_ready.emit(True, f"端口 {self.port} 开放成功") logger.info(f"端口 {self.port} 开放成功") @@ -287,9 +290,10 @@ class DjangoInstallThread(QThread): result_ready = Signal(bool, str) progress_updated = Signal(int) - def __init__(self, ssh_client): + def __init__(self, ssh_client, password): super().__init__() self.ssh_client = ssh_client + self.password = password def run(self): try: @@ -320,8 +324,8 @@ class DjangoInstallThread(QThread): self.progress_updated.emit(50) - # 如果pip安装失败,尝试使用apt安装 - stdin, stdout, stderr = self.ssh_client.exec_command("sudo apt update && sudo apt install -y python3-django") + # 如果pip安装失败,尝试使用apt安装,使用-S选项从标准输入读取密码 + stdin, stdout, stderr = self.ssh_client.exec_command(f"echo '{self.password}' | sudo -S apt update && echo '{self.password}' | sudo -S apt install -y python3-django") exit_status = stdout.channel.recv_exit_status() if exit_status == 0: @@ -392,9 +396,58 @@ class DjangoTestThread(QThread): output = stdout.read().decode() if "manage.py runserver" in output: - self.progress_updated.emit(100) - self.result_ready.emit(True, "Django测试服务器启动成功") - logger.info("Django测试服务器启动成功") + self.progress_updated.emit(80) + logger.info("Django测试服务器启动成功,开始检查端口访问情况") + + # 检查8000端口是否真的在监听 + self.progress_updated.emit(85) + stdin, stdout, stderr = self.ssh_client.exec_command("ss -tulnp | grep 8000") + ss_output = stdout.read().decode() + logger.info(f"ss命令检查端口8000结果: {ss_output}") + + # 如果ss命令没有结果,尝试使用netstat + if not ss_output: + stdin, stdout, stderr = self.ssh_client.exec_command("netstat -tulnp | grep 8000") + netstat_output = stdout.read().decode() + logger.info(f"netstat命令检查端口8000结果: {netstat_output}") + port_check_output = netstat_output + else: + port_check_output = ss_output + + # 检查端口是否在LISTEN状态 + if "LISTEN" in port_check_output and "8000" in port_check_output: + self.progress_updated.emit(90) + logger.info("端口8000处于LISTEN状态,开始本地请求测试") + + # 本地发起请求测试 + stdin, stdout, stderr = self.ssh_client.exec_command("curl -s http://127.0.0.1:8000") + curl_output = stdout.read().decode() + curl_exit_status = stdout.channel.recv_exit_status() + + logger.info(f"curl本地请求测试退出状态: {curl_exit_status}") + logger.info(f"curl本地请求测试输出: {curl_output[:200]}..." if len(curl_output) > 200 else f"curl本地请求测试输出: {curl_output}") + + if curl_exit_status == 0: + self.progress_updated.emit(100) + self.result_ready.emit(True, "Django测试服务器启动成功,端口访问正常") + logger.info("Django测试服务器启动成功,端口访问正常") + else: + # 检查错误类型 + if "Failed to connect" in curl_output: + error_msg = "Django测试服务器启动成功,但本地请求超时,Gunicorn进程可能未正常响应" + elif "Bad Request (400)" in curl_output: + error_msg = "Django测试服务器启动成功,但返回400错误,可能是ALLOWED_HOSTS配置问题" + elif "500" in curl_output: + error_msg = "Django测试服务器启动成功,但返回500错误,可能是应用内部错误" + else: + error_msg = f"Django测试服务器启动成功,但本地请求失败: {curl_output[:100]}" + + self.result_ready.emit(False, error_msg) + logger.error(error_msg) + else: + self.progress_updated.emit(100) + self.result_ready.emit(False, "Django测试服务器启动成功,但端口8000未处于LISTEN状态") + logger.error("Django测试服务器启动成功,但端口8000未处于LISTEN状态") else: self.result_ready.emit(False, "Django测试服务器启动失败") logger.error("Django测试服务器启动失败") @@ -776,24 +829,137 @@ class GunicornTestThread(QThread): self.progress_updated.emit(50) - # 测试Gunicorn启动,使用构造函数中传入的端口参数 - test_command = f"cd {self.django_path} && timeout 10 gunicorn --workers 1 --bind 0.0.0.0:{self.port} {project_name}.wsgi:application --timeout 5" + # 在启动Gunicorn前,先检查端口是否被占用 + logger.info(f"检查端口{self.port}是否被其他进程占用") + stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo lsof -i :{self.port}") + lsof_output = stdout.read().decode() + lsof_exit_status = stdout.channel.recv_exit_status() + + if lsof_exit_status == 0 and lsof_output: + logger.warning(f"端口{self.port}已被其他进程占用: {lsof_output}") + # 尝试杀死占用端口的进程 + stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo lsof -t -i :{self.port} | xargs sudo kill -9") + time.sleep(1) # 等待进程被杀死 + logger.info(f"已尝试杀死占用端口{self.port}的进程") + else: + logger.info(f"端口{self.port}未被占用") + + # 测试Gunicorn启动,使用构造函数中传入的端口参数,指定4个worker + test_command = f"cd {self.django_path} && gunicorn --workers 4 --bind 0.0.0.0:{self.port} {project_name}.wsgi:application --timeout 5" logger.info(f"执行Gunicorn测试命令: {test_command}") stdin, stdout, stderr = self.ssh_client.exec_command(test_command) time.sleep(3) # 等待Gunicorn启动 - # 检查Gunicorn是否运行 + # 检查Gunicorn进程状态 stdin, stdout, stderr = self.ssh_client.exec_command("ps aux | grep gunicorn") output = stdout.read().decode() logger.info(f"Gunicorn进程检查结果: {output}") + # 检查Worker进程状态 + worker_count = output.count('gunicorn') - 1 # 减去grep进程本身 + logger.info(f"检测到Gunicorn Worker进程数量: {worker_count}") + + # 详细分析进程结构 + lines = output.strip().split('\n') + master_process = None + worker_processes = [] + + for line in lines: + if 'grep' not in line and 'gunicorn' in line: + parts = line.split() + if len(parts) >= 11: + pid = parts[1] + command = ' '.join(parts[10:]) + if 'master' in command or 'gunicorn: master' in command: + master_process = (pid, command) + elif 'worker' in command: + worker_processes.append((pid, command)) + + if master_process: + logger.info(f"检测到Gunicorn主进程 - PID: {master_process[0]}, 命令: {master_process[1]}") + else: + logger.warning(f"未检测到Gunicorn主进程") + + if worker_processes: + logger.info(f"检测到{len(worker_processes)}个Gunicorn Worker进程:") + for pid, command in worker_processes: + logger.info(f" - Worker PID: {pid}, 命令: {command}") + else: + logger.warning(f"未检测到Gunicorn Worker进程") + + # 检查进程数量是否符合预期(1个主进程+4个worker进程) + if master_process and len(worker_processes) == 4: + logger.info(f"Gunicorn进程结构正常: 1个主进程 + 4个worker进程") + elif master_process and len(worker_processes) > 0: + logger.warning(f"Gunicorn进程结构部分正常: 1个主进程 + {len(worker_processes)}个worker进程(预期4个)") + else: + logger.error(f"Gunicorn进程结构异常: 未检测到完整的进程结构") + + if worker_count < 1: + logger.error(f"Gunicorn主进程存在但Worker进程未启动,可能是Django代码/配置错误") + # 尝试手动启动Gunicorn并获取详细错误日志 + logger.info(f"尝试手动启动Gunicorn以获取详细错误日志") + stdin, stdout, stderr = self.ssh_client.exec_command(f"cd {self.django_path} && gunicorn --workers 4 --bind 0.0.0.0:{self.port} {project_name}.wsgi:application --timeout 5 --error-logfile -") + time.sleep(2) + error_output = stderr.read().decode() + logger.error(f"手动启动Gunicorn错误日志: {error_output}") + # 清理测试进程 stdin, stdout, stderr = self.ssh_client.exec_command(f"pkill -f 'gunicorn.*{self.port}'") if "gunicorn" in output and f":{self.port}" in output: - self.progress_updated.emit(100) - self.result_ready.emit(True, f"Gunicorn测试成功 - 项目: {project_name}, 端口: {self.port}") - logger.info(f"Gunicorn测试成功 - 项目: {project_name}, 端口: {self.port}") + self.progress_updated.emit(80) + logger.info(f"Gunicorn进程运行正常,开始检查端口{self.port}访问情况") + + # 检查端口是否真的在监听 + self.progress_updated.emit(85) + stdin, stdout, stderr = self.ssh_client.exec_command(f"ss -tulnp | grep {self.port}") + ss_output = stdout.read().decode() + logger.info(f"ss命令检查端口{self.port}结果: {ss_output}") + + # 如果ss命令没有结果,尝试使用netstat + if not ss_output: + stdin, stdout, stderr = self.ssh_client.exec_command(f"netstat -tulnp | grep {self.port}") + netstat_output = stdout.read().decode() + logger.info(f"netstat命令检查端口{self.port}结果: {netstat_output}") + port_check_output = netstat_output + else: + port_check_output = ss_output + + # 检查端口是否在LISTEN状态 + if "LISTEN" in port_check_output and f":{self.port}" in port_check_output: + self.progress_updated.emit(90) + logger.info(f"端口{self.port}处于LISTEN状态,开始本地请求测试") + + # 本地发起请求测试 + stdin, stdout, stderr = self.ssh_client.exec_command(f"curl -s http://127.0.0.1:{self.port}") + curl_output = stdout.read().decode() + curl_exit_status = stdout.channel.recv_exit_status() + + logger.info(f"curl本地请求测试退出状态: {curl_exit_status}") + logger.info(f"curl本地请求测试输出: {curl_output[:200]}..." if len(curl_output) > 200 else f"curl本地请求测试输出: {curl_output}") + + if curl_exit_status == 0: + self.progress_updated.emit(100) + self.result_ready.emit(True, f"Gunicorn测试成功 - 项目: {project_name}, 端口: {self.port}, 访问正常") + logger.info(f"Gunicorn测试成功 - 项目: {project_name}, 端口: {self.port}, 访问正常") + else: + # 检查错误类型 + if "Failed to connect" in curl_output: + error_msg = f"Gunicorn进程运行正常,但本地请求超时,端口{self.port}未响应" + elif "Bad Request (400)" in curl_output: + error_msg = f"Gunicorn进程运行正常,但返回400错误,可能是ALLOWED_HOSTS配置问题" + elif "500" in curl_output: + error_msg = f"Gunicorn进程运行正常,但返回500错误,可能是应用内部错误" + else: + error_msg = f"Gunicorn进程运行正常,但本地请求失败: {curl_output[:100]}" + + self.result_ready.emit(False, error_msg) + logger.error(error_msg) + else: + self.progress_updated.emit(100) + self.result_ready.emit(False, f"Gunicorn进程运行正常,但端口{self.port}未处于LISTEN状态") + logger.error(f"Gunicorn进程运行正常,但端口{self.port}未处于LISTEN状态") else: # 尝试更简单的测试方式 self.progress_updated.emit(80) @@ -1040,9 +1206,131 @@ class ManageGunicornServiceThread(QThread): port = "8000" # 默认端口 if hasattr(self, 'port') and self.port: port = self.port - stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo netstat -tlnp | grep :{port}") - netstat_output = stdout.read().decode() - logger.info(f"端口{port}监听状态: {netstat_output}") + + # 在检查端口监听前,先检查端口占用情况 + logger.info(f"检查端口{port}占用情况") + stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo lsof -i :{port}") + lsof_output = stdout.read().decode() + lsof_exit_status = stdout.channel.recv_exit_status() + + if lsof_exit_status == 0 and lsof_output: + logger.warning(f"端口{port}被占用: {lsof_output}") + else: + logger.info(f"端口{port}未被占用") + + # 检查Gunicorn进程状态 + stdin, stdout, stderr = self.ssh_client.exec_command("ps aux | grep gunicorn") + ps_output = stdout.read().decode() + logger.info(f"Gunicorn进程状态: {ps_output}") + + # 详细分析进程结构 + lines = ps_output.strip().split('\n') + master_process = None + worker_processes = [] + + for line in lines: + if 'grep' not in line and 'gunicorn' in line: + parts = line.split() + if len(parts) >= 11: + pid = parts[1] + command = ' '.join(parts[10:]) + if 'master' in command or 'gunicorn: master' in command: + master_process = (pid, command) + elif 'worker' in command: + worker_processes.append((pid, command)) + + if master_process: + logger.info(f"检测到Gunicorn主进程 - PID: {master_process[0]}, 命令: {master_process[1]}") + else: + logger.warning(f"未检测到Gunicorn主进程") + + if worker_processes: + logger.info(f"检测到{len(worker_processes)}个Gunicorn Worker进程:") + for pid, command in worker_processes: + logger.info(f" - Worker PID: {pid}, 命令: {command}") + else: + logger.warning(f"未检测到Gunicorn Worker进程") + + # 检查进程数量是否符合预期(1个主进程+4个worker进程) + if master_process and len(worker_processes) == 4: + logger.info(f"Gunicorn进程结构正常: 1个主进程 + 4个worker进程") + elif master_process and len(worker_processes) > 0: + logger.warning(f"Gunicorn进程结构部分正常: 1个主进程 + {len(worker_processes)}个worker进程(预期4个)") + else: + logger.error(f"Gunicorn进程结构异常: 未检测到完整的进程结构") + + # 检查Worker进程状态 + worker_count = ps_output.count('gunicorn') - 1 # 减去grep进程本身 + logger.info(f"检测到Gunicorn Worker进程数量: {worker_count}") + + if worker_count < 1: + logger.error(f"Gunicorn主进程存在但Worker进程未启动,可能是Django代码/配置错误") + + # 使用ss命令检查端口监听状态 + stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo ss -tulnp | grep :{port}") + ss_output = stdout.read().decode() + logger.info(f"ss命令检查端口{port}监听状态: {ss_output}") + + # 如果ss命令没有结果,尝试使用netstat + if not ss_output: + stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo netstat -tlnp | grep :{port}") + netstat_output = stdout.read().decode() + logger.info(f"netstat命令检查端口{port}监听状态: {netstat_output}") + port_check_output = netstat_output + else: + port_check_output = ss_output + + # 检查端口是否在LISTEN状态 + if "LISTEN" in port_check_output and f":{port}" in port_check_output: + logger.info(f"端口{port}处于LISTEN状态,开始本地请求测试") + + # 本地发起请求测试 + stdin, stdout, stderr = self.ssh_client.exec_command(f"curl -s http://127.0.0.1:{port}") + curl_output = stdout.read().decode() + curl_exit_status = stdout.channel.recv_exit_status() + + logger.info(f"curl本地请求测试退出状态: {curl_exit_status}") + logger.info(f"curl本地请求测试输出: {curl_output[:200]}..." if len(curl_output) > 200 else f"curl本地请求测试输出: {curl_output}") + + if curl_exit_status == 0: + logger.info(f"服务启动成功,端口{port}访问正常") + else: + # 检查错误类型 + if "Failed to connect" in curl_output: + logger.warning(f"服务启动成功,但本地请求超时,端口{port}未响应") + elif "Bad Request (400)" in curl_output: + logger.warning(f"服务启动成功,但返回400错误,可能是ALLOWED_HOSTS配置问题") + elif "500" in curl_output: + logger.warning(f"服务启动成功,但返回500错误,可能是应用内部错误") + else: + logger.warning(f"服务启动成功,但本地请求失败: {curl_output[:100]}") + else: + logger.warning(f"服务启动成功,但端口{port}未处于LISTEN状态") + + # 检查SELinux状态 + logger.info(f"检查SELinux状态") + stdin, stdout, stderr = self.ssh_client.exec_command("getenforce") + selinux_output = stdout.read().decode().strip() + logger.info(f"SELinux状态: {selinux_output}") + + if selinux_output == "Enforcing": + logger.warning(f"SELinux处于Enforcing状态,可能限制了端口绑定") + + # 检查项目目录权限 + logger.info(f"检查项目目录权限") + stdin, stdout, stderr = self.ssh_client.exec_command("ls -ld /home/xiaji/") + home_dir_output = stdout.read().decode().strip() + logger.info(f"/home/xiaji/目录权限: {home_dir_output}") + + # 尝试更换端口测试 + logger.info(f"尝试更换端口测试") + test_port = "8001" + stdin, stdout, stderr = self.ssh_client.exec_command(f"sudo ss -tulnp | grep :{test_port}") + test_port_output = stdout.read().decode() + + if not test_port_output: + logger.info(f"端口{test_port}未被占用,尝试用该端口启动Gunicorn") + # 这里只是记录日志,不实际更换端口 else: logger.warning(f"服务启动后状态检查失败: {status_error}")