Skip to content

Node construction fails on Docker Toolbox #3094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
marionzualo opened this issue Aug 17, 2016 · 6 comments
Open

Node construction fails on Docker Toolbox #3094

marionzualo opened this issue Aug 17, 2016 · 6 comments

Comments

@marionzualo
Copy link

Version/Platform/Processor information (from ipfs version --all): ipfs version 0.4.4-dev

Type (bug, feature, meta, test failure, question): bug
Area (api, commands, daemon, fuse, etc): docker image
Priority (from P0: functioning, to P4: operations on fire): P2

Description:
I tried running the docker image and I ran into issues. I could not find this issue reported anywhere else so I am reporting it here. I am available to move it somewhere else if more appropriate.

You can find the output from my terminal below. I am running this on OS X:

$ docker run -d --name ipfs_host -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 8080:8080 -p 4001:4001 -p 5001:5001 ipfs/go-ipfs:latest
Unable to find image 'ipfs/go-ipfs:latest' locally
latest: Pulling from ipfs/go-ipfs
e110a4a17941: Pull complete
8df06ff256ec: Pull complete
c49bf4128b23: Pull complete
Digest: sha256:bf2118045b8c5c464b3baee82f0cb61465169cb2f4f186017226427480a9737f
Status: Downloaded newer image for ipfs/go-ipfs:latest
26fff16d2d14a85a57f2f5cd79633313a75a08bac35f3f39cc7af5ec005a5175

$ docker logs -f ipfs_host
ipfs version 0.4.4-dev
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
06:18:14.272 ERROR   cmd/ipfs: error from node construction: failure writing to dagstore: fsync: invalid argument daemon.go:295
Error: failure writing to dagstore: fsync: invalid argument

I tried removing the IPFS config directory and that did not fix the issue.

I still don't know how to fix this but I was considering trying to change the Docker image to use the version 0.4.2 instead of the version 0.4.4-dev (and see if the problem persists).

@whyrusleeping
Copy link
Member

@marionzualo thanks for reporting! I'm definitely not very well versed in docker, but being on OSX makes me wonder... Does the -v option work properly on OSX? Last i recalled, docker on OSX works by running a docker daemon in a vm, i'm not sure how well filesystem mounts across OS's work.

@whyrusleeping whyrusleeping added the kind/bug A bug in existing code (including security flaws) label Aug 17, 2016
@ghost
Copy link

ghost commented Aug 18, 2016

Tried to replicate. Got pulled this image dfa55261af77, with version ipfs version 0.4.4-dev. Didn't have any problems. Can you docker pull again @marionzualo? My output at 0900 GMT is

[ root: core ]# date
Thu Aug 18 08:59:33 UTC 2016
[ root: core ]# docker images | grep ipfs
ipfs/go-ipfs              latest              dfa55261af77        11 hours ago        41.99 MB

@marionzualo
Copy link
Author

@whyrusleeping Thanks for the pointer, I will look into the details of the -v option and see if it is something related to that. I will also try running the docker image using Linux as well.

@hermanjunge Thanks for the input I will try again then, and come back to you on an answer. Thanks.

@marionzualo
Copy link
Author

@whyrusleeping @hermanjunge I did some digging and I think the issue is somehow related to mounting the volumes.
I'm using an older machine which only works with Docker Toolbox (instead of Docker for Mac). When I tried running on a new Mac with Docker for Mac the image worked perfectly without issues.

I wanted to find and fix the issue so I could at least potentially update the docs but I am not that knowledgeable on Docker in order to do that.

Thanks for the help.

P.S.
Anyhow, I just need the image so I can host an IPFS node at a VPS. So I'll just run the docker image on Linux.

@adamjbradley
Copy link

I had the same experience. All tags worked on Docker for Mac but not Docker Toolbox on Mac OSX El Capitan

@ghost ghost changed the title Docker image not working Node construction fails on Docker Toolbox Jan 2, 2017
@ghost ghost reopened this Jan 2, 2017
@ghost ghost added topic/containers + vms and removed kind/bug A bug in existing code (including security flaws) labels Jan 2, 2017
@imars
Copy link

imars commented Jun 7, 2017

I'm getting a similar error using boot2docker (docker 17.05.0-ce, build 89658be)
on mac os with docker logs reporting:

ipfs version 0.4.9 Found IPFS fs-repo at /data/ipfs Initializing daemon... 07:20:37.426 ERROR cmd/ipfs: error from node construction: failure writing to dagstore: sync /data/ipfs/blocks: invalid argument daemon.go:337 Error: failure writing to dagstore: sync /data/ipfs/blocks: invalid argument

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

No branches or pull requests

4 participants