Krypto-trading-bot: coinbase cert error

Created on 10 Sep 2018  路  11Comments  路  Source: ctubio/Krypto-trading-bot

This is amazon linux 2018.03. I upgraded K on Sept 4. It was running fine since. I upgraded a moment ago, everything went fine. I did a usual make restartall. Now I'm getting this error:

$ ./btc.sh --debug
K trading-bot x86_64-linux-gnu 2018-09-09 23:21:22.
v0.4.10+20 (0day).
09/10 15:46:20.414938 DB loaded OK from /data/db/K.COINBASE.BTC.USD.db.
09/10 15:46:20.415095 UI ready over HTTP on external port 3000.
09/10 15:46:20.415510 DB loaded last Quoting Parameters OK.
09/10 15:46:20.415638 DB loaded TBP = 0.407000 BTC.
09/10 15:46:20.425293 DB loaded 1000 historical Trades.
09/10 15:46:20.446532 DB loaded 5627 historical Profits.
09/10 15:46:20.453586 DB loaded 2725 historical Fair Values.
09/10 15:46:20.457473 DB Warrrrning: consider to warm up some EWMA Values.
09/10 15:46:20.473139 GW Errrror: Unable to fetch data from COINBASE for symbol "BTC-USD", possible error message: {"error":"CURL Error: Problem with the SSL CA cert (path? access rights?)"}.
fixme!

Most helpful comment

Yeah, that would be the easy fix for all distros regardless of the way they handle things :+1:
I thank you very much for developing such a brilliant program, it has improved a lot since our days with tribeca (I don't even count you rewrote the whole thing with cpp). I admire you a lot and hope you and your people will be free and happy, friend.
Wish I could be of use, maybe when I graduate and get a 40-hour job, being a PhD student sucks your whole time :-1:

All 11 comments

try

sudo curl --time-cond /etc/ssl/certs/ca-certificates.crt https://curl.haxx.se/ca/cacert.pem -o /etc/ssl/certs/ca-certificates.crt

please let me know if it helps''
otherwise please share the full name/version of your operative system

thanks''

Thanks Carles, this solved the problem. I think the problem is regarding Amazon Linux AMI using its own cert manager. For example, the certs are stored at /etc/pki/ca-trust/source/anchors instead of /etc/ssl/certs (I still used etc/ssl/certs to run your command) . Anyways, the problem is probably related to aws in any case, if we leave the issue report here anyone experiencing the same can see the workaround

coOl many thanks, i will add this command to the install script in case /etc/ssl/certs/ca-certificates.crt doesnt exists

the /etc/ssl/certs path is needed cos is what was used to compile curl (see https://github.com/ctubio/Krypto-trading-bot/blob/master/src/dist/Makefile#L48) this path is native from Debian; i think i will create the path and download the file for non-debians (easy fix :D i really dont want to distribute the cabundle file included in the github repo; thats why was removed some days ago provoking your issue)

many thanks for your infos'''

Yeah, that would be the easy fix for all distros regardless of the way they handle things :+1:
I thank you very much for developing such a brilliant program, it has improved a lot since our days with tribeca (I don't even count you rewrote the whole thing with cpp). I admire you a lot and hope you and your people will be free and happy, friend.
Wish I could be of use, maybe when I graduate and get a 40-hour job, being a PhD student sucks your whole time :-1:

hi Carles, the cert moved to https://curl.se/ca/cacert.pem , this is now causing issues again :(

should be fixed at https://github.com/ctubio/Krypto-trading-bot/commit/78d1f8343443b6433c3d031cdc78f07db4404ac2

a quick fix without reinstalling should be:

curl -s https://curl.se/ca/cacert.pem -o /var/lib/K/ssl/cacert.pem

Thanks a lot for the quick update @ctubio :+1: however i'm still living this deja-vu error on my linux mint desktop O.o

poncik@poncik-hptv:~/K$ make upgrade
Fetching origin
warning: redirecting to https://github.com/ctubio/Krypto-trading-bot.git/
Local running version: b0c6b222c45fdbb6a2a2b9f31a764dc168b66339
Latest remote version: b0c6b222c45fdbb6a2a2b9f31a764dc168b66339

No need to upgrade, both versions are equal.
poncik@poncik-hptv:~/K$ curl -s https://curl.se/ca/cacert.pem -o /var/lib/K/ssl/cacert.pem
poncik@poncik-hptv:~/K$ ls -lah /var/lib/K/ssl
total 12K
drwxr-xr-x 2 root root 4.0K Jan 21 14:40 .
drwxr-xr-x 5 root root 4.0K Feb 2 11:28 ..
-rw-r--r-- 1 root root 299 Feb 1 09:00 cacert.pem
poncik@poncik-hptv:~/K$ ./xbtcbs.sh --debug
K-trading-bot v0.6.0+34 (build on linux-x86_64 at 2021-02-02 00:50:28).
02/02 15:32:28.547398 CF Outbound IP address is localhost.
02/02 15:32:28.795566 GW Errrror: Unable to fetch data from COINBASE for symbols BTC/USD, response was: {"error":"CURL Request Error: Problem with the SSL CA cert (path? access rights?)"}.
02/02 15:32:28.795611 GW COINBASE Attempting to cancel all open orders, please wait..
02/02 15:32:28.820390 GW COINBASE cancel all open orders OK.
K exit code 1.
K crashed with exit code 1.. Respawning..
K-trading-bot v0.6.0+34 (build on linux-x86_64 at 2021-02-02 00:50:28).
02/02 15:32:31.879268 CF Outbound IP address is localhost.
02/02 15:32:32.140848 GW Errrror: Unable to fetch data from COINBASE for symbols BTC/USD, response was: {"error":"CURL Request Error: Problem with the SSL CA cert (path? access rights?)"}.
02/02 15:32:32.140896 GW COINBASE Attempting to cancel all open orders, please wait..
02/02 15:32:32.163660 GW COINBASE cancel all open orders OK.
K exit code 1.
K crashed with exit code 1.. Respawning..

morniiiing'''
the cert must exists in the correct path (otherwise this error is raised), but i changed the path at https://github.com/ctubio/Krypto-trading-bot/commit/bb7b53798c95774cf08bfc692a00ec311c4e48b4#diff-6e419727d1410b6572fbf1ba29c25cd3932caee0e4c6d73d516dae168c83a579L58-R58 so maybe you have the old one.

previous cert path was: /etc/ssl/certs/ca-certificates.crt and the new one is /var/lib/K/ssl/cacert.pem

using cat over this filenames you should see the certs (and not some random html cos curl project changed the url and we started downloading a 302 redirect page :P cos our curl command is intentionally not using -L)

if you are unsure of your path, just copy a freshly downloaded cert to both paths:

curl -s https://curl.se/ca/cacert.pem -o /var/lib/K/ssl/cacert.pem
curl -s https://curl.se/ca/cacert.pem -o /etc/ssl/certs/ca-certificates.crt

hope this info helps'''

i do beleive your /var/lib/K/ssl/cacert.pem have random html, hope a manual download/copy from https://curl.se/ca/cacert.pem helps'''

curling with sudo solved the issue, sorry i bothered you, thanks a lot for your patience Carles. good night Catalunya!

:koala: noworry i had the same issue a few days ago and took me some time too xD (i spend enough time to reconsider my unlucky existance, until i luckily did a cat)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  5Comments

Bzzz666 picture Bzzz666  路  8Comments

rconnelly picture rconnelly  路  4Comments

Corfucinas picture Corfucinas  路  5Comments

wulabs picture wulabs  路  3Comments