!!! Stupid Questions Thread !!!

Started by Method-X, September 05, 2014, 12:43:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xeroc

The testnet run an unencrypted ws:// websocket and thus there is no certificate and no encryption of data transmission between the client and the hosted wallet ...
if I wanted to have it encrypted, I would need to get an SSL certificate ..

the setup of openledger however uses an unecryted communication to the witness BUT only proxies by the webserver ..
essentially, in OL, the witness only listens to localhost on some port .. and the webserver `nginx` proxies the communication through SSL

jakub

Quote from: svk on January 22, 2016, 01:02:50 PM
Quote from: jakub on January 22, 2016, 12:37:12 PM
Quote from: svk on January 22, 2016, 12:20:12 PM
There's a simple reason I enforce wss: browser's don't let you connect to a non-secure (ws) url from a secure domain (https). So if you're using the hosted wallet on openledger, you can only use wss apis. If you're running the GUI locally, you can use wss or ws.

I wanted to tell @valzav to exclude the ws apis from the openledger build but forgot to mention it.

So is there a way to connect the OpenLedger GUI with a locally run witness node?
If so, what parameters should I use for the witness node?

I've tried:
witness_node --rpc-tls-endpoint 127.0.0.1:8089
hoping this one would be compatible with "wss" but it does not work.

Only if you get a TLS certificate and run a proxy server for incoming traffic that proxies the ws server of the witness node. Not sure the witness can really run a wss socket, for OpenLedger valzav uses a nginx proxy.

@xeroc
So this effectively means that, unless you want to employ a TLS certificate and run a proxy server, this part of the documentation applies only to the light wallet GUI, not the hosted GUI, correct?

Thom

Quote from: jakub on January 22, 2016, 12:37:12 PM
Quote from: svk on January 22, 2016, 12:20:12 PM
There's a simple reason I enforce wss: browser's don't let you connect to a non-secure (ws) url from a secure domain (https). So if you're using the hosted wallet on openledger, you can only use wss apis. If you're running the GUI locally, you can use wss or ws.

I wanted to tell @valzav to exclude the ws apis from the openledger build but forgot to mention it.

So is there a way to connect the OpenLedger GUI with a locally run witness node?
If so, what parameters should I use for the witness node?

I've tried:
witness_node --rpc-tls-endpoint 127.0.0.1:8089
hoping this one would be compatible with "wss" but it does not work.

There used to be, when the OL client was initially launched, but I have noticed for a week or 2 now that when I try to point the OL client to my local witness node (under settings, API connection) it won't accept the change, at least on my dev box which I change fairly frequently in one way or another.

However, right now I am using the same browser that I used in October, and the OL client on that system is cached, so I am able to get current info from my local node (wss://192.168.9.11/ws).

I find this interesting. How long with my cache stay "stale", and if I refresh it will I loose my wallet (it is backed up of course)?
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: [url="https://bitsharestalk.org/index.php/topic,23902.0.html"]https://bitsharestalk.org/index.php/topic,23902.0.html[/url]

svk

Quote from: jakub on January 22, 2016, 12:37:12 PM
Quote from: svk on January 22, 2016, 12:20:12 PM
There's a simple reason I enforce wss: browser's don't let you connect to a non-secure (ws) url from a secure domain (https). So if you're using the hosted wallet on openledger, you can only use wss apis. If you're running the GUI locally, you can use wss or ws.

I wanted to tell @valzav to exclude the ws apis from the openledger build but forgot to mention it.

So is there a way to connect the OpenLedger GUI with a locally run witness node?
If so, what parameters should I use for the witness node?

I've tried:
witness_node --rpc-tls-endpoint 127.0.0.1:8089
hoping this one would be compatible with "wss" but it does not work.

Only if you get a TLS certificate and run a proxy server for incoming traffic that proxies the ws server of the witness node. Not sure the witness can really run a wss socket, for OpenLedger valzav uses a nginx proxy.
Worker: dev.bitsharesblocks

xeroc

you can't run a TLS enpoint if you don't offer the node a CERTIFICATE
--server-pem
--server-pem-password

jakub

Quote from: svk on January 22, 2016, 12:20:12 PM
There's a simple reason I enforce wss: browser's don't let you connect to a non-secure (ws) url from a secure domain (https). So if you're using the hosted wallet on openledger, you can only use wss apis. If you're running the GUI locally, you can use wss or ws.

I wanted to tell @valzav to exclude the ws apis from the openledger build but forgot to mention it.

So is there a way to connect the OpenLedger GUI with a locally run witness node?
If so, what parameters should I use for the witness node?

I've tried:
witness_node --rpc-tls-endpoint 127.0.0.1:8089
hoping this one would be compatible with "wss" but it does not work.

svk

Quote from: jakub on January 22, 2016, 10:46:13 AM
Quote from: xeroc on January 22, 2016, 09:34:27 AM
sudo npm install -g wscat
wscat -n -c ws://localhost:8090

My local witness node:
witness_node --rpc-endpoint 127.0.0.1:8090 --rpc-tls-endpoint 127.0.0.1:8089

Here are the results from wscat:

wscat -n -c ws://localhost:8090
connected

wscat -n -c wss://localhost:8090
no response

wscat -n -c ws://localhost:8089
error: Error: connect ECONNREFUSED 127.0.0.1:8089

wscat -n -c wss://localhost:8089
error: Error: connect ECONNREFUSED 127.0.0.1:8089

So it looks like only ws://localhost:8090 works but the GUI will accept only an entry starting with "wss".
Is it a bug then? Should I ask @svk to remove this "wss" protocol  enforcement and allow "ws" as well?

There's a simple reason I enforce wss: browser's don't let you connect to a non-secure (ws) url from a secure domain (https). So if you're using the hosted wallet on openledger, you can only use wss apis. If you're running the GUI locally, you can use wss or ws.

I wanted to tell @valzav to exclude the ws apis from the openledger build but forgot to mention it.

Worker: dev.bitsharesblocks

jakub

Quote from: xeroc on January 22, 2016, 09:34:27 AM
sudo npm install -g wscat
wscat -n -c ws://localhost:8090

My local witness node:
witness_node --rpc-endpoint 127.0.0.1:8090 --rpc-tls-endpoint 127.0.0.1:8089

Here are the results from wscat:

wscat -n -c ws://localhost:8090
connected

wscat -n -c wss://localhost:8090
no response

wscat -n -c ws://localhost:8089
error: Error: connect ECONNREFUSED 127.0.0.1:8089

wscat -n -c wss://localhost:8089
error: Error: connect ECONNREFUSED 127.0.0.1:8089

So it looks like only ws://localhost:8090 works but the GUI will accept only an entry starting with "wss".
Is it a bug then? Should I ask @svk to remove this "wss" protocol  enforcement and allow "ws" as well?

xeroc


jakub

Quote from: pc on January 21, 2016, 09:24:33 PM
Quote from: jakub on January 21, 2016, 06:49:08 PM
I have my witness node running locally with these settings:

# Endpoint for websocket RPC to listen on
rpc-endpoint = localhost:8090


What should I enter as the API connection in the GUI to be able to connect to my witness node?

I've tried:
wss://localhost
wss://localhost:8090
wss://localhost:8090/ws

but none of these seem to work.

Try ws://localhost:8090 - wss is for websocket-secure (i. e. SSL/TLS-protected). You need wss for the rpc-tls-endpoint, if you have configured one.

The GUI allows me to use the wss protocol only (when I type "ws" it changes it to "wss" automatically).

So I've tried to run the witness with rpc-tls-endpoint enabled:
witness_node --rpc-tls-endpoint 127.0.0.1:8089

And I've set the API connection in the GUI to this:
wss://127.0.0.1:8089

But still I get this error in the GUI:
WebSocket connection to 'wss://127.0.0.1:8089/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

PS. If anyone can help please do, but I'll move this issue to the support thread as it has become too technical to be qualified as a "stupid question".
https://bitsharestalk.org/index.php/topic,20185.msg273547.html#msg273547

pc

Quote from: jakub on January 21, 2016, 06:49:08 PM
I have my witness node running locally with these settings:

# Endpoint for websocket RPC to listen on
rpc-endpoint = localhost:8090


What should I enter as the API connection in the GUI to be able to connect to my witness node?

I've tried:
wss://localhost
wss://localhost:8090
wss://localhost:8090/ws

but none of these seem to work.

Try ws://localhost:8090 - wss is for websocket-secure (i. e. SSL/TLS-protected). You need wss for the rpc-tls-endpoint, if you have configured one.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 [url="http://bitcoin.quisquis.de"]http://bitcoin.quisquis.de[/url]

jakub

#816
I have my witness node running locally with these settings:

# Endpoint for websocket RPC to listen on
rpc-endpoint = localhost:8090


What should I enter as the API connection in the GUI to be able to connect to my witness node?

I've tried:
wss://localhost
wss://localhost:8090
wss://localhost:8090/ws

but none of these seem to work.

jakub

Quote from: xeroc on January 15, 2016, 07:24:37 AM
You can manually delete the other active key from the "wallet.json" file

Is it possible to remove a private key from the "wallet.json" file?
If so, how is it done?

xeroc

Quote from: jakub on January 17, 2016, 09:51:34 AM
@xeroc, I have started compiling a list of technical FAQs:
https://github.com/neura-sx/neura-sx.github.io/blob/master/BitShares%202.0%20FAQs.md

All of them are issues I've come across when trying to use the CLI and understand how it works.
The answers are based on the feedback I got from the forum (especially from abit, xeroc & pc)

Quote from: jakub on January 15, 2016, 12:22:32 PM
PS. I am going through your http://docs.bitshares.eu documentation and I think I'll have plenty of amendments to offer as there are many gaps in it - such as the issue described above.
One of the first things a user needs to have to be able to play with the CLI is an account with some funds in it - your guide does not address this explicitly.
So right now I am making a list of all the little (but essential) things that are missing in your docs.
Very cool. I'll look over it.
If you want to contribute more to the docs, I would be happy to add you to the github repository:
https://github.com/BitSharesEurope/docs.bitshares.eu

jakub

Quote from: jakub on January 15, 2016, 12:22:32 PM
PS. I am going through your http://docs.bitshares.eu documentation and I think I'll have plenty of amendments to offer as there are many gaps in it - such as the issue described above.
One of the first things a user needs to have to be able to play with the CLI is an account with some funds in it - your guide does not address this explicitly.
So right now I am making a list of all the little (but essential) things that are missing in your docs.

@xeroc, I have started compiling a list of technical FAQs:
https://github.com/neura-sx/neura-sx.github.io/blob/master/BitShares%202.0%20FAQs.md

All of them are issues I've come across when trying to use the CLI and understand how it works.
The answers are based on the feedback I got from the forum (especially from abit, xeroc & pc)