DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.21k stars 2.04k forks source link

deviavir/zenbot docker image 10 month old #2756

Open fculpo opened 2 years ago

fculpo commented 2 years ago

Hi @DeviaVir, it seems the docker image deviavir/zenbot:unstable is no more updated on commits. Can you look into that ? May that be related to recent dockerhub changes ?

We can still build the image ourselves but it would be nicer to have up to date image.

DeviaVir commented 2 years ago

I think it stopped after we hit some limit of failed builds, heh.

master:

#14 24.90 npm ERR! code E404
#14 24.90 npm ERR! 404 Not Found - GET https://registry.npmjs.org/ccxt/-/ccxt-1.17.363.tgz
#14 24.90 npm ERR! 404
#14 24.90 npm ERR! 404 'ccxt@1.17.363' is not in the npm registry.
#14 24.90 npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
#14 24.90 npm ERR! 404 It was specified as a dependency of 'app'
#14 24.90 npm ERR! 404
#14 24.90 npm ERR! 404 Note that you can also install from a
#14 24.90 npm ERR! 404 tarball, folder, http url, or git url.
#14 24.94 npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/echarts-08b572da/dist/echarts-en.common.min.js'
#14 26.66 npm WARN tar ENOENT: no such file or directory, open '/app/node_modules/.staging/talib-1208e418/src/lib/make/csr/windows/msbuild/ta_lib.sln'
#14 31.01
#14 31.01 npm ERR! A complete log of this run can be found in:
#14 31.01 npm ERR! /root/.npm/_logs/2021-09-13T15_49_06_995Z-debug.log
#14 ERROR: executor failed running [/bin/sh -c npm install --unsafe]: exit code: 1

unstable built fine https://hub.docker.com/layers/deviavir/zenbot/unstable/images/sha256-7ccadafeacafd223460f210ee50048d96932015b9a4e7e31a66e7f3872a23129?context=repo

ole-berg commented 2 years ago

Hi @DeviaVir, your link to the unstable image didn't work so I just pulled the latest unstable image but I still get this error:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/ccxt/-/ccxt-1.17.363.tgz
npm ERR! 404
npm ERR! 404  'ccxt@1.17.363' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'app'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.`

Any ideas how to fix it? You really get a 404 when opening https://registry.npmjs.org/ccxt/-/ccxt-1.17.363.tgz.

DeviaVir commented 2 years ago

@ole-berg this seems like an error you'd see when trying to run npm install, which should already be done by the docker build. What command did you run that resulted in this?

DeviaVir commented 2 years ago

https://hub.docker.com/repository/registry-1.docker.io/deviavir/zenbot/builds/93e64244-d18f-44bf-b4c9-bffa2006f1fa seems happy

ole-berg commented 2 years ago

@DeviaVir Hi, at first I used the wrong command however now I get a mongodb connection error when doing docker run deviavir/zenbot on Ubuntu. Do I need to do some configuration for the mongodb connection even if I only want to do simulations and if yes, where?


Error: Cannot find module './conf', falling back to conf-sample
(node:8) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
WARNING: MongoDB Connection Error:  { MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
    at Pool.<anonymous> (/app/node_modules/mongodb-core/lib/topologies/server.js:564:11)
    at emitOne (events.js:116:13)
    at Pool.emit (events.js:211:7)
    at Connection.<anonymous> (/app/node_modules/mongodb-core/lib/connection/pool.js:317:12)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Connection.emit (events.js:214:7)
    at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:246:50)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
  name: 'MongoNetworkError',
  errorLabels: [ 'TransientTransactionError' ],
  [Symbol(mongoErrorContextSymbol)]: {} }
WARNING: without MongoDB some features (such as backfilling/simulation) may be disabled.
Attempted authentication string: mongodb://localhost:27017/zenbot4?
/app/lib/services/collection-service.js:18
      return conf.db.mongo.collection('sessions')
                     ^

TypeError: Cannot read property 'mongo' of undefined
    at Object.getSessions (/app/lib/services/collection-service.js:18:22)
    at Command.<anonymous> (/app/commands/trade.js:369:48)
    at Command.listener (/app/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (/app/node_modules/commander/index.js:654:12)
    at Command.parse (/app/node_modules/commander/index.js:474:21)
    at /app/zenbot.js:46:13
    at FSReqWrap.oncomplete (fs.js:135:15)```
DeviaVir commented 2 years ago

There's a docker-compose file available too, which automatically sets up dependencies like mongodb: https://github.com/DeviaVir/zenbot/blob/unstable/docs/installation/docker.md

klodnickik commented 2 years ago

Hi, I have the same error ... it looks that some npm packages are outdated. I checked with fresh Ubuntu installation, 2 versions, i.e. 20.04 and 18.04.

$ sudo docker-compose up -d
[..]

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/ccxt/-/ccxt-1.17.363.tgz
npm ERR! 404
npm ERR! 404  'ccxt@1.17.363' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'app'