Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Polkadot/Parity v0.9.3 docker container dies with resolv.config parse error #3259

Open
vishgpt opened this issue Jun 15, 2021 · 10 comments
Open

Comments

@vishgpt
Copy link

vishgpt commented Jun 15, 2021

Hi Team,

I am trying to setup polkadot node and following the exact instructions given in this documentation. But my node does not work and docker container gets stopped with below mentioned error:

Error:
0: IO Error
1: Error parsing resolv.conf: InvalidOption(3)

Steps that i have executed on Ubuntu 18.04 version:
docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/polkadot parity/polkadot:latest --chain polkadot --rpc-external --rpc-cors all

Logs:
2021-06-15 13:20:23 Parity Polkadot
2021-06-15 13:20:23 ✌️ version 0.9.3-aa3867609-x86_64-linux-gnu
2021-06-15 13:20:23 ❤️ by Parity Technologies [email protected], 2017-2021
2021-06-15 13:20:23 📋 Chain specification: Polkadot
2021-06-15 13:20:23 🏷 Node name: sore-kitten-4526
2021-06-15 13:20:23 👤 Role: FULL
2021-06-15 13:20:23 💾 Database: RocksDb at /polkadot/.local/share/polkadot/chains/polkadot/db
2021-06-15 13:20:23 ⛓ Native runtime: polkadot-9030 (parity-polkadot-0.tx7.au0)
Error:
0: IO Error
1: Error parsing resolv.conf: InvalidOption(3)

Location:
src/main.rs:25

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __libc_start_main
at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

Any help would be greatly appreciated.

@vishgpt
Copy link
Author

vishgpt commented Jun 15, 2021

@freiit: Any help would be highly appreciated

@bkchr
Copy link
Member

bkchr commented Jun 15, 2021

CC @s3krit

@arturgontijo
Copy link

I've got a Permission Denied error instead of the resolv.conf one...
I was able to fix it by running the container as root (-u 0):

docker run --name POLKADOT_NODE -d -p 30333:30333 -p 9933:9933 -u 0 -v /tmp/polkadot:/root/.local/share/polkadot/ parity/polkadot:latest --chain polkadot --rpc-external --rpc-cors all

Maybe that would also fix your issue @vishgpt

@arturgontijo
Copy link

Another approach would be using host network (no need to expose ports):

docker run \
  --name POLKADOT_NODE \
  --network host \
  -v /tmp/polkadot:/root/.local/share/polkadot/ \
  -d parity/polkadot:latest --chain polkadot --rpc-external --rpc-cors all

@vishgpt
Copy link
Author

vishgpt commented Jun 15, 2021

I tried both above options given but still facing the same issue. Any other suggestions?

@arturgontijo
Copy link

arturgontijo commented Jun 15, 2021

@vishgpt looks like you have some issue with your host /etc/resolv.conf.

Are you able to run any other Docker image?

docker run \
  --name UBUNTU_20_04 \
  -ti ubuntu:20.04 bash

Then, inside the container, run:

apt update

Just to check if it's able to resolve the apt source server names.

@vishgpt
Copy link
Author

vishgpt commented Jun 17, 2021

@arturgontijo Yes, i am able to run many other docker images. I am using Ubuntu 18.04... does that seem to be a problem?

@freiit
Copy link

freiit commented Jun 17, 2021

I tried to reproduce by reducing complexity.

I called

docker pull parity/polkadot:latest
docker run -ti parity/polkadot:latest --chain polkadot --rpc-external --rpc-cors all

and my output does not produce any error:

2021-06-17 03:58:28  Parity Polkadot 
2021-06-17 03:58:28  ✌️  version 0.9.3-aa3867609-x86_64-linux-gnu    
2021-06-17 03:58:28  ❤️  by Parity Technologies <[email protected]>, 2017-2021    
2021-06-17 03:58:28  📋 Chain specification: Polkadot    
2021-06-17 03:58:28  🏷 Node name: decisive-paste-6777    
2021-06-17 03:58:28  👤 Role: FULL    
2021-06-17 03:58:28  💾 Database: RocksDb at /polkadot/.local/share/polkadot/chains/polkadot/db    
2021-06-17 03:58:28  ⛓  Native runtime: polkadot-9030 (parity-polkadot-0.tx7.au0)    
2021-06-17 03:58:29  🔨 Initializing Genesis block/state (state: 0x29d0…4e17, header-hash: 0x91b1…90c3)    
2021-06-17 03:58:29  👴 Loading GRANDPA authority set from genesis on what appears to be first startup.    
2021-06-17 03:58:30  ⏱  Loaded block-time = 6s from block 0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3    

I assume the error message you got shows the real issue already:

1: Error parsing resolv.conf: InvalidOption(3)

What is in your resolv.conf?

@vishgpt
Copy link
Author

vishgpt commented Jun 17, 2021

Below is my resolv.conf:

This file is being maintained by Puppet.

DO NOT EDIT

search us.deloitte.com
options timeout:5 retries:2
nameserver 10.152.0.110
nameserver 10.152.0.111

@freiit
Copy link

freiit commented Jun 17, 2021

You need to put your file in a code block, otherwise the control characters (like #) interfere with markdown from Github.

Beside that - error code says InvalidOption - maybe that line "options" does not make any sense. This file is not part of the docker container installation and I can't help you with this.

Maybe delete or edit that file? Its in your local system, not in the docker container, so you generated or copied it from somewhere? Again - can't help you with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants