Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

REST API makes bot crash #814

Closed
albabosh opened this issue Dec 7, 2017 · 9 comments
Closed

REST API makes bot crash #814

albabosh opened this issue Dec 7, 2017 · 9 comments
Labels

Comments

@albabosh
Copy link

albabosh commented Dec 7, 2017

When I put c.output.api.port (not 0) into config zenbot crashes at startup. port=0 works ok. It seems that REST API uses 2 ports. Could you give a correct example of api config ? Thanks

@ArnaudRitti
Copy link

Hi,
I got the same issue. It's a bug in trade.js.
You can check my fix at https://github.com/ArnaudRitti/zenbot/blob/API/commands/trade.js#L385

@abduegal
Copy link
Contributor

abduegal commented Dec 8, 2017

Hi, I'm going to take a look and see if I can solve this.

@abduegal
Copy link
Contributor

abduegal commented Dec 8, 2017

@albabosh @ArnaudRitti what error did you get. What did you enter in the c.output.api.port?
I tested this with the following settings, and they all work:
c.output.api = {}
c.output.api.on = true
c.output.api.port = 8080


c.output.api = {}
c.output.api.on = true
c.output.api.port = 0


c.output.api = {}
c.output.api.on = true
c.output.api.port

@ArnaudRitti
Copy link

I get a Node Express error : EADDRINUSE, Address already in use

@DeviaVir DeviaVir removed the bug label Dec 8, 2017
@albabosh
Copy link
Author

The same I get "EADDRINUSE, Address already in use"

@abduegal
Copy link
Contributor

Allright, still can't reproduce it. But @albabosh could you try the fix that @ArnaudRitti provided and see if that solves it for you. If that is the case then we should add that fix in a pull request

@ArnaudRitti
Copy link

My PR #850 integrate the fix

@albabosh
Copy link
Author

It seems to happen only if strategy is set to 'neural'

@j0nxs
Copy link

j0nxs commented Mar 21, 2019

It is not fixed - it crashed in 'neural', because it open two sockets - on random it uses difference ports, but when you use a fixed port then fail the second socket because it use the same port

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants