Windows上的Docker:启动协议堆栈时出错:侦听unix/root/.ethereum/get.ipc:bind



在Windows 10系统上,我试图运行一个运行geth的Docker容器,该容器侦听端口8545。这个docker-compose.yml已经过测试,可以在Ubuntu和Mac OS X上完美运行。

docker compose 1.21.1版本,内部版本7641a569正在Windows 10系统上使用。

问题:Docker在执行docker-compose up后抛出错误。

致命:启动协议堆栈时出错:list-unix/root/.ethereum/get.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

问题是无法在链接到windows文件系统的卷上创建unix套接字。

这里有一个关于如何解决这个问题的链接。

最新更新