zhayujie / bot-on-anything

Connect AI models (like ChatGPT-3.5/4.0, Baidu Yiyan, New Bing, Bard) to apps (like Wechat, public account, DingTalk, Telegram, QQ). 将 ChatGPT、必应、文心一言、谷歌Bard 等对话模型连接各类应用,如微信、公众号、QQ、Telegram、Gmail、Slack、Web、企业微信、飞书、钉钉等。
MIT License
3.87k stars 906 forks source link

微信服务号在Azure上部署,SSH段80端口无法监听 #356

Open jinskanna opened 1 year ago

jinskanna commented 1 year ago

Load config success [INFO][2023-05-01 12:32:24][plugin_registry.py:23] - Plugin Selector_v0.1 registered [INFO][2023-05-01 12:32:24][log.py:32] - [Selector] inited [WARNING][2023-05-01 12:32:24][log.py:39] - Failed to import plugin createimg Load config success [INFO][2023-05-01 12:32:24][log.py:34] - [MultiChannel] Start up chatgpt on wechat_mp [INFO][2023-05-01 12:32:24][wechat_mp_channel.py:39] - [WX_Public] Wechat Public account service start! Bottle v0.12.25 server starting up (using AutoServer())... Listening on http://0.0.0.0:80/ Hit Ctrl-C to quit.

[ERROR][2023-05-01 12:32:25][log.py:47] - [MultiChannel] Start up failed on wechat_mp: Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied. [ERROR][2023-05-01 12:32:25][log.py:45] - App startup failed! [ERROR][2023-05-01 12:32:25][log.py:50] - Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 1361, in startListening skt.bind(addr) PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "app.py", line 42, in main start_process(channel_type[0], args.config) File "app.py", line 23, in start_process raise e File "app.py", line 20, in start_process channel.startup() File "/home/linyar/bot-on-anything/channel/wechat/wechat_mp_channel.py", line 42, in startup robot.run() File "/home/linyar/.local/lib/python3.8/site-packages/werobot/robot.py", line 686, in run self.wsgi.run(server=server, host=host, port=port) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 767, in run run(self, kwargs) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 3175, in run server.run(app) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 3026, in run return sa(self.host, self.port, self.options).run(handler) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 2930, in run reactor.listenTCP(self.port, factory, interface=self.host) File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 495, in listenTCP p.startListening() File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 1363, in startListening raise CannotListenError(self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied. ^CException ignored in: <module 'threading' from '/usr/lib/python3.8/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 1388, in _shutdown lock.acquire() KeyboardInterrupt: linyar@ChatBotV1:~/bot-on-anything$ python3 app.py Load config success [INFO][2023-05-01 13:10:42][plugin_registry.py:23] - Plugin Selector_v0.1 registered [INFO][2023-05-01 13:10:42][log.py:32] - [Selector] inited [WARNING][2023-05-01 13:10:42][log.py:39] - Failed to import plugin createimg Load config success [INFO][2023-05-01 13:10:42][log.py:34] - [MultiChannel] Start up chatgpt on wechat_mp [INFO][2023-05-01 13:10:42][wechat_mp_channel.py:39] - [WX_Public] Wechat Public account service start! Bottle v0.12.25 server starting up (using AutoServer())... Listening on http://0.0.0.0:80/ Hit Ctrl-C to quit.

[ERROR][2023-05-01 13:10:42][log.py:47] - [MultiChannel] Start up failed on wechat_mp: Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied. [ERROR][2023-05-01 13:10:42][log.py:45] - App startup failed! [ERROR][2023-05-01 13:10:42][log.py:50] - Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 1361, in startListening skt.bind(addr) PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "app.py", line 42, in main start_process(channel_type[0], args.config) File "app.py", line 23, in start_process raise e File "app.py", line 20, in start_process channel.startup() File "/home/linyar/bot-on-anything/channel/wechat/wechat_mp_channel.py", line 42, in startup robot.run() File "/home/linyar/.local/lib/python3.8/site-packages/werobot/robot.py", line 686, in run self.wsgi.run(server=server, host=host, port=port) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 767, in run run(self, kwargs) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 3175, in run server.run(app) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 3026, in run return sa(self.host, self.port, self.options).run(handler) File "/home/linyar/.local/lib/python3.8/site-packages/bottle.py", line 2930, in run reactor.listenTCP(self.port, factory, interface=self.host) File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 495, in listenTCP p.startListening() File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 1363, in startListening raise CannotListenError(self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied.

image AZURE已经打开了80端口

但是依旧无法监听

micerin commented 1 year ago

用sudo python3 app.py, 你的错误是权限不够