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

0 Members and 1 Guest are viewing this topic.

jakub

  • Guest
Re: !!! Stupid Questions Thread !!!
« Reply #810 on: January 15, 2016, 12:53:00 pm »
(1) How can I close the CLI client in a clean way?
There seems to be no command for that (something like "exit" or "quit") and closing the whole window produces a nasty exception.

(2) Regarding the witness node, is it safe to delete logs stored here?
witness_node_data_dir\logs\p2p
They occupy a lot of disk space.

PS. Shall we have a separate "Stupid Questions Thread" dedicated purely to CLI and technical issues regarding Graphene?
Maybe a separate forum thread would be a good way to fill in the gaps in the docs.bitshares.eu documentation.
« Last Edit: January 15, 2016, 01:01:16 pm by jakub »

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: !!! Stupid Questions Thread !!!
« Reply #811 on: January 15, 2016, 03:52:28 pm »
(1) How can I close the CLI client in a clean way?
There seems to be no command for that (something like "exit" or "quit") and closing the whole window produces a nasty exception.

Under Linux you'd type CTRL-D to signal end-of-input.


(2) Regarding the witness node, is it safe to delete logs stored here?
witness_node_data_dir\logs\p2p
They occupy a lot of disk space.

Yes, but
- they're rotated automatically after 24 hours I think
- if you delete them anyway you should probably modify config.ini so they aren't written to disk in the first place.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

jakub

  • Guest
Re: !!! Stupid Questions Thread !!!
« Reply #812 on: January 17, 2016, 09:51:34 am »
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.

[member=120]xeroc[/member], 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)

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12915
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: !!! Stupid Questions Thread !!!
« Reply #813 on: January 18, 2016, 08:00:22 am »
[member=120]xeroc[/member], 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
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

jakub

  • Guest
Re: !!! Stupid Questions Thread !!!
« Reply #814 on: January 20, 2016, 09:42:35 pm »
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?

jakub

  • Guest
Re: !!! Stupid Questions Thread !!!
« Reply #815 on: January 21, 2016, 06:49:08 pm »
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 »

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: !!! Stupid Questions Thread !!!
« Reply #816 on: January 21, 2016, 09:24:33 pm »
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
Re: !!! Stupid Questions Thread !!!
« Reply #817 on: January 21, 2016, 10:19:18 pm »
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 xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12915
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: !!! Stupid Questions Thread !!!
« Reply #818 on: January 22, 2016, 09:34:27 am »
sudo npm install -g wscat
wscat -n -c ws://localhost:8090
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

jakub

  • Guest
Re: !!! Stupid Questions Thread !!!
« Reply #819 on: January 22, 2016, 10:46:13 am »
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 [member=11456]svk[/member] to remove this "wss" protocol  enforcement and allow "ws" as well?

Offline svk

Re: !!! Stupid Questions Thread !!!
« Reply #820 on: January 22, 2016, 12:20:12 pm »
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 [member=11456]svk[/member] 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 [member=12639]valzav[/member] to exclude the ws apis from the openledger build but forgot to mention it.

Worker: dev.bitsharesblocks

jakub

  • Guest
Re: !!! Stupid Questions Thread !!!
« Reply #821 on: January 22, 2016, 12:37: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 [member=12639]valzav[/member] 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 xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12915
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: !!! Stupid Questions Thread !!!
« Reply #822 on: January 22, 2016, 12:50:46 pm »
you can't run a TLS enpoint if you don't offer the node a CERTIFICATE
--server-pem
--server-pem-password
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline svk

Re: !!! Stupid Questions Thread !!!
« Reply #823 on: January 22, 2016, 01:02:50 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 [member=12639]valzav[/member] 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 Thom

Re: !!! Stupid Questions Thread !!!
« Reply #824 on: January 22, 2016, 04:27:11 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 [member=12639]valzav[/member] 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