varfish-org / varfish-docker-compose-legacy

Setup VarFish as using Docker Compose
MIT License
5 stars 3 forks source link

Error 404 at login when visiting my VarFish website following docker-compose installation #5

Closed aciolfi closed 2 years ago

aciolfi commented 3 years ago

Hi there,

I'm trying to set up a VarFish Server using Docker Compose (OS Centos 7.5, Docker version 1.13.1, docker-compose version 1.29.2).

I've followed your instructions, and when I run docker-compose up -d I get:

varfish-docker-compose_varfish-web_1 is up-to-date
Starting varfish-docker-compose_minio_1                       ... done
Starting varfish-docker-compose_exomiser-rest-prioritiser_1   ... done
Starting varfish-docker-compose_postgres_1                    ... done
Starting varfish-docker-compose_traefik_1                     ... done
Starting varfish-docker-compose_redis_1                       ... done
Starting varfish-docker-compose_jannovar_1                    ... done
Starting varfish-docker-compose_varfish-celeryd-import_1      ... done
Starting varfish-docker-compose_varfish-celeryd-export_1      ... done
Starting varfish-docker-compose_varfish-celerybeat_1          ... done
Starting varfish-docker-compose_varfish-celeryd-default_1     ... done
Starting varfish-docker-compose_varfish-celeryd-query_1       ... done
Starting varfish-docker-compose_varfish-celeryd-maintenance_1 ... done

Then I run docker ps and I get:

CONTAINER ID        IMAGE                                                       COMMAND                  CREATED             STATUS              PORTS                                      NAMES
a722f1c19911        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 8 seconds        8080/tcp                                   varfish-docker-compose_varfish-celeryd-export_1
fa3b6443ab17        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 7 seconds        8080/tcp                                   varfish-docker-compose_varfish-celerybeat_1
af430089c2d4        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 8 seconds        8080/tcp                                   varfish-docker-compose_varfish-celeryd-query_1
358501f44436        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 7 seconds        8080/tcp                                   varfish-docker-compose_varfish-celeryd-default_1
acb21dd295e2        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 7 seconds        8080/tcp                                   varfish-docker-compose_varfish-celeryd-maintenance_1
3963a1562efe        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 8 seconds        8080/tcp                                   varfish-docker-compose_varfish-celeryd-import_1
ad22e6dadc49        bihealth/varfish-server:0.23.7-0                            "docker-entrypoint..."   2 hours ago         Up 6 seconds        8080/tcp                                   varfish-docker-compose_varfish-web_1
1bfb860537b4        traefik:v2.3.1                                              "/entrypoint.sh --..."   2 hours ago         Up 7 seconds        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   varfish-docker-compose_traefik_1
bd058417b9c0        quay.io/biocontainers/jannovar-cli:0.33--0                  "jannovar -Xmx6G -..."   2 hours ago         Up 8 seconds                                                   varfish-docker-compose_jannovar_1
37dde927feca        quay.io/biocontainers/exomiser-rest-prioritiser:12.1.0--1   "exomiser-rest-pri..."   2 hours ago         Up 8 seconds                                                   varfish-docker-compose_exomiser-rest-prioritiser_1
982c28a7d1e8        postgres:12                                                 "docker-entrypoint..."   2 hours ago         Up 7 seconds        5432/tcp                                   varfish-docker-compose_postgres_1
35029bce2eeb        minio/minio                                                 "/usr/bin/docker-e..."   2 hours ago         Up 6 seconds        9000/tcp                                   varfish-docker-compose_minio_1
2a389bdc5f6b        redis:6                                                     "docker-entrypoint..."   2 hours ago         Up 7 seconds        6379/tcp                                   varfish-docker-compose_redis_1

I cannot find any obvious issues there, but if I try to connect to my server I always get the same 404 error, instead of the login page. If I run wget -O /tmp/test.html -S https://<myServerIP>/ --no-check-certificate, I get:

