cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
199 stars 78 forks source link

Error: GROUP BY clause and contains nonaggregated column 'arbitrage.balances.value' #72

Closed Scorpic1 closed 6 years ago

Scorpic1 commented 6 years ago

Hello!

With last version bot have error in /var/log/nginx/error.log:

2018/01/05 13:18:47 [error] 8624#8624: *13 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exc
eption: database selection error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggreg
ated column 'arbitrage.balances.value' which is not functionally dependent on columns in GROUP BY clause; this
is incompatible with sql_mode=only_full_group_by in /var/www/arbbot/web/WebDB.php:114
Stack trace:
#0 /var/www/arbbot/web/ajax.php(16): WebDB::getGraph('BTC', '0', '0')
#1 {main}

Thanks.

Scorpic1 commented 6 years ago

Now error in /var/log/nginx/error.log:

2018/01/06 11:02:38 [error] 29208#29208: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Ex
ception: database selection error: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggre
gated column 'arbitrage.balances.raw' which is not functionally dependent on columns in GROUP BY clause; this i
s incompatible with sql_mode=only_full_group_by in /var/www/arbbot/web/WebDB.php:114
Stack trace:
#0 /var/www/arbbot/web/ajax.php(16): WebDB::getGraph('BTC', '0', '0')
#1 {main}

And get error from bot:

08:03:18: ERROR during management task: database insertion error: Data too long for column 'coin' at row 1
#0 /var/www/arbbot/bot/Database.php(187): Database::recordBalance()
#1 /var/www/arbbot/bot/CoinManager.php(221): Database::saveBalance()
#2 /var/www/arbbot/bot/CoinManager.php(635): CoinManager->saveSnapshot()
#3 /var/www/arbbot/bot/CoinManager.php(56): CoinManager->manageWallets()
#4 /var/www/arbbot/bot/Arbitrator.php(57): CoinManager->doManage()
#5 /var/www/arbbot/bot/Arbitrator.php(553): Arbitrator->loop()
#6 /var/www/arbbot/bot/Arbitrator.php(23): Arbitrator->innerRun()
#7 (): Closure$Arbitrator::__construct()
#8 /var/www/arbbot/lib/composer/vendor/react/event-loop/src/Timer/Timers.php(90): call_user_func()
#9 /var/www/arbbot/lib/composer/vendor/react/event-loop/src/StreamSelectLoop.php(177): React\EventLoop\Timer\Timers->tick()
#10 /var/www/arbbot/bot/Arbitrator.php(546): React\EventLoop\StreamSelectLoop->run()
#11 /var/www/arbbot/main.php(143): Arbitrator->run()
#12 {main}
08:03:35: Refreshing wallets...
cryptoeax commented 6 years ago

Ah, of course...

The second error is #75.

cryptoeax commented 6 years ago

Now error in /var/log/nginx/error.log:

2018/01/06 11:02:38 [error] 29208#29208: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Ex ception: database selection error: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggre gated column 'arbitrage.balances.raw' which is not functionally dependent on columns in GROUP BY clause; this i s incompatible with sql_mode=only_full_group_by in /var/www/arbbot/web/WebDB.php:114 Stack trace:

0 /var/www/arbbot/web/ajax.php(16): WebDB::getGraph('BTC', '0', '0')

1 {main}

Should be fixed by 33989cead96849e69a8d0bc410748bd28ed83952.