You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proxy has the following number: 172.x.0.2. (Freqtrade I cannot know, continue reading and you will know why)
I can reach the internet using docker exec -it <container_name> ping google.com, but I cannot reach a proxy created using binance-proxy although I can ping it, neither I cannot httping it nor from the host machine or from freqtrade container.
I already tried several things but I cannot see where is the problem...
I used docker inspect and docker network inspect, also I tried to execute docker exec -it ... /bin/bash to check ifconfig and iptables without luck, ping works correctly:
It's working for only the first bot, I don't know if I used a command before to enable networking (on the first bot, because it works)
I don't know why I can't ping on the docker container but at least the proxy is reaching google DNS.
Also I tried static IPs without luck because gateway was missing on the docker inspect command:
This is how I run it:
#!/bin/bashcd /mnt/e/Python/freqtrade-docker/bot_2
docker run -w="/mnt/e/Python/freqtrade-docker/bot_2" -d --name proxy_2 --net bot_2 -p 8092:8092 nightshift2k/binance-proxy:latest
docker-compose up -d
This is my docker-compose.yml file:
---
version: '3'services:
freqtrade:
image: freqtradeorg/freqtrade:stablerestart: unless-stoppedcontainer_name: freqtrade_2volumes:
- "./user_data:/freqtrade/user_data"# Expose api on port 8082 (localhost only)# Please read the https://www.freqtrade.io/en/stable/rest-api/ documentation# before enabling this.ports:
- "127.0.0.1:8082:8082"# - "0.0.0.0:8082:8082"networks:
- default# Default command used when running `docker compose up`command: > trade --logfile /freqtrade/user_data/logs/freqtrade.log --db-url sqlite:////freqtrade/user_data/tradesv3.sqlite --config /freqtrade/user_data/config.json --strategy xxx
networks:
default:
external: true
name: bot_2
This is my docker-compose.yml for the bot... I also tried networks, 0.0.0.0 with http://172.x.0.2:8092/api/v3 instead of using localhost ip (127.0.0.1)
And also I configured correctly Freqtrade config as stated here:
Maybe the problem is with the proxy, but I cannot debug correctly the bot because it's ending every time it tries to connect...
(Just see what does on the status column)
This exception causes the program to crash and restart:
Is there any way to prevent the bot to restart every time it fails?
Also, what can I try more to see where is the problem? Because I have one bot working but the other ones cannot start and the config I'm using is the same. So what's going here?
I inspected the two proxy + freqtrade containers and I don't find any differences...
The only thing is that when I change the cctx json config to the gateway IP it's not having any problems (in the first bot) (in this case 172.x.0.1:809x/api/v3). But in the rest of the bots I'm having this error:
But if I do the same on the second bot, I'm having this other problem: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
The text was updated successfully, but these errors were encountered:
z3nth10n
changed the title
Having issues to configure binancy-proxy over freqtrade in docker? (Docker networking problems)
Having issues to configure binance-proxy over freqtrade in docker? (Docker networking problems)
Nov 30, 2021
pnmice
pushed a commit
to pnmice/binance-proxy
that referenced
this issue
Jan 31, 2022
Describe your environment
python -V
)pip freeze | grep ccxt
)freqtrade -V
ordocker-compose run --rm freqtrade -V
for Freqtrade running in docker)Your question
Well, I'm trying to understand docker networking, because I'm having problems communicating two services (freqtrade + binance-proxy) without luck...
I created two containers for this, the proxy with a static IP. The gateways are the following ones:
The proxy has the following number:
172.x.0.2
. (Freqtrade I cannot know, continue reading and you will know why)I can reach the internet using
docker exec -it <container_name> ping google.com
, but I cannot reach a proxy created usingbinance-proxy
although I can ping it, neither I cannothttping
it nor from the host machine or fromfreqtrade
container.I already tried several things but I cannot see where is the problem...
I used
docker inspect
anddocker network inspect
, also I tried to executedocker exec -it ... /bin/bash
to checkifconfig
andiptables
without luck,ping
works correctly:It's working for only the first bot, I don't know if I used a command before to enable networking (on the first bot, because it works)
I don't know why I can't ping on the docker container but at least the proxy is reaching google DNS.
Also I tried static IPs without luck because gateway was missing on the
docker inspect
command:This is how I run it:
This is my
docker-compose.yml
file:This is my docker-compose.yml for the bot... I also tried
networks
,0.0.0.0
withhttp://172.x.0.2:8092/api/v3
instead of using localhost ip (127.0.0.1
)And also I configured correctly Freqtrade config as stated here:
Maybe the problem is with the proxy, but I cannot debug correctly the bot because it's ending every time it tries to connect...
(Just see what does on the status column)
This exception causes the program to crash and restart:
Is there any way to prevent the bot to restart every time it fails?
Also, what can I try more to see where is the problem? Because I have one bot working but the other ones cannot start and the config I'm using is the same. So what's going here?
I inspected the two proxy + freqtrade containers and I don't find any differences...
configs.zip
The only thing is that when I change the cctx json config to the gateway IP it's not having any problems (in the first bot) (in this case
172.x.0.1:809x/api/v3
). But in the rest of the bots I'm having this error:But if I do the same on the second bot, I'm having this other problem:
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
The text was updated successfully, but these errors were encountered: