question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't start a container using a named volume

See original GitHub issue

Describe the bug

Can’t get ArchiveBox to run with data in a named volume. If I just map a standard folder, it works though.

Steps to reproduce

I’m trying to use docker-compose. My file:

version: "3"

services:
  archivebox:
    image: nikisweeting/archivebox
    volumes:
      - archivebox_files:/data
    ports:
      - 8000:8000 

volumes:
  archivebox_files:

First I run docker-compose up --no-start to create the container and volume without starting anything.

Then, running docker-compose run archivebox init keeps failing on permission errors. I tried creating the folders manually within the volume, and setting everything in the volume to mode 777, but nothing helped.

Screenshots or log output

image



#### Software versions

 - OS: Ubuntu Server 18 LTS
 - ArchiveBox version:        latest docker image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
piratecommented, Apr 2, 2021

@dohlin I would also recommend the incremental upgrade, although you don’t have to do it though every intermediate version. v0.4.x was specifically designed to handle importing really old archives, so if you go from the old version to v0.4.24, then from there to v0.5.6, it should work in only 2 steps. 2k links is well within the realm of what it can handle, it should only start getting sketchy above ~25k links (and v0.6 coming soon is tested to be stable up to 150k). v0.6 also has many fixes that improve performance overall, though it’s not totally solved the db locking issue, it should be much better when that comes out.

Also as @mAAdhaTTah mentioned, make sure you have the webserver stopped and only use 1 CLI process to do the upgrade/import, there should be no concurrency / locking issues with only 1 process.

1reaction
mAAdhaTTahcommented, Apr 2, 2021

@dohlin If you import the links one at a time, via the CLI, and keep the web server off during that time, you should only have the CLI process locking/using the db which should minimize/eliminate the problem.

Alternatively, if you still have the results from the early build, i would update incrementally. Meaning, instead of going straight to the current version, you install each incremental version, upgrade the content, then install the next version. This might be safer than tryna go all the way at once.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I start a Docker container with a volume - Edureka
You can do this either by using -v or --mount. Here's how you can do it. $ docker run -d \ --name mycontainer1...
Read more >
Troubleshoot volume errors - Docker Documentation
This topic discusses errors which may occur when you use Docker volumes or bind mounts. Error: Unable to remove filesystem. Some container-based utilities, ......
Read more >
docker-compose named volume with one file: ERROR
A named volume is always a directory, so trying to mount that over the /bin/wkhtmltopdf file in the second container causes the error...
Read more >
Understanding and managing Docker container volumes
The name allows you to easily locate and assign Docker volumes to containers. Step 1: Create and name a volume. To create a...
Read more >
Understanding Docker Volumes - Earthly Blog
When you run the container, Docker will create an anonymous volume (volume with a unique id as the name) and mount it to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found