lightstreams-network / lightchain

Fast proof-of-authority blockchain based on go-ethereum and tendermint
https://lightstreams.network
GNU General Public License v3.0
55 stars 16 forks source link

Docker Errors on Windows #181

Closed joesixpack closed 5 years ago

joesixpack commented 5 years ago

System information

Lightchain version: 1.2.0
OS & version: Windows 10

Expected behaviour

Node should start and stay up.

Actual behaviour

Starts but ends with an error.

Steps to reproduce the behaviour

docker run -d --restart unless-stopped --name lightchain -v "C:\Users\J\Docker\lightchain_docker\":/srv/lightchain -e "NETWORK=mainnet" -p 8545:8545 -p 26657:26657 -p 26656:26656 lightstreams/lightchain:v1.2.0

Console output (if applicable)

INFO [06-14|22:56:09.999] Launching Lightchain node...             module=lightchain
Using config file: /srv/lightchain/consensus/config/config.toml
INFO [06-14|22:56:10.044] Maximum peer count                       ETH=25 LES=0 total=25
INFO [06-14|22:56:10.079] Starting database engine...              engine=node
INFO [06-14|22:56:10.089] Starting peer-to-peer node               instance=./v1.8.23/linux-amd64/go1.10.3
INFO [06-14|22:56:10.089] Allocated cache and file handles         database=/srv/lightchain/database/chaindata cache=256 handles=524288
INFO [06-14|22:56:10.338] Persisted trie from memory database      nodes=3 size=415.00B time=33.2µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [06-14|22:56:10.342] Initialised chain configuration          config="{ChainID: 163 Homestead: <nil> DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: <nil>  ConstantinopleFix: <nil> Engine: unknown}"
WARN [06-14|22:56:10.343] Ethash used in fake mode
INFO [06-14|22:56:10.343] Initialising Ethereum protocol           versions="[63 62]" network=163
INFO [06-14|22:56:10.377] Loaded most recent local header          number=0 hash=d6c00c…9f1db3 td=1024 age=50y2mo1d
INFO [06-14|22:56:10.377] Loaded most recent local full block      number=0 hash=d6c00c…9f1db3 td=1024 age=50y2mo1d
INFO [06-14|22:56:10.377] Loaded most recent local fast block      number=0 hash=d6c00c…9f1db3 td=1024 age=50y2mo1d
INFO [06-14|22:56:10.618] Waiting for tendermint endpoint to start engine=database err="Post http://127.0.0.1:26657/status: dial tcp 127.0.0.1:26657: connect: connection refused" result="{NodeInfo:{ProtocolVersion:{P2P:0 Block:0 App:0} ID_: ListenAddr: Network: Version: Channels: Moniker: Other:{TxIndex: RPCAddress:}} SyncInfo:{LatestBlockHash: LatestAppHash: LatestBlockHeight:0 LatestBlockTime:0001-01-01 00:00:00 +0000 UTC CatchingUp:false} ValidatorInfo:{Address: PubKey:<nil> VotingPower:0}}"
INFO [06-14|22:56:10.619] New local node record                    seq=3 id=0e20eedb58d48eaa ip=127.0.0.1 udp=0 tcp=30303
INFO [06-14|22:56:10.619] Started P2P networking                   self="enode://cde1f0473f4a9734e96d9997abd5f4ebefaa725dd9878d4094fee75ca3be73dd64f01776ca6edbd2dc2a4852e8fb41c1aede952e9bd4d9827b3f11d19218c0c8@127.0.0.1:30303?discport=0"
INFO [06-14|22:56:10.634] Blockchain manager stopped
INFO [06-14|22:56:10.634] Transaction pool stopped
INFO [06-14|22:56:10.656] Database closed                          database=/srv/lightchain/database/chaindata
ERROR[06-14|22:56:12.718] lightchain node could not be started: listen unix /srv/lightchain/database/geth.ipc: bind: operation not permitted module=lightchain
ggarri commented 5 years ago

Hi @joesixpack , sorry for the late reply we have been flat out with other issues.

Your issue seems to be related to an issue on the write permission on the host volume. I have been trying to reproduce your issue and I could not make it. Do you mind to provide also the docker version you are using?

In meanwhile I did a quick research on the topic and I found couple links which might be useful:

joesixpack commented 5 years ago

image

joesixpack commented 5 years ago

I was able to get it working with -v lightchain_docker:/srv/lightchain

ggarri commented 5 years ago

Glad to hear you got it working :)

joesixpack commented 5 years ago

BTW, if you're in charge of the Docker container, could you add a latest tag to the repository? I would like to use that to make sure the latest release is always pulled.

ggarri commented 5 years ago

Sure, that sounds like a good idea. We will do that on the next version release.

In meanwhile we already have a Dockerfile which build lightchain binary from the source code. Master branch is always including the latest stable version, therefore, you could just run:

make docker-dev

and it will generate a docker image with the tag lightchain:latest-dev