646
Stakeholder Proposals / Re: [Worker] Deploy and maintain independent BitShares infrastructure
« on: March 07, 2018, 11:30:21 pm »Attempting to perform direct JSON requests to these api nodes fails: https://eu.nodes.bitshares.works/Code: [Select]11 eof_exception: End Of File
stringstream
{}
th_a sstream.cpp:109 peek
{"str":""}
th_a json.cpp:478 from_string
For the mean time, I'll be removing these nodes from the HUG REST API (only when performing these json requests). Cheers
That is how actually the expected response, nothing broken there. Do you have an example of a node that behaves differently?
Depends on the node, but here's the output from this script: https://github.com/BTS-CM/Bitshares-HUG-REST-API/blob/master/work_in_progress/testing_requests.py
Other online nodes work properly.
Code: [Select]
./\/\/\.
Not online: https://bitshares.crypto.fans/ws
.\/\/\/.
---
Online: https://bit.btsabc.org/ws
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
---
Online: https://api.bts.blckchnd.com
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
---
Online: https://openledger.hk/ws
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
---
Online: https://bitshares-api.wancloud.io/ws
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
...
Error: https://dex.rnglab.org
HTTPSConnectionPool(host='dex.rnglab.org', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))
...
./\/\/\.
Not online: https://dexnode.net/ws
.\/\/\/.
---
Online: https://kc-us-dex.xeldal.com/ws
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
---
Online: https://la.dexnode.net/ws
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
...
Error: https://eu.nodes.bitshares.works
HTTPSConnectionPool(host='eu.nodes.bitshares.works', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))
...
...
Error: https://us.nodes.bitshares.works
HTTPSConnectionPool(host='us.nodes.bitshares.works', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))
...
...
Error: https://sg.nodes.bitshares.works
HTTPSConnectionPool(host='sg.nodes.bitshares.works', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))
...
---
Update: Added 'verify=False' to the request and got the expected output with warnings:
Code: [Select]
/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
---
Online: https://eu.nodes.bitshares.works
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
---
Online: https://us.nodes.bitshares.works
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
/lib/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
---
Online: https://sg.nodes.bitshares.works
<Response [200]>
{"id":1,"jsonrpc":"2.0","result":100}
===
---
So if it's the SSL cert, please update this to A+, B grade seems insufficient: https://www.ssllabs.com/ssltest/analyze.html?d=eu.nodes.bitshares.works
https://certbot.eff.org/ certbot/letsencrypt can provide grade 'A' SSL certs for free.