freqtrade / frequi

Freqtrade UI - Frontend for Freqtrade
https://github.com/freqtrade/freqtrade
GNU General Public License v3.0
597 stars 269 forks source link

multiple bots - frequi is accessible only on the first one #284

Closed aristosv closed 3 years ago

aristosv commented 3 years ago

Describe the bug freqUI cannot present web gui if "listen_port" is other than 8080.

To Reproduce Steps to reproduce the behavior: Set up multiple bots on the same server and define different ports on the "listen_port" value for "api_server".

Desktop (please complete the following information):

Additional context

I've set up 3 bots on the same server, each one with it's own "listen_port", but only the first one works. The others are inaccessible.

    "api_server": {
        "enabled": true,
        "listen_ip_address": "$ip",
        "listen_port": 8080,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "$secretkey",
        "CORS_origins": [],
        "username": "$user",
        "password": "$pass"

    "api_server": {
        "enabled": true,
        "listen_ip_address": "$ip",
        "listen_port": 8081,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "$secretkey",
        "CORS_origins": [],
        "username": "$user",
        "password": "$pass"

    "api_server": {
        "enabled": true,
        "listen_ip_address": "$ip",
        "listen_port": 8082,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "$secretkey",
        "CORS_origins": [],
        "username": "$user",
        "password": "$pass"
xmatthias commented 3 years ago

how are you running frequi? via the freqtrade integration (served from freqtrade)? installed directly and running with yarn serve?

aristosv commented 3 years ago

via the freqtrade integration (served from freqtrade)

This is how I install it for each bot.

source .env/bin/activate
freqtrade install-ui
deactivate
xmatthias commented 3 years ago

How are you accessing it? what exactly is the error?

i've just tried, and accessing both localhost:8081 and localhost:8082 works flawlessly for me. Obviously, you'll need to be careful using the correct IP to login for the correct bot.

aristosv commented 3 years ago

I am accessing them all through Safari on my computer. This is the error. Greenshot 2021-03-03 20 25 26

The firewall allows connections from my IP only, to those ports only. Greenshot 2021-03-03 20 23 25

And these are the URLs I use to connect Greenshot 2021-03-03 20 22 04

I tried from my phone also, but it's the same result. It's the same IP for all the bots since they are all on the same server. The strange thing is that the first bot on port 8080 works fine.

aristosv commented 3 years ago

I just changed the port to one of the bots to 65534 and now it's accessible. It probably has to do something with the host limitations. Sorry for the trouble, closing this now.

xmatthias commented 3 years ago

strange ... but yeah, it's possible that 8081 is somehow a reserved port (used by another application for something else) - or at least reserved for that.

i guess it'll depend on the system / what you've got running there.