--2021-09-30 16:49:09--  https://<myServerIP>/
Connecting to <myServerIP>:443... connected.
WARNING: cannot verify <myServerIP>'s certificate, issued by '/CN=TRAEFIK DEFAULT CERT':
  Unable to locally verify the issuer's authority.
    WARNING: certificate common name 'TRAEFIK DEFAULT CERT' doesn't match requested host name '<myServerIP>'.
HTTP request sent, awaiting response... 
  HTTP/1.1 404 Not Found
  Content-Type: text/plain; charset=utf-8
  X-Content-Type-Options: nosniff
  Date: Thu, 30 Sep 2021 14:49:09 GMT
  Content-Length: 19
2021-09-30 16:49:09 ERROR 404: Not Found.

Do you have any idea what's going on? Thanks in advance for your help, Andrea

holtgrewe commented 3 years ago

Hi, thanks for your interest in VarFish.

That's a new one.

  1. What do you see in docker logs varfish-docker-compose_varfish-web_1?
  2. What happens if you put DJANG_DEBUG=1 into .env in the varfish-docker-compose folder and try that again?

Cheers,

aciolfi commented 3 years ago

Hi Manuel,

thank you for your reply. Regarding the point 1, you'll find attached the log output...not very comprehensible for me. Regarding the point 2, adding that line in .env seems to have no effect.

varfish-docker-compose_varfish-web_1.log

Cheers, Andrea

holtgrewe commented 3 years ago

Oh, I see now. I think you are hitting a bug in 0.23.7 that is resolved in 0.23.9. I did not think that I had pushed that to main. Could you please try the following:

  1. Ensure that you have the main branch with git branch.
  2. Do a git pull origin --rebase to get the latest version of varfish-docker-compose.
  3. Restart everything with docker-compose down && docker-compose up -d.
aciolfi commented 3 years ago

OK, I've tried but no way to make it work.

  1. $git branch -> * main

  2. $git pull origin --rebase results in error: unknown option rebase

So I've tried $git rebase origin, and I've got:

Cannot rebase: You have unstaged changes.
Please commit or stash them.

The problem is that I cannot commit or stash anything...what if I only use $git pull origin (forcing the action)? Thanks

(sorry for the confusion, but I've realized I've pasted here the wrong commands...now I've edited)

holtgrewe commented 3 years ago

What about?

git stash
git pull --rebase
git stash apply
aciolfi commented 3 years ago

Unfortunately, I get always the same error using git stash...and the option --rebase for my git is unknown...so I've manually removed the old .env, and then running $git rebase origin seems to work it out, pulling the updated varfish-web (ghcr.io/bihealth/varfish-server:0.23.9-0).

But...This is what I get now, running wget -O /tmp/test.html -S https://<myServerIP>/ --no-check-certificate

--2021-10-01 13:06:36--  https://<myServerIP>/
Connecting to <myServerIP>:443... connected.
WARNING: cannot verify <myServerIP>'s certificate, issued by '/CN=TRAEFIK DEFAULT CERT':
  Unable to locally verify the issuer's authority.
    WARNING: certificate common name 'TRAEFIK DEFAULT CERT' doesn't match requested host name '<myServerIP>'.
HTTP request sent, awaiting response... 
  HTTP/1.1 502 Bad Gateway
  Date: Fri, 01 Oct 2021 11:06:36 GMT
  Content-Length: 11
  Content-Type: text/plain; charset=utf-8
2021-10-01 13:06:36 ERROR 502: Bad Gateway.

So, probably I've messed up something...Do you suggest to restart from scratch?

varfish-docker-compose_varfish-web_1.log

holtgrewe commented 3 years ago

It looks like you did not create a .env file based on the env.example. I just realized that the manual does not describe this step... Could you copy env.example to .env and edit the values that say so?

holtgrewe commented 3 years ago

I just extended the documentation here:

aciolfi commented 3 years ago

OK, now it works!

Thank you, Andrea

holtgrewe commented 3 years ago

Thanks for the feedback, I'm glad that we could resolve this.