【发布时间】:2011-04-11 20:29:17
【问题描述】:
我的 Django 应用程序在 Apache 上部署时停止工作(使用 mod_wsgi )。 它在 Windows 服务器上运行。该应用程序调用名为“rex”(Alchemy Remote Executor)的 Windows 可执行文件,该可执行文件在另一个远程 Windows 框上执行命令。
process = subprocess.Popen( ['rex',ip,usr,pwd,command], stdout=subprocess.PIPE, universal_newlines=True )
out, err = process.communicate()
这一切在开发中都可以正常工作,但是当使用 mod_wsgi 部署在 Apache 上时,它就不起作用了! "rex" 程序仍然运行,但它没有做它的事情,并给出以下消息:
Failed to execute the program: A specified logon session does not exist. It may already have been terminated.
因此,“rex”程序正在运行,但是当它从 Apache 生成时,它无法建立所需的连接或其他东西。似乎 Apache 在完成之前以某种方式关闭了“rex.exe”建立的连接!
有什么想法吗?
【问题讨论】:
标签: python django apache subprocess mod-wsgi