浏览器打开工具登录地址跳转其他网页或登录等操作无响应
现象描述
打开浏览器,在地址栏输入https://部署服务器的ip:端口号(例如:https://10.175.34.143:8082)登录时跳转其他界面或者登录等操作无响应。
可能原因
- 系统的8082端口被其他工具占用导致登录时跳转其他网页。
- tool端口被占用导致登录和其他操作无响应。

对于CentOS 6.5/6.9/6.10、RedHat 6.5/6.9/6.10、深之度15.2 x86版本的操作系统,其nginx和gunicorn服务相关命令如下。但是为了达到service异常重启的目的,会通过crond服务不断拉起nginx和gunicorn进程,所以以上系统无法停止nginx和gunicorn服务,理论上不会产生端口占用问题。
service nginx_port stop/start/restart/status
service gunicorn_port stop/start/restart/status
处理步骤

HTTPS默认端口为8082,tool默认端口为7996。
- 使用SSH远程登录工具,进入操作系统命令行界面。
- 执行如下命令关闭应用。
systemctl stop nginx_dep.service
systemctl stop gunicorn_dep.service
- nginx_dep和gunicorn_dep相关服务命令:
systemctl start/stop/restart/status nginx_dep.service
systemctl start/stop/restart/status gunicorn_dep.service
- 如果是在容器中安装工具,启动和停止应用的命令如下(“/opt/depadv”为工具安装目录,请根据实际情况替换):
启动nginx:
sh /opt/depadv/tools/webui/script_dep/service_nginx.sh start "/opt"
启动gunicorn:
cd /opt/depadv/tools/portal
/opt/depadv/tools/venv/bin/python3 /opt/depadv/tools/venv/bin/gunicorn -c dependencydjango/gunicorn-conf.ini dependencydjango.wsgi >/dev/null &
停止nginx:
sh /opt/depadv/tools/webui/script_dep/service_nginx.sh stop "/opt"
停止gunicorn:
kill -9 $(pidof /opt/depadv/tools/venv/bin/python3)
- nginx_dep和gunicorn_dep相关服务命令:
- 执行端口冲突检测脚本。
- 重新打开工具Web界面查看是否能成功登录。
