ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

503 / Disconnected (solution to error since latest version) #58

Closed jangrewe closed 7 years ago

jangrewe commented 7 years ago

Hi, i just updated to the latest commit and can connect to the web interface (proxied through Apache2), but the API seems to be broken.

In the log i see this:

{"name":"main","hostname":"hades","pid":14003,"level":30,"msg":"Requiring authentication to web client","time":"2017-05-03T09:44:55.187Z","v":0}
{"name":"main","hostname":"hades","pid":14003,"level":30,"msg":"Listening to admins on *: 7134","time":"2017-05-03T09:44:55.209Z","v":0}
{"name":"main","hostname":"hades","pid":14003,"level":30,"pair":"BTC/EUR","minTick":0.01,"hasSelfTradePrevention":true,"msg":"using the following exchange details","time":"2017-05-03T09:44:55.877Z","v":0}
{"name":"ewma","hostname":"hades","pid":14003,"level":30,"msg":"Unable to compute EMWA value","time":"2017-05-03T09:44:55.884Z","v":0}
{"name":"tribeca:active","hostname":"hades","pid":14003,"level":30,"msg":"Starting saved quoting state:  true","time":"2017-05-03T09:44:55.892Z","v":0}
{"name":"main","hostname":"hades","pid":14059,"level":30,"msg":"Requiring authentication to web client","time":"2017-05-03T09:44:57.157Z","v":0}
{"name":"main","hostname":"hades","pid":14059,"level":30,"msg":"Listening to admins on *: 7134","time":"2017-05-03T09:44:57.178Z","v":0}
{"name":"main","hostname":"hades","pid":14059,"level":30,"pair":"BTC/EUR","minTick":0.01,"hasSelfTradePrevention":true,"msg":"using the following exchange details","time":"2017-05-03T09:44:57.566Z","v":0}
{"name":"ewma","hostname":"hades","pid":14059,"level":30,"msg":"Unable to compute EMWA value","time":"2017-05-03T09:44:57.573Z","v":0}
{"name":"tribeca:active","hostname":"hades","pid":14059,"level":30,"msg":"Starting saved quoting state:  true","time":"2017-05-03T09:44:57.581Z","v":0}
{"name":"main","hostname":"hades","pid":14099,"level":30,"msg":"Requiring authentication to web client","time":"2017-05-03T09:44:58.343Z","v":0}
{"name":"main","hostname":"hades","pid":14099,"level":30,"msg":"Listening to admins on *: 7134","time":"2017-05-03T09:44:58.365Z","v":0}
{"name":"main","hostname":"hades","pid":14099,"level":30,"pair":"BTC/EUR","minTick":0.01,"hasSelfTradePrevention":true,"msg":"using the following exchange details","time":"2017-05-03T09:44:59.035Z","v":0}
{"name":"ewma","hostname":"hades","pid":14099,"level":30,"msg":"Unable to compute EMWA value","time":"2017-05-03T09:44:59.042Z","v":0}
{"name":"tribeca:active","hostname":"hades","pid":14099,"level":30,"msg":"Starting saved quoting state:  true","time":"2017-05-03T09:44:59.051Z","v":0}
{"name":"tribeca:active","hostname":"hades","pid":14099,"level":30,"msg":"Changed quoting mode to true","time":"2017-05-03T09:45:00.193Z","v":0}
{"name":"positionmanager","hostname":"hades","pid":14099,"level":30,"msg":"recalculated target base position: 0.039083089652701686","time":"2017-05-03T09:45:00.201Z","v":0}

and my browser's console shows these errors:

GET https://example.com/socket.io/?EIO=3&transport=polling&t=LlDjCLb&sid=dRMy6T52zDelm8hkAAAB 503 (Service Unavailable)
WebSocket connection to 'wss://example.com/socket.io/?EIO=3&transport=websocket&sid=wl53Bvmdi8NJ2cyHAAAA' failed: Error during WebSocket handshake: Unexpected response code: 400

So it seems one of the commits within the last 24 hours broke something.

ctubio commented 7 years ago

im sorry, i knew it i will impact someone :( since https://github.com/ctubio/tribeca/commit/29a3a2bf4237fb46e917e431f7aa6233dfbc6dd6 we need to have a new config option in the config file: MatryoshkaUrl

see https://github.com/ctubio/tribeca/tree/master/etc

just need to add the following line to your config file:

    "MatryoshkaUrl": "https://",

you have more info about the value of this new config option at https://github.com/ctubio/tribeca#multiple-instances-party-time

will keep the issue open for a while in case it could help others.

sorry again'¡!

P.D. this type of breacking changes are not expected to happen never, but we had an exceptional situation in the latest commits, feel save in the future commits'¡

jangrewe commented 7 years ago

Ah, no worries, i'm happy that it's not a real bug, and also easy to fix. Maybe you could add a ReleaseNotes file, or even just a Changelog that would point out any breaking changes like this?

thanks! =)

ctubio commented 7 years ago

yea i think about but found changelogs useless, because need to be maintained and because nobody reads when its needed (everybody reads 2 years after)

so i come up with npm run diff and npm run latest commands

The first shows (a live! an unmaintained!) changelog since your current version using git history, and the second command downloads, installs and restarts the application.

Hope this 2 commands are better than any static changelog file'¡!