I have been trying for a while to get the REST or Socket servers going to no avail. I have changed the config.yaml (from the KeiffBot) by adding a port number (8989 for example) and even changed the IP to 127.0.0.1 from 0.0.0.0 but none of that seem to have an effect on the result.
I am on Ubuntu Linux if that helps.
Expected Behavior
The server should start.
Current Behavior
It keeps using http://0.0.0.0:80 which is as menioned not available.
Here is the output from the attempt to start the server
Initiating Sanic REST Service...
Loading, please wait...
No bot root argument set, defaulting to [config/xnix]
sanic Client running on http://0.0.0.0:80
Healthcheck now running as part of REST Service...
sanic Client running in http mode, careful now !
[2020-06-26 10:38:10 +1000] [11956] [INFO] Goin' Fast @ http://0.0.0.0:80
[2020-06-26 10:38:10 +1000] [11956] [ERROR] Experienced exception while trying to serve
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 1172, in run
serve_multiple(server_settings, workers)
File "/usr/local/lib/python3.6/dist-packages/sanic/server.py", line 915, in serve_multiple
sock.bind((server_settings["host"], server_settings["port"]))
OSError: [Errno 98] Address already in use
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/programy/clients/restful/sanic/client.py", line 103, in <module>
REST_CLIENT.run(APP)
File "/usr/local/lib/python3.6/dist-packages/programy/clients/restful/sanic/client.py", line 78, in run
workers=self.configuration.client_configuration.workers)
File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 1172, in run
serve_multiple(server_settings, workers)
File "/usr/local/lib/python3.6/dist-packages/sanic/server.py", line 915, in serve_multiple
sock.bind((server_settings["host"], server_settings["port"]))
OSError: [Errno 98] Address already in use
Possible Solution
For it to actually check the config file for this? It seems anything I do in there doesn't change anything for the server configs for some reason. In fact I remember changing the prompt but that didn't change anything
Edit: Prompts do change when changed now. No idea why it didn't before. But the issue still remains.
Steps to Reproduce
Download the Rosie bot for example with python3 -m programy.admin.tool download rosie-y
Change the config.yaml in config/xnix and add port: 8989 and change the IP to host: 127.0.0.1. (You can even change the CLI prompt to check if these changes are happening and run the CLI version. I initially just assumed this was a small bug).
Start the server with sudo python3 -m programy.clients.restful.sanic.client --config config/xnix/config.yaml --cformat yaml --logging config/xnix/logging.yaml
And thus it will fail to start
Context (Environment)
I am trying to find a way to communicate with the bot from another program and http local server seems to be the best way to do it/
Version of Program-y: (how do I find out? the admin tool doesn't seem to have the option. I recently installed it so should be the latest version?
Name and Version of Bot: rosie-y
Version of Python: Python 3.6.9
Operating System ( inc Version ): Ubuntu 18.04
Detailed Description
I think I've detailed it pretty well above.
Possible Implementation
Maybe this is to do with not reading the config file?
Hi all,
I have been trying for a while to get the REST or Socket servers going to no avail. I have changed the config.yaml (from the KeiffBot) by adding a port number (8989 for example) and even changed the IP to 127.0.0.1 from 0.0.0.0 but none of that seem to have an effect on the result.
I am on Ubuntu Linux if that helps.
Expected Behavior
The server should start.
Current Behavior
It keeps using http://0.0.0.0:80 which is as menioned not available. Here is the output from the attempt to start the server
Possible Solution
For it to actually check the config file for this? It seems anything I do in there doesn't change anything for the server configs for some reason. In fact I remember changing the prompt but that didn't change anything Edit: Prompts do change when changed now. No idea why it didn't before. But the issue still remains.
Steps to Reproduce
python3 -m programy.admin.tool download rosie-y
port: 8989
and change the IP tohost: 127.0.0.1
. (You can even change the CLI prompt to check if these changes are happening and run the CLI version. I initially just assumed this was a small bug).sudo python3 -m programy.clients.restful.sanic.client --config config/xnix/config.yaml --cformat yaml --logging config/xnix/logging.yaml
Context (Environment)
I am trying to find a way to communicate with the bot from another program and http local server seems to be the best way to do it/
Detailed Description
I think I've detailed it pretty well above.
Possible Implementation
Maybe this is to do with not reading the config file?