我们正在尝试使用apigeetool deploynodeapp实用程序将node.js应用程序部署到apigee。
我们认为我们正在按照说明正确操作,但每次尝试都会出现“破管”错误。
我们正在运行的命令是......
apigeetool deploynodeapp -n sampleService -d . -m server.js -o ourOrgNameHere -e test -b sample -u ourUserName -p ourPassword
显然,ourOrgNameHere,ourUserName和ourPassword不是我们真正使用的值。
当我们从命令行运行时,暂停20秒,然后是下面的输出......
Traceback (most recent call last):
File "/usr/local/bin/apigeetool", line 24, in <module>
deploynodeapp.run()
File "/Library/Python/2.7/site-packages/ApigeePlatformTools/deploynodeapp.py", line 180, in run
revision = deploytools.importBundle(Organization, Name, tf.getvalue())
File "/Library/Python/2.7/site-packages/ApigeePlatformTools/deploytools.py", line 115, in importBundle
resp = httptools.httpCall('POST', uri, hdrs, data)
File "/Library/Python/2.7/site-packages/ApigeePlatformTools/httptools.py", line 24, in httpCall
conn.request(verb, uri, body, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 973, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1007, in _send_request
self.endheaders(body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 969, in endheaders
self._send_output(message_body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 829, in _send_output
self.send(msg)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 805, in send
self.sock.sendall(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 229, in sendall
v = self.send(data[count:])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 198, in send
v = self._sslobj.write(data)
非常感谢任何帮助。
答案 0 :(得分:0)
您不必告诉Apigee有关Node模块的依赖关系。在项目上传到Apigee Edge之后,apigeetool实用程序(默认情况下)应该自动解析Node.js依赖项(就像在Edge本身上运行npm install一样)。
有些用户发现如果由于某种原因导致失败,那么如果您使用这样的--upload-modules选项,它就会起作用:
apigeetool deploynodeapp --upload-modules
upload-modules标志告诉工具压缩并上传系统中的所有模块(而不是尝试在Edge上更新它们)。只要您的Node.js在本地工作,它就应该在您部署它时起作用。尝试使用--upload-modules来查看它是否适合您。