Username: Password:

Author Topic: GUNBOT_V5_0_4 - linux - fails to run  (Read 5784 times)

Offline naderra

  • Rookie
  • *
  • Posts: 2
    • View Profile
GUNBOT_V5_0_4 - linux - fails to run
« on: September 19, 2017, 11:57:35 AM »
G'Day,

I attempted to upgrade from a working GUNBOT_V5_0_1 (after shutting it down obviously) to the latest GUNBOT_V5_0_4,
using v504 config.js as a template and inserting the relevant previous config items.
The v405 config.js validates fine on https://jsonlint.com/

$ ./gunthy-linx64
Loading config...
Unhandled rejection TypeError: Cannot read property 'port' of undefined
    at new Websocket (/snapshot/gunbot-build/websocket.js:0:0)
    at loadWS (/snapshot/gunbot-build/bot.js:0:0)
    at Bot.start.loadConfig.then (/snapshot/gunbot-build/bot.js:0:0)
    at tryCatcher (/snapshot/gunbot-build/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.module.exports.Promise._settlePromiseFromHandler (/snapshot/gunbot-build/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise.module.exports.Promise._settlePromise (/snapshot/gunbot-build/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise.module.exports.Promise._settlePromise0 (/snapshot/gunbot-build/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise.module.exports.Promise._settlePromises (/snapshot/gunbot-build/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/snapshot/gunbot-build/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/snapshot/gunbot-build/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.__dirname.Async.drainQueues (/snapshot/gunbot-build/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)


I googled for "Unhandled rejection TypeError: Cannot read property 'port' of undefined" and only https://gunthy.org/index.php?topic=1277.20   appears, where Sidewinder complained about this same error after having fixed the JSON syntax error.

Any ideas greatly appreciated!

TIA

Robert

Offline Gunthar

  • Administrator
  • *****
  • Posts: 287
    • View Profile
Re: GUNBOT_V5_0_4 - linux - fails to run
« Reply #1 on: September 19, 2017, 10:54:40 PM »
please use the provided default config.js
you missing the ws port setting

Offline naderra

  • Rookie
  • *
  • Posts: 2
    • View Profile
Re: GUNBOT_V5_0_4 - linux - fails to run
« Reply #2 on: September 19, 2017, 11:05:34 PM »
The original v504's config.js has

   "bot": {
       "debug": false,
       "period_storage_ticker": 2000,
       "interval_ticker_update": 25000,
       "timeout_buy": 60000,
       "timeout_sell": 60000,
       "WATCH_MODE": false,
       "VERBOSE": true,
       "TV_GAIN": 0.6,
       "TV_TRADING_LIMIT": 0.001,
       "BOT_DELAY": 1
   },

   "ws": {
       "port": 5001
   },

   "imap_listener": {
       "enabled": false,
       "authorized_froms": ["noreply@tradingview.com"],
       "user": "YOUR_EMAIL_HERE",
       "password": "YOUR_PASSWORD_HERE",
       "host": "imap.gmail.com",
       "port": 993,
       "tls": true,
       "tlsOptions": {
      "rejectUnauthorized": false
       }
   },


My current modified config for v504 _also_ has the same "ws" entry ... i.e., it's not missing.

As I mentioned prev, all I did was copy over the trading pairs & api key details from the v501 config.js
I went over the config file and noticed the few differences, but essentially it's v504 config.js with my pairs and keys, nothing more.


eyezee

  • Guest
Re: GUNBOT_V5_0_4 - linux - fails to run
« Reply #3 on: September 23, 2017, 01:11:51 PM »
Please read your messages Gunthar

xjo

  • Guest
Re: GUNBOT_V5_0_4 - linux - fails to run
« Reply #4 on: September 24, 2017, 09:55:39 AM »
On linux, create a new user and try to make a fresh install. It should run fine.
Latest config here:
https://gist.github.com/xjocrypto/744ca92a402d9bea9d519f22e538d678