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.

Bug: 500 Error after finishing archive request.

See original GitHub issue

Using docker and ArchiveBox v0.4.9 web server interface. I’m getting a Server Error (500) when the post completes after I submit a new archive request in the web.

This is a fresh install and newly initialized instance. Can I increase the verbosity to see what’s making it mad?

REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
nikisweeting/archivebox   latest              3e02bd28e479        5 hours ago         1.07GB
Attaching to archivebox_1
archivebox_1  | [i] [2020-07-30 22:44:34] ArchiveBox v0.4.9: archivebox server 0.0.0.0:8000
archivebox_1  |     > /data
archivebox_1  |
archivebox_1  | [+] Starting ArchiveBox webserver...
archivebox_1  | [i] The admin username is: archivebox
archivebox_1  | Performing system checks...
archivebox_1  |
archivebox_1  | System check identified no issues (0 silenced).
archivebox_1  | July 30, 2020 - 22:44:35
archivebox_1  | Django version 3.0.8, using settings 'core.settings'
archivebox_1  | Starting development server at http://0.0.0.0:8000/
archivebox_1  | Quit the server with CONTROL-C.
archivebox_1  | [30/Jul/2020 22:45:01] "POST /admin/login/?next=/admin/core/snapshot/add/ HTTP/1.1" 302 0
archivebox_1  | [30/Jul/2020 22:45:01] "GET /admin/core/snapshot/add/ HTTP/1.1" 200 8756
archivebox_1  | [30/Jul/2020 22:45:01] "GET /static/admin/css/dashboard.css HTTP/1.1" 200 412
archivebox_1  | [+] Adding URL: https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca
archivebox_1  | [30/Jul/2020 22:45:19] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184
archivebox_1  | [+] [2020-07-30 22:45:19] Adding 1 links to index (crawl depth=0)...
archivebox_1  |     > Saved verbatim input to sources/1596149119-import.txt
archivebox_1  |     > Parsed 1 URLs from input (Plain Text)
archivebox_1  |     > Found 1 new URLs not already in index
archivebox_1  |
archivebox_1  | [*] [2020-07-30 22:45:19] Writing 1 links to main index...
    √ /data/index.sqlite3ta/index.sqlite3
    √ /data/index.json/data/index.json
    √ /data/index.html/data/index.html
archivebox_1  |
archivebox_1  | [▶] [2020-07-30 22:45:19] Collecting content for 1 Snapshots in archive...
archivebox_1  |
archivebox_1  | [+] [2020-07-30 22:45:19] "medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca"
archivebox_1  |     https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca
archivebox_1  |     > ./archive/1596149119
archivebox_1  |       > title
archivebox_1  |       > favicon
archivebox_1  |       > wget
archivebox_1  |       > pdf
archivebox_1  |       > screenshot
archivebox_1  |       > dom
archivebox_1  |       > media
archivebox_1  |       > archive_org
archivebox_1  |         Failed:
archivebox_1  |             TimeoutExpired Command '['curl', '--silent', '--location', '--head', '--compressed', '--max-time', '60', '--user-agent', 'ArchiveBox/0.4.9 (+https://github.com/pirate/ArchiveBox/) curl/curl 7.64.0 (x86_64-pc-linux-gnu)', 'https://web.archive.org/save/https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca']' timed out after 60 seconds
archivebox_1  |         Run to see full output:
archivebox_1  |             cd /data/archive/1596149119;
archivebox_1  |             curl --silent --location --head --compressed --max-time 60 --user-agent "ArchiveBox/0.4.9 (+https://github.com/pirate/ArchiveBox/) curl/curl 7.64.0 (x86_64-pc-linux-gnu)" https://web.archive.org/save/https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca
archivebox_1  |
archivebox_1  |
archivebox_1  | [√] [2020-07-30 22:46:48] Update of 1 pages complete (1.48 min)
archivebox_1  |     - 0 links skipped
archivebox_1  |     - 0 links updated
archivebox_1  |     - 1 links had errors
archivebox_1  |
archivebox_1  |     Hint: To view your archive index, open:
archivebox_1  |         /data/index.html
archivebox_1  |     Or run the built-in webserver:
archivebox_1  |         archivebox server
archivebox_1  |
archivebox_1  | [*] [2020-07-30 22:46:48] Writing 1 links to main index...
    √ /data/index.sqlite3ta/index.sqlite3
    √ /data/index.json/data/index.json
    √ /data/index.html/data/index.html
archivebox_1  |
archivebox_1  | [30/Jul/2020 22:46:48] "POST /admin/core/snapshot/add/? HTTP/1.1" 500 145

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
PokeyTheCatcommented, Jul 31, 2020

Ok I found the --debug flag for the server command. This is the cause of my issue.

Environment:

Request Method: POST
Request URL: http://localhost:8000/admin/core/snapshot/add/

Django Version: 3.0.8
Python Version: 3.8.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'core',
 'django_extensions']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware']

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/app/archivebox/core/admin.py", line 188, in add_view
    "stdout": ansi_to_html(add_stdout.getvalue().strip()),
  File "/app/archivebox/util.py", line 220, in ansi_to_html
    from .config import COLOR_DICT

Exception Type: ImportError at /admin/core/snapshot/add/
Exception Value: attempted relative import with no known parent package
Request Method: | POST
-- | --
http://localhost:8000/admin/core/snapshot/add/
3.0.8
ImportError
attempted relative import with no known parent package
/app/archivebox/util.py in ansi_to_html, line 220
/usr/local/bin/python
3.8.5
['/usr/local/bin',  '/usr/local/lib/python38.zip',  '/usr/local/lib/python3.8',  '/usr/local/lib/python3.8/lib-dynload',  '/usr/local/lib/python3.8/site-packages',  '/app',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox',  '/app/archivebox']
Fri, 31 Jul 2020 03:49:54 +0000
0reactions
mobedoorcommented, Oct 3, 2020

@pirate Thanks. That fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 500 Internal Server Error on Your WordPress Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request.
Read more >
How to Fix HTTP error code "500 internal server error"
The first thing to do when you encounter this error is wait a moment and then refresh the page. Sometimes this error is...
Read more >
'archive' never finishes; 500 internal server error #287 - GitHub
I ran into a bug with the published slate application. Upon hitting 'Archive', with 1 PNG file in my public slate, I got...
Read more >
Server 500 error - Internet Archive Forums: Re
MESSAGE: Server error 500 -- probably because our servers are overloaded right now. Please retry either now or later (by hitting refresh/reload).
Read more >
HTTP error 500: Where does the problem lie and how to fix it?
500 Internal Server Error - this error means that the problem occurred while connecting to the server and the website could not be...
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