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.

Bugfix: docker-compose instructions create a sonic container that fails to start

See original GitHub issue

Describe the bug

I followed the docker-compose instructions from the README. This is the result:

[root@Acheron archivebox]# docker-compose ps
         Name                        Command                State             Ports
--------------------------------------------------------------------------------------------
archivebox_archivebox_1   dumb-init -- /app/bin/dock ...   Up         0.0.0.0:8000->8000/tcp
archivebox_sonic_1        sonic -c /etc/sonic.cfg          Exit 101
[root@Acheron archivebox]# docker-compose logs sonic
Attaching to archivebox_sonic_1
sonic_1       | thread 'main' panicked at 'cannot read config file: Os { code: 21, kind: Other, message: "Is a directory" }', src/config/reader.rs:24:14
sonic_1       | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
sonic_1       | thread 'main' panicked at 'cannot read config file: Os { code: 21, kind: Other, message: "Is a directory" }', src/config/reader.rs:24:14
sonic_1       | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Search seems to work anyway.

I would expect one of:

a. sonic container is not created by default if it requires the user to manually create a config and is not necessary to run ArchiveBox b. config.cfg is created for me by the init script, using the environment variable I set in the docker-compose file c. config.cfg is not required by sonic (however, this is not the case: https://github.com/valeriansaliou/sonic/issues/197)

Steps to reproduce

From the README:

# create a new empty directory and initalize your collection (can be anywhere)
mkdir ~/archivebox && cd ~/archivebox
curl -O https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/docker-compose.yml
docker-compose run archivebox init
docker-compose run archivebox --version

# start the webserver and open the UI (optional)
docker-compose run archivebox manage createsuperuser
docker-compose up -d
open http://127.0.0.1:8000

# you can also add links and manage your archive via the CLI:
docker-compose run archivebox add 'https://example.com'
docker-compose run archivebox status
docker-compose run archivebox help  # to see more options

ArchiveBox version

[root@Acheron archivebox]# docker-compose run archivebox --version
Starting archivebox_sonic_1 ... done
Creating archivebox_archivebox_run ... done
ArchiveBox v0.5.3
Cpython Linux Linux-5.9.1-arch1-1-x86_64-with-glibc2.28 x86_64 (in Docker)

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.5.3          valid     /usr/local/bin/archivebox
 √  PYTHON_BINARY         v3.9.1          valid     /usr/local/bin/python3.9
 √  DJANGO_BINARY         v3.1.3          valid     /usr/local/lib/python3.9/site-packages/django/bin/django-admin.py
 √  CURL_BINARY           v7.64.0         valid     /usr/bin/curl
 √  WGET_BINARY           v1.20.1         valid     /usr/bin/wget
 √  NODE_BINARY           v15.5.1         valid     /usr/bin/node
 √  SINGLEFILE_BINARY     v0.1.14         valid     /node/node_modules/single-file/cli/single-file
 √  READABILITY_BINARY    v0.1.0          valid     /node/node_modules/readability-extractor/readability-extractor
 √  MERCURY_BINARY        v1.0.0          valid     /node/node_modules/@postlight/mercury-parser/cli.js
 √  GIT_BINARY            v2.20.1         valid     /usr/bin/git
 √  YOUTUBEDL_BINARY      v2021.01.03     valid     /usr/local/bin/youtube-dl
 √  CHROME_BINARY         v87.0.4280.88   valid     /usr/bin/chromium
 √  RIPGREP_BINARY        v0.10.0         valid     /usr/bin/rg

[i] Source-code locations:
 √  PACKAGE_DIR           22 files        valid     /app/archivebox
 √  TEMPLATES_DIR         3 files         valid     /app/archivebox/themes

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled
 -  COOKIES_FILE          -               disabled

[i] Data locations:
 √  OUTPUT_DIR            6 files         valid     /data
 √  SOURCES_DIR           1 files         valid     ./sources
 √  LOGS_DIR              0 files         valid     ./logs
 √  ARCHIVE_DIR           1 files         valid     ./archive
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf
 √  SQL_INDEX             204.0 KB        valid     ./index.sqlite3
[root@Acheron archivebox]# docker version
Client:
 Version:           20.10.2
 API version:       1.40
 Go version:        go1.15.6
 Git commit:        2291f610ae
 Built:             Tue Jan  5 19:56:21 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          19.03.13-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.15.2
  Git commit:       4484c46d9d
  Built:            Sat Sep 26 12:03:35 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.1.m
  GitCommit:        c623d1b36f09f8ef6536a057bd658b3aa8632828.m
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
[root@Acheron archivebox]# docker-compose version
docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:28 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
thedanbobcommented, Jan 20, 2021

Thanks @jdcaballerov, #625 fixes all of the false negatives I was seeing (and a few I didn’t catch before). I think all of the false positives can be chalked up to sonic’s fuzzy search which I wasn’t aware of at first.

1reaction
thedanbobcommented, Jan 20, 2021

A search for scar matches https://www.radiomods.co.nz/kenwood/kenwoodts440.html

jack fails to match that page but matches http://tarpn.net/t/faq/faq_networking_on_purpose.html and http://tarpn.net/t/faq/faq_packet_radio.html

brass, dirt, and mantra fail to match https://teddit.net/r/WritingPrompts/comments/5kxe94/wp_you_live_in_a_world_where_each_lie_creates_a/

dirt also matches https://nwavguy.blogspot.com/2011/07/o2-headphone-amp.html

I’m running the suggested docker-compose config with PDF, screenshot, DOM, readability, and archive.org saving turned off.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix and Debug Docker Containers Like a Superhero
Take the container's default command and attempt to run it again. A “command not found” error message will appear.
Read more >
Troubleshooting Docker - Sitecore Documentation
This topic has advice for troubleshooting problems with Docker Desktop for Windows and Docker-based Sitecore development.
Read more >
Best practices for building containers | Cloud Architecture Center
This article describes a set of best practices for building containers. These practices cover a wide range of goals, from shortening the ...
Read more >
Installation - Mealie - GitHub Pages
To use, create a docker-compose.yml file, paste the contents below and save. In the terminal run docker-compose up -d to start the container....
Read more >
Risky Behavior Assessing Fraud Risk and Avoidance Among ...
You'll start receiving the latest news, benefits, events, and programs ... Docker Data Volumes and Data Containers 4 Answered 2022 Droidrant ...
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