EA31337 / EA-Tester

šŸ³šŸ“ˆ Headless Forex backtesting for MetaTrader platform using Docker
https://ea31337.github.io/EA-Tester
MIT License
109 stars 84 forks source link

XIO error 11on X server ":0" #213

Open wariokart opened 3 years ago

wariokart commented 3 years ago

Hi,

Thanks for making this amazing library.

I'm trying a very clean and standard test. I tested both on my Mac (Big Sur) and an Ubuntu server (v20.04).

docker run ea31337/ea-tester run_backtest -v -e https://github.com/EA31337/EA31337/releases/download/v1.079/EA31337-Lite-v1.079.ex4

....
....
....
ACCOUNT: Time: 2019.01.04 00:00:00; Balance: $10000.00; Equity: $10000.00; Credit: $0.00; Margin Used/Free: $0.00/$10000.00; Risk: 1.0;

INFO: Copying report files (/home/ubuntu/.wine/drive_c/MetaTrader 4/tester/EA31337-Lite-v1.079-Report* into: /opt/results)...
'/home/ubuntu/.wine/drive_c/MetaTrader 4/tester/EA31337-Lite-v1.079-Report.gif' -> '/opt/results/EA31337-Lite-v1.079-Report.gif'
'/home/ubuntu/.wine/drive_c/MetaTrader 4/tester/EA31337-Lite-v1.079-Report.htm' -> '/opt/results/EA31337-Lite-v1.079-Report.htm'
'/home/ubuntu/.wine/drive_c/MetaTrader 4/tester/logs/20210104.log' -> '/opt/results/EA31337-Lite-v1.079-Report.log'
/home/ubuntu/.wine/drive_c/MetaTrader 4/tester/files/EURUSD-10000USD-2019.01.04-2019.01.30-10spread-M30-report.txt
'/home/ubuntu/.wine/drive_c/MetaTrader 4/tester/files/EURUSD-10000USD-2019.01.04-2019.01.30-10spread-M30-report.txt' -> '/opt/results/EURUSD-10000USD-2019.01.04-2019.01.30-10spread-M30-report.txt'
Backtest results for EA31337-Lite-v1.079: PF:0.29/EP:-9.58/DD:15.30%, Deposit:10000/Profit:-1466/Spread:10; EURUSD (M30)(2019.01.01-2019.01.31)
Xvfb killed (pid 273)
0m0.031s 0m0.038s
0m52.920s 0m22.053s
INFO: /opt/scripts/run_backtest.sh done.
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 193 requests (193 known processed) with 0 events remaining.
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Exiting /opt/scripts/run_backtest.sh with 0

I'm unsure why this is happening, are there any other requirements other than Docker CE?

kenorb commented 3 years ago

These errors are coming from Xvfb which may be not 100% compatible with a Docker container. You can silence them, but it won't change anything (they're still going to happen in the background). The final exit status is 0, so it doesn't make any difference.

The tester rely on these external libraries and doesn't have really anything to do with these.

Possibly related: https://stackoverflow.com/q/25790890/55075

As for the workaround, you can redirect the stderr to some file.