在Windows 10系统上,我尝试运行运行geth
的Docker容器,该容器侦听端口8545。此docker-compose.yml
经过测试可在Ubuntu和Mac OS X上完美运行。 / p>
Windows 10系统上正在使用
docker-compose版本1.21.1,内部版本7641a569 。
问题::Docker在执行docker-compose up
之后抛出错误。
致命:启动协议栈时出错:监听Unix /root/.ethereum/geth.ipc:bind:不允许操作
什么可能导致此错误,我们如何解决呢?
docker-compose.yml
version: '3'
services:
geth:
image: ethereum/client-go:latest
volumes:
- ./nodedata:/root/.ethereum
- ./files/genesis.json:/root/genesis.json:ro
ports:
- 30303:30303
- "30303:30303/udp"
- 8545:8545
- 8546:8546
command: --networkid 1337 --cache 512 --port 30303 --maxpeers 50 --rpc --rpcaddr "0.0.0.0" --rpcapi "eth,personal,web3,net" --bootnodes enode://0b37f58139bef9fef04ff50c1d2d95acade0b6989433ed2148683f294a12e8ca7eb17915864a0dd61d5533e898b7040b75df1a17cca27e90d106f95dea255b45@167.99.55.99:30303
container_name: geth-nosw
运行docker-compose up
Starting geth-node ... done
Attaching to geth-node
geth-node | INFO [07-22|20:43:11.482] Maximum peer count ETH=50 LES=0 total=50
geth-node | INFO [07-22|20:43:11.488] Starting peer-to-peer node instance=Geth/v1.8.13-unstable-526abe27/linux-amd64/go1.10.3
geth-node | INFO [07-22|20:43:11.488] Allocated cache and file handles database=/root/.ethereum/geth/chaindata cache=384 handles=1024
geth-node | INFO [07-22|20:43:11.521] Initialised chain configuration config="{ChainID: 1337 Homestead: 1 DAO: <nil> DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: clique}"
geth-node | INFO [07-22|20:43:11.521] Initialising Ethereum protocol versions="[63 62]" network=1366
geth-node | INFO [07-22|20:43:11.524] Loaded most recent local header number=0 hash=b85de5…3971b4 td=1
geth-node | INFO [07-22|20:43:11.524] Loaded most recent local full block number=0 hash=b85de5…3971b4 td=1
geth-node | INFO [07-22|20:43:11.524] Loaded most recent local fast block number=0 hash=b85de5…3971b4 td=1
geth-node | INFO [07-22|20:43:11.525] Loaded local transaction journal transactions=0 dropped=0
geth-node | INFO [07-22|20:43:11.530] Regenerated local transaction journal transactions=0 accounts=0
geth-node | INFO [07-22|20:43:11.530] Starting P2P networking
geth-node | INFO [07-22|20:43:13.670] UDP listener up self=enode://3e0e8e9a886a347fffb0150e670b45c8ae19f0f87ebb6d3fa0f7f312f17220b426913ac96df9527ae0ca00138c9e50ffe646255d5655e6023c47ef10aabf0224@[::]:30303
geth-node | INFO [07-22|20:43:13.672] Stats daemon started
geth-node | INFO [07-22|20:43:13.674] RLPx listener up self=enode://3e0e8e9a886a347fffb0150e670b45c8ae19f0f87ebb6d3fa0f7f312f17220b426913ac96df9527ae0ca00138c9e50ffe646255d5655e6023c47ef10aabf0224@[::]:30303
geth-node | INFO [07-22|20:43:13.676] Blockchain manager stopped
geth-node | INFO [07-22|20:43:13.677] Stopping Ethereum protocol
geth-node | INFO [07-22|20:43:13.677] Ethereum protocol stopped
geth-node | INFO [07-22|20:43:13.677] Transaction pool stopped
geth-node | INFO [07-22|20:43:13.681] Database closed database=/root/.ethereum/geth/chaindata
geth-node | INFO [07-22|20:43:13.681] Stats daemon stopped
geth-node | Fatal: Error starting protocol stack: listen unix /root/.ethereum/geth.ipc: bind: operation not permitted
geth-node | Fatal: Error starting protocol stack: listen unix /root/.ethereum/geth.ipc: bind: operation not permitted
geth-node exited with code 1