Python请求+;Azure虚拟机
我使用python请求库在Azure VM(clean ubuntu 12.04)中的两个应用程序(django和ckan)之间进行对话 出现了非常有线的bug。这看起来像是Python请求+;Azure虚拟机,python,django,azure,request,ckan,Python,Django,Azure,Request,Ckan,我使用python请求库在Azure VM(clean ubuntu 12.04)中的两个应用程序(django和ckan)之间进行对话 出现了非常有线的bug。这看起来像是request.post成功发送,但在我的代码运行过程中,我得到了504请求超时时间 Apache2、Nginx和Gunicorn(仅显示超时)日志是干净的。我的CKAN应用程序引发相同的错误,但端口不同: CKAN错误示例1: Exception happened during processing of request
request.post
成功发送,但在我的代码运行过程中,我得到了504请求超时时间
Apache2、Nginx和Gunicorn(仅显示超时)日志是干净的。我的CKAN应用程序引发相同的错误,但端口不同:
CKAN错误示例1:
Exception happened during processing of request from ('127.0.0.1', 53555)
Traceback (most recent call last):
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
self.wfile.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
CKAN错误示例2:
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 53344)
Traceback (most recent call last):
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/httpserver.py", line 1068, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
self.wfile.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
正如您所看到的,端口总是不同的。我的一个想法是——Azure关闭了所有端口,除非您指定要打开哪个端口
我有相同的代码库在本地正常工作 默认情况下,Azure linux虚拟机禁用除22之外的所有端口,以防止来自internet的入站请求。您可以尝试指定Django应用程序的端口,并使用ckan配置另一个VM的端点
另外,您可以参考在apache上部署django应用程序,并将其绑定到VM上的80端口。默认情况下,Azure linux VM禁用除22之外的所有端口,以防止来自internet的入站请求。您可以尝试指定Django应用程序的端口,并使用ckan配置另一个VM的端点
此外,您可以参考在apache上部署django应用程序,并将其绑定到VM上的80端口。是的,默认情况下,Azure linux VM禁用除22之外的所有端口,以防止来自internet的入站请求。您可以尝试指定Django应用程序的端口,并使用ckan配置其他VM的端点。是的,默认情况下,Azure linux VM禁用除22之外的所有端口,以防止来自internet的入站请求。您可以尝试指定Django应用程序的端口,并使用ckan配置另一个VM的端点。