Author Topic: !!! Stupid Questions Thread !!!  (Read 251523 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: 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

  • Guest
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:
Code: [Select]
witness_node --rpc-tls-endpoint 127.0.0.1:8089hoping 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?

Offline Thom

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:
Code: [Select]
witness_node --rpc-tls-endpoint 127.0.0.1:8089hoping 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: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline svk

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:
Code: [Select]
witness_node --rpc-tls-endpoint 127.0.0.1:8089hoping 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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
you can't run a TLS enpoint if you don't offer the node a CERTIFICATE
--server-pem
--server-pem-password

jakub

  • Guest
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:
Code: [Select]
witness_node --rpc-tls-endpoint 127.0.0.1:8089hoping this one would be compatible with "wss" but it does not work.

Offline svk

sudo npm install -g wscat
wscat -n -c ws://localhost:8090

My local witness node:
Code: [Select]
witness_node --rpc-endpoint 127.0.0.1:8090 --rpc-tls-endpoint 127.0.0.1:8089

Here are the results from wscat:

Code: [Select]
wscat -n -c ws://localhost:8090connected

Code: [Select]
wscat -n -c wss://localhost:8090no response

Code: [Select]
wscat -n -c ws://localhost:8089error: Error: connect ECONNREFUSED 127.0.0.1:8089

Code: [Select]
wscat -n -c wss://localhost:8089error: 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

  • Guest
sudo npm install -g wscat
wscat -n -c ws://localhost:8090

My local witness node:
Code: [Select]
witness_node --rpc-endpoint 127.0.0.1:8090 --rpc-tls-endpoint 127.0.0.1:8089

Here are the results from wscat:

Code: [Select]
wscat -n -c ws://localhost:8090connected

Code: [Select]
wscat -n -c wss://localhost:8090no response

Code: [Select]
wscat -n -c ws://localhost:8089error: Error: connect ECONNREFUSED 127.0.0.1:8089

Code: [Select]
wscat -n -c wss://localhost:8089error: 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?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
sudo npm install -g wscat
wscat -n -c ws://localhost:8090

jakub

  • Guest
I have my witness node running locally with these settings:

Code: [Select]
# 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:
Code: [Select]
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:
Code: [Select]
witness_node --rpc-tls-endpoint 127.0.0.1:8089
And I've set the API connection in the GUI to this:
Code: [Select]
wss://127.0.0.1:8089
But still I get this error in the GUI:
Code: [Select]
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

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
I have my witness node running locally with these settings:

Code: [Select]
# 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:
Code: [Select]
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 http://bitcoin.quisquis.de

jakub

  • Guest
I have my witness node running locally with these settings:

Code: [Select]
# 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:
Code: [Select]
wss://localhost
wss://localhost:8090
wss://localhost:8090/ws
but none of these seem to work.
« Last Edit: January 21, 2016, 07:28:25 pm by jakub »

jakub

  • Guest
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?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
@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)

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

  • Guest
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)