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

configuration option makes Zenbot crashes when Web UI is used #1387

Closed
rcoenen opened this issue Feb 20, 2018 · 12 comments
Closed

configuration option makes Zenbot crashes when Web UI is used #1387

rcoenen opened this issue Feb 20, 2018 · 12 comments
Labels

Comments

@rcoenen
Copy link

rcoenen commented Feb 20, 2018

System information

  • Have I written custom code (as opposed to using zenbot vanilla):
    No

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
    Linux Ubuntu 16.04

  • Zenbot version:
    8bcd969

  • NodeJS version:
    v8.9.4

  • Python version:
    Python 2.7.12

  • Exact command to reproduce:
    Run bot like this works fine, commandline and web ui: ./zenbot.sh trade --min_periods=60 --trend_ema=30 --neutral_rate=0.25

Running it this way will let the bot work fine until you access the web ui, then the bit crashes immediately
./zenbot.sh trade --period=2h --min_periods=60 --trend_ema=30 --neutral_rate=0.25

Describe the problem

I was trying to setup a bot as per @krilson suggestion (see #189 (comment) ) and noticed that the bt crashes as soon as I invoke the web ui. Removing --period=2h seems to fix it

Source code / logs

Sorry no idea how to do this

@defkev
Copy link
Contributor

defkev commented Feb 20, 2018

Crash

No error?

@rcoenen
Copy link
Author

rcoenen commented Feb 20, 2018

Just something along the lines of process ID xxxx terminated

@defkev
Copy link
Contributor

defkev commented Feb 20, 2018

I am afraid thats not enough, as i don't even know where to look at.

The only possible problem coming to my mind is that the bot tries to bind to an already used interface (yielding a EADDRINUSE error) causing it to terminate.

@izk8
Copy link

izk8 commented Feb 20, 2018 via email

@defkev
Copy link
Contributor

defkev commented Feb 20, 2018

Its the size (length) of a period, like a sample-rate, used by the underlying library.

m is in minutes so 10m is 10 minutes.

See https://github.com/carlos8f/node-timebucket#granularity-identifiers for the different identifiers supported.

@mkuendig
Copy link
Contributor

mkuendig commented Feb 22, 2018

I get this too with latest unstable. This is the error message:

Press l to list available commands.
events.js:183
throw er; // Unhandled 'error' event
^

Error: bind EADDRINUSE 0.0.0.0:80
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at listenOnMasterHandle (net.js:1411:16)
at rr (internal/cluster/child.js:111:12)
at Worker.send (internal/cluster/child.js:78:7)
at process.onInternalMessage (internal/cluster/utils.js:42:8)
at emitTwo (events.js:131:20)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

If I disable web/api it works just fine.

@rcoenen
Copy link
Author

rcoenen commented Feb 22, 2018

@mkuendig mmm... EADDRINUSE seems to indicate port 80 is already in use.
Are you running another service at port 80? Or maybe you're running the bit twice?
Try changing in conf.js the value c.output.api.port and set it to 0?

@mkuendig
Copy link
Contributor

mkuendig commented Feb 22, 2018 via email

@rcoenen
Copy link
Author

rcoenen commented Feb 22, 2018

@mkuendig just to be clear: so the but runs fine on command-line until you try to access the Web UI it crashes?

@mkuendig
Copy link
Contributor

@rcoenen Actually it crashes already at start with that error. No access to the web-console needed. It crashes right away.

@rcoenen
Copy link
Author

rcoenen commented Feb 22, 2018

@mkuendig so then your problem unrelated to this ticket

@DeviaVir
Copy link
Owner

Dear issue reporter,

We have slightly changed our github issue policy and would now kindly request folks that have questions that they ask them in our zenbot subreddit.

You can find it here: https://reddit.com/r/zenbot

This issue will be closed, but if you disagree with your ticket being marked as a question feel free to leave a comment defending your case.

Thanks for contributing time and effort!

Greetings,
🤖

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