首页 文章

go-ethereum - geth - puppeth - ethstat远程服务器:docker:command not found

提问于
浏览
4

我正在尝试使用Puppeth设置一个私有的以太坊测试网络(如Péter Szilágyi demoed in Ethereum devcon three 2017) . 我在macbook pro(macOS Sierra)上运行它 .

当我尝试设置ethstat网络组件时,出现 "docker configured incorrectly: bash: docker: command not found" 错误 . 我有docker运行,我可以在终端中使用它,例如码头 Worker

以下是我采取的步骤:

What would you like to do? (default = stats)
 1. Show network stats
 2. Manage existing genesis
 3. Track new remote server
 4. Deploy network components
> 4

What would you like to deploy? (recommended order)
 1. Ethstats  - Network monitoring tool
 2. Bootnode  - Entry point of the network
 3. Sealer    - Full node minting new blocks
 4. Wallet    - Browser wallet for quick sends (todo)
 5. Faucet    - Crypto faucet to give away funds
 6. Dashboard - Website listing above web-services
> 1

Which server do you want to interact with?
 1. Connect another server
> 1

Please enter remote server's address:
> localhost
DEBUG[11-15|22:46:49] Attempting to establish SSH connection   server=localhost
WARN [11-15|22:46:49] Bad SSH key, falling back to passwords   path=/Users/xxx/.ssh/id_rsa      err="ssh: cannot decode encrypted private keys"
The authenticity of host 'localhost:22 ([::1]:22)' can't be established.
SSH key fingerprint is xxx [MD5]
Are you sure you want to continue connecting (yes/no)? yes
What's the login password for xxx at localhost:22? (won't be echoed)
>
DEBUG[11-15|22:47:11] Verifying if docker is available         server=localhost
ERROR[11-15|22:47:11] Server not ready for puppeth             err="docker configured incorrectly: bash: docker: command not found\n"

这是我的问题:

  • 是否有任何文档/教程描述如何正确设置此远程服务器 . 或者只是在puppeth一般?

  • 我可以不使用localhost作为"remote server address"

  • 关于未找到docker命令的任何想法(它已安装并正在运行,我可以在终端中使用它) .

2 回答

  • 0

    这就是我做的 .

    • 对于docker,您必须使用docker-compose二进制文件 . 你可以找到here .

    • 此外,您必须确保在本地主机上运行ssh服务器并且已生成密钥 .

    • 我没有找到任何关于puppeth的文件 .

  • 0

    我想我找到了这个问题的根本原因 . SSH守护程序使用默认路径进行编译 . 如果你 ssh 到具有特定命令的机器(除了shell),你将获得该默认路径 . 这不包括 /usr/local/bin ,例如 docker 在我的情况下 .

    我在这里找到了解决方案:https://serverfault.com/a/585075

    • 编辑 /etc/ssh/sshd_config 并确保它包含 PermitUserEnvironment yes (您需要使用 sudo 进行编辑)

    • 创建一个文件 ~/.ssh/environment ,其中包含您想要的路径,在我的情况下: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

    当你现在运行 ssh localhost env 时,你会看到 PATH 与你在 ~/.ssh/environment 中放置的任何内容相匹配 .

相关问题