Comments (8)
Can you give me your Vagrantfile?
from vault-ethereum.
Also, what is your host OS?
from vault-ethereum.
Just saw this - https://www.vaultproject.io/docs/configuration/index.html#disable_mlock
sudo setcap cap_ipc_lock=+ep $(readlink -f $(which vault))
Testing with that...
from vault-ethereum.
my Vagrant file is tied to a bunch internal infrastructure.
I am testing on Ubuntu 16.04
$ uname -a
Linux vagrant-vbox-1 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
from vault-ethereum.
Ok. After I saw the setcap
call, I figured out what was going on...
Basically, this sudo setcap cap_ipc_lock=+ep $(readlink -f $(which vault))
allows the vault process to read memory without being root. So, the only thing that needs to be done is to allow the plugin to do the same. (Since it is a separate process.)
$ sudo setcap cap_ipc_lock=+ep $(readlink -f /home/vagrant/etc/vault.d/vault_plugins/vault-ethereum)
Of course, replace /home/vagrant/etc/vault.d/vault_plugins/vault-ethereum
with the location of your plugin.
Please let me know if that works for you.
from vault-ethereum.
ah clever! That got me over the cannot allocate memory
error. But now I am hitting this error when starting vault:
Mar 15 23:29:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:29:53.252994 [DEBUG] plugin.metadata: starting plugin: path=/etc/vault/plugins/vault-ethereum args=[/etc/vault/plugins/vault-ethereum]
Mar 15 23:29:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:29:53.253577 [DEBUG] plugin.metadata: waiting for RPC address: path=/etc/vault/plugins/vault-ethereum
Mar 15 23:29:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:29:53.283952 [DEBUG] plugin.metadata.vault-ethereum: plugin address: address=/tmp/plugin983040137 network=unix
Mar 15 23:29:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:29:53.285918 [WARN ] plugin.metadata: error closing client during Kill: err=rpc error: code = Canceled desc = grpc: the client connection is closing
Mar 15 23:29:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:29:53.289647 [DEBUG] plugin.metadata: plugin process exited: path=/etc/vault/plugins/vault-ethereum
and attempting to write to accounts gets me this error
$ vault write ethereum/test4 chain_id=1977
Error writing data to ethereum/accounts/test4: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/ethereum/accounts/test4
Code: 500. Errors:
* 1 error occurred:
* rpc error: code = Unavailable desc = transport is closing
corresponding to this in the vault
logs:
Mar 15 23:31:16 vagrant-vbox-1 vault[8870]: 2018/03/15 23:31:16.621148 [DEBUG] plugin: plugin process exited: path=/etc/vault/plugins/vault-ethereum
Mar 15 23:31:53vagrant-vbox-1 vault[8870]: 2018/03/15 23:31:53.300739 [WARN ] plugin: error closing client during Kill: err=rpc error: code = Canceled desc = grpc: the client connection is closing
Mar 15 23:31:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:31:53.470534 [DEBUG] plugin: starting plugin: path=/etc/vault/plugins/vault-ethereum args=[/etc/vault/plugins/vault-ethereum]
Mar 15 23:31:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:31:53.472178 [DEBUG] plugin: waiting for RPC address: path=/etc/vault/plugins/vault-ethereum
Mar 15 23:31:53 vagrant-vbox-1 vault[8870]: 2018/03/15 23:31:53.558112 [DEBUG] plugin.vault-ethereum: plugin address: address=/tmp/plugin093062371 network=unix
Incidentally, running vault read ethereum/test1
on an existing account works fine.
again setting disable_mlock
to true
makes the error go away.
from vault-ethereum.
I was able to successfully execute vault write ethereum/test4 chain_id=1977
with mlock with the above setcap
commands. However, I am running with TLS.
If you want to run in a production setting, then you should use TLS. I haven't tested much without TLS of late because I never use vault without it.
You can see how I configure vault with TLS (and install the plugin) here
from vault-ethereum.
fair enough on TLS. Once I turned TLS on, everything works fine.
I see the follow error logs when starting vault, but plugin seems to still function.
Mar 16 00:36:36 vault-i-x vault[28310]: 2018/03/16 00:36:36.248995 [DEBUG] plugin.metadata: starting plugin: path=/etc/vault/plugins/vault-ethereum args=[/etc/vault/plugins/vault-ethereum --ca-cert=/etc/ssl/certs/ca.pem --client-cert=/etc/vault/ssl/certs/vault.crt --client-key=/etc/vault/ssl/private/vault.key]
Mar 16 00:36:36 vault-i-x vault[28310]: 2018/03/16 00:36:36.249913 [DEBUG] plugin.metadata: waiting for RPC address: path=/etc/vault/plugins/vault-ethereum
Mar 16 00:36:36 vault-i-x vault[28310]: 2018/03/16 00:36:36.289086 [DEBUG] plugin.metadata.vault-ethereum: plugin address: address=/tmp/plugin033840308 network=unix
Mar 16 00:36:36 vault-i-x vault[28310]: 2018/03/16 00:36:36.296467 [WARN ] plugin.metadata: error closing client during Kill: err=rpc error: code = Canceled desc = grpc: the client connection is closing
Mar 16 00:36:36 vault-i-x vault[28310]: 2018/03/16 00:36:36.301168 [DEBUG] plugin.metadata: plugin process exited: path=/etc/vault/plugins/vault-ethereum
from vault-ethereum.
Related Issues (20)
- Unable to use Self Signed Certificate
- Can we save string data inside ethereum HOT 1
- How to pass hex string data to sign-tx HOT 7
- Finding Logs for the ethereum plugin HOT 3
- Error when installing vault-ethereum plugin HOT 9
- Error in path_blocks.go HOT 1
- Feature questions: importing ABI, filtering, and logging HOT 2
- Unrecognized remote plugin message HOT 15
- Error writing data to ethereum-plugin/config: Error making API request. HOT 2
- Error when setting config HOT 1
- When "address_to" is not mentioned during the transaction signing, the funds are transferred to NULL address. HOT 1
- Can I use vault plugin for quorum? HOT 1
- unusable message signing (ethereum/accounts/:name/sign and ethereum/accounts/:name/verify) HOT 9
- unable to install
- sign-tx function sign transaction incorrectly.
- Sign message & verify signed message are not working properly HOT 1
- Unable to modify gas_limit parameter on sign-tx request HOT 1
- Curl not working properly for Erc20, Erc721 HOT 1
- How to backup data
- Unable to enable secrets path using newer version of Vault and ethereum plugin binary
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vault-ethereum.