borgweb icon indicating copy to clipboard operation
borgweb copied to clipboard

fresh install leads to 404 not found on index.view

Open SR-G opened this issue 7 years ago • 2 comments

Fresh install in a docker container, by using python3 on a debian slim base image.

Result :

Logs are not helpful at all :

 * Serving Flask app "borgweb.app" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 669-301-981
192.168.8.3 - - [18/Aug/2018 15:04:54] "GET /index.view HTTP/1.1" 404 -
192.168.8.3 - - [18/Aug/2018 15:04:54] "GET /static/bootstrap/bootstrap-theme.min.css HTTP/1.1" 304 -
192.168.8.3 - - [18/Aug/2018 15:04:54] "GET /static/bootstrap/bootstrap.min.css HTTP/1.1" 304 -
192.168.8.3 - - [18/Aug/2018 15:04:54] "GET /static/style.css HTTP/1.1" 304 -

Steps to install :

apt-get update && apt-get install -y git && \
git clone https://github.com/borgbackup/borgweb.git /opt/build && cd /opt/build && \
sed -i 's/127\.0\.0\.1/0\.0\.0\.0/' borgweb/config.py && \
pip3 install -e . && \
python3 setup.py install && \	
rm -rf /opt/build

Then just launched with cd /opt/borgweb ; borgweb Packages, config, ... are properly installed under /usr/local/bin/

There are not additional logs anywhere.

ls /opt/borgweb : only contains repo/ + logs/

and :

[ root@57a880c0a843:/usr/local/lib/python3.5/dist-packages/borgweb-0.3.1.dev4+g58bb2d9.d20180818-py3.5.egg/borgweb ]$ ll
total 20K
-rw-r--r-- 1 root staff  772 août  18 14:40 app.py
-rw-r--r-- 1 root staff 1,2K août  18 15:04 config.py
-rw-r--r-- 1 root staff   45 août  18 14:40 __init__.py
drwxr-sr-x 2 root staff  150 août  18 15:04 __pycache__/
drwxr-sr-x 5 root staff  122 août  18 14:40 static/
drwxr-sr-x 2 root staff   79 août  18 14:40 templates/
drwxr-sr-x 3 root staff   44 août  18 14:40 _tests/
-rw-r--r-- 1 root staff  140 août  18 14:40 _version.py
drwxr-sr-x 3 root staff   92 août  18 14:40 views/
-rw-r--r-- 1 root staff  152 août  18 14:40 wsgi.py
[ root@57a880c0a843:/usr/local/lib/python3.5/dist-packages/borgweb-0.3.1.dev4+g58bb2d9.d20180818-py3.5.egg/borgweb ]$ 

Have tryed several changes in config.py (change HOSTNAME to "127.0.0.1" or container hostname or host hostname, put absolute paths, ...) but nothing works.

SR-G avatar Aug 18 '18 13:08 SR-G

The server says it is running on port 5000, but in your picture, you access port 5644.

Also, why do you access /index.view and not just /?

ThomasWaldmann avatar Aug 18 '18 13:08 ThomasWaldmann

  • About ports : as briefly stated, i'm (trying to) run borgweb in a docker container. That means : a) the server (running inside the container) exposes its endpoint on :5000 b) the (internal) :5000 port inside the container is routed on :5644 (or anything else) on the host (when starting the container) and c) clients are then of course using the external port :5644 (redirected by docker on-the-fly), hence the screenshot. All containers are working like this.
  • About the /index.view : in fact i'm not using this URL. But as soon as i try to access the / url, i'm automaticaly redirected to /index.view by the endpoint.

SR-G avatar Aug 18 '18 13:08 SR-G

Can't reproduce, maybe a docker issue?

ThomasWaldmann avatar Jan 03 '24 10:01 ThomasWaldmann