eos icon indicating copy to clipboard operation
eos copied to clipboard

Cannot create wallet

Open theabhinavdas opened this issue 9 years ago • 7 comments

I've followed the instructions on https://github.com/EOSIO/eos/tree/master/Docker.

Build succeeded and when I run docker-compose -f Docker/docker-compose.yml up, it works!

However, docker exec docker_eos_1 eosc wallet create gives me the following error:

490843ms thread-0 main.cpp:906 main ] Failed with error: 10 assert_exception: Assert Exception status_code == 200: Error : Unknown Endpoint

{"msg":"Unknown Endpoint"}
thread-0  httpc.cpp:113 call

{"server":"localhost","port":8888,"path":"/v1/wallet/create","postdata":"default"}
thread-0  httpc.cpp:117 call

theabhinavdas avatar Sep 19 '17 17:09 theabhinavdas

It appears that wallet plugin is missing. You have two options:

  1. start walletd
  2. Add following line to config.ini plugin = eos::wallet_api_plugin

Let me know if that works.

pavybez avatar Sep 20 '17 02:09 pavybez

Hi,

after enabling in docker plugin I had this error:

eos_1  | wallet api restricted to localhost
eos_1  |     {}
eos_1  |     thread-0  wallet_api_plugin.cpp:103 plugin_initialize
docker_eos_1 exited with code 0

0x83043 avatar Sep 20 '17 07:09 0x83043

How did you enable wallet plugin in docker? By adding to config.ini I presume? Can you attach the config.ini file and also post the command line you use?

pavybez avatar Sep 20 '17 07:09 pavybez

Yes, I have edited config.ini in attached directory.

Default command: docker-compose -f Docker/docker-compose.yml up

Config.ini:

# File to read Genesis State from
# genesis-json =
genesis-json = "/opt/eos/bin/data-dir/genesis.json"

# the location of the block log (absolute path or relative to application data dir)
block-log-dir = "blocks"

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =

# open the database in read only mode
readonly = 0

# the location of the chain shared memory files (absolute path or relative to application data dir)
shared-file-dir = "blockchain"

# Minimum size MB of database shared memory file
shared-file-size = 8192

# The local IP and port to listen for incoming http connections.
http-server-endpoint = 0.0.0.0:8888

# The Access-Control-Allow-Origin http value
# access-control-allow-origin = *

# The Access-Control-Allow-Headers http value
# access-control-allow-headers = Content-Type

# true if Access-Control-Allow-Credentials: true should be specified in http response header
# access-control-allow-credentials = true

# The local IP address and port to listen for incoming connections.
listen-endpoint = 0.0.0.0:9876

# The IP address and port of a remote peer to sync with.
# remote-endpoint =

# The public IP address and port that should be advertized to peers.
public-endpoint = 0.0.0.0:9876

# Enable block production, even if the chain is stale.
enable-stale-production = true

# Percent of producers (0-99) that must be participating in order to produce blocks
required-participation = false

# ID of producer controlled by this node (e.g. "inita", quotes are required, may specify multiple times)
# producer-name =
producer-name = inita
producer-name = initb
producer-name = initc
producer-name = initd
producer-name = inite
producer-name = initf
producer-name = initg
producer-name = inith
producer-name = initi
producer-name = initj
producer-name = initk
producer-name = initl
producer-name = initm
producer-name = initn
producer-name = inito
producer-name = initp
producer-name = initq
producer-name = initr
producer-name = inits
producer-name = initt
producer-name = initu

# Tuple of [PublicKey, WIF private key] (may specify multiple times)
private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]

# Plugin(s) to enable, may be specified multiple times
# plugin =

plugin = eos::producer_plugin
plugin = eos::chain_api_plugin
plugin = eos::http_plugin
plugin = eos::account_history_api_plugin
plugin = eos::account_history_plugin
plugin = eos::chain_plugin
plugin = eos::database_plugin
plugin = eos::net_plugin
#plugin = eos::template_plugin
plugin = eos::wallet_api_plugin
plugin = eos::wallet_plugin

I understood that didn't start walletd. How I can do it for docker?

0x83043 avatar Sep 20 '17 07:09 0x83043

hmm. strange. I am trying to build a docker image so that I can debug the issue. I see the following line in wallet_api_plugin.cpp file:

  `const auto& lipstr = options.at("http-server-endpoint").as<string>();
  const auto& host = lipstr.substr(0, lipstr.find(':'));
  if (host != "localhost" && host != "127.0.0.1") {
     FC_THROW("wallet api restricted to localhost");`

Could you modify http-server-endpoint to 127.0.0.1 or localhost from 0.0.0.0 and see if that works?

pavybez avatar Sep 20 '17 07:09 pavybez

It's working with 127.0.0.1. I created the wallet.

0x83043 avatar Sep 20 '17 07:09 0x83043

Great thanks. I will close this issue and raise a bug.

pavybez avatar Sep 20 '17 07:09 pavybez