- 首先发送postman报错:
如果报错:
Unable to round-trip http request to upstream: dial tcp 192.168.1.66:8000: connectex: No connection could be made because the target machine actively refused it.
可能你开了蓝灯等代理软件; 但是这不是主要原因 - 然后发现python启动方式:
python manage.py runserver 0.0.0.0:8000
-
我就觉得这是监听8000端口, 但是项目启动是8081
-
通过curl -v "http://localhost:8081/transformation_api?id=1010&name=2.png&img_1=http://192.168.1.173:8081/guanweidata/change/2021-05-11/1-210511094155803.png&img_2=http://192.168.1.173:8081/guanweidata/change/2021-05-11/2-210511094159147.png&detecttype=transformation_detection"失败
-
通过netstat -antp | grep 8081 显示不正常,就是没有监听8081这个端口
-
通过curl -v "http://localhost:8000/transformation_api?id=1010&name=2.png&img_1=http://192.168.1.173:8081/guanweidata/change/2021-05-11/1-210511094155803.png&img_2=http://192.168.1.173:8081/guanweidata/change/2021-05-11/2-210511094159147.png&detecttype=transformation_detection"成功!
-
算法修改启动,并监听程序启动端口