Backtest with download prices does not work
Closed this issue · 2 comments
Hi Ondra,
It seems in the backtest does not work downloading prices (current master), the pop-up window does not appear.
When I hit the button:
I see these logs in nginx:
10.84.20.203 - mmbot [22/Apr/2022:15:09:52 +0200] "GET /api/admin/brokers/bitfinex/pairs/BTC%2FEUR HTTP/1.1" 404 482 "http://mmbot.vie.lan/admin/index.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0"
10.84.20.203 - mmbot [22/Apr/2022:15:09:52 +0200] "GET /api/admin/brokers/bitfinex/pairs/BTC%2FEUR/history HTTP/1.1" 404 482 "http://mmbot.vie.lan/admin/index.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0"
Please try access these URIs directly - not through the proxy. You can use parameter -p xxx to open port on localhost:xxx - and try curl. Or use ssh tunneling to access web directly. If this way works, the problem is proxy configuration
Both proxies nginx and apache can parse and interpret character / in the path even if it is encoded. You must turn off this feature. For nginx, simple remove ending / from proxy_pass command, which disables path parsing (and avoid to use rewrite engine) - I don"t have experience with apache.
This issue is addressed and will be fixed in planned release MMBOT 3, where character / will be removed from symbol identification everywhere it is currently used
Removing the ending / from proxy_pass solved it:
location / {
# First attempt to serve request as file, then
proxy_pass http://unix:/home/mmbot/mmbot/run/mmbot.socket;
}
Interesting is, the ending "/ "works in 2.2.22 ;) but it stoppend in master.