soedinglab / MMseqs2-App

MMseqs2 app to run on your workstation or servers
https://search.foldseek.com
GNU General Public License v3.0
61 stars 18 forks source link

host not found in upstream "mmseqs-web-api #87

Closed serbulent-av closed 11 months ago

serbulent-av commented 11 months ago

When I try to run the server using "docker-compose up" I get the error as following;

Pulling mmseqs-web-webserver (ghcr.io/soedinglab/mmseqs-app-frontend:master)...
master: Pulling from soedinglab/mmseqs-app-frontend
Digest: sha256:d31e43087d7ce14cbae752bcdc56d7b37db439376dc47300d5cebe31e46b6b5d
Status: Downloaded newer image for ghcr.io/soedinglab/mmseqs-app-frontend:master
Starting docker-compose_mmseqs-web-redis_1 ... done
Recreating docker-compose_mmseqs-web-api_1 ... done
Recreating docker-compose_mmseqs-web-worker_1    ... done
Recreating docker-compose_mmseqs-web-webserver_1 ... done
Attaching to docker-compose_mmseqs-web-redis_1, docker-compose_mmseqs-web-api_1, docker-compose_mmseqs-web-webserver_1, docker-compose_mmseqs-web-worker_1
mmseqs-web-api_1        | panic: Key: 'ParamsDisplayV1.Status' Error:Field validation for 'Status' failed on the 'required' tag
mmseqs-web-api_1        | Key: 'ParamsDisplayV1.Display.Name' Error:Field validation for 'Name' failed on the 'required' tag
mmseqs-web-api_1        | Key: 'ParamsDisplayV1.Display.Path' Error:Field validation for 'Path' failed on the 'required' tag
mmseqs-web-api_1        | 
mmseqs-web-api_1        | goroutine 22 [running]:
mmseqs-web-api_1        | main.server.func1()
mmseqs-web-api_1        |       /opt/build/server.go:44 +0x1dc
mmseqs-web-api_1        | created by main.server in goroutine 1
mmseqs-web-api_1        |       /opt/build/server.go:41 +0x119
mmseqs-web-redis_1      | 1:C 04 Dec 2023 17:05:34.051 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
mmseqs-web-redis_1      | 1:C 04 Dec 2023 17:05:34.052 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
mmseqs-web-redis_1      | 1:C 04 Dec 2023 17:05:34.052 * Redis version=7.2.3, bits=64, commit=00000000, modified=0, pid=1, just started
mmseqs-web-redis_1      | 1:C 04 Dec 2023 17:05:34.052 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
docker-compose_mmseqs-web-api_1 exited with code 2
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.052 * monotonic clock: POSIX clock_gettime
mmseqs-web-worker_1     | 2023/12/04 17:05:35 MMseqs2 worker
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.053 * Running mode=standalone, port=6379.
mmseqs-web-webserver_1  | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
mmseqs-web-webserver_1  | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
mmseqs-web-webserver_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * Server initialized
mmseqs-web-webserver_1  | 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * Loading RDB produced by version 7.2.3
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * RDB age 264 seconds
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * RDB memory usage when created 0.92 Mb
mmseqs-web-webserver_1  | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * Done loading RDB, keys loaded: 0, keys expired: 0.
mmseqs-web-webserver_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * DB loaded from disk: 0.000 seconds
mmseqs-web-redis_1      | 1:M 04 Dec 2023 17:05:34.054 * Ready to accept connections tcp
mmseqs-web-webserver_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
mmseqs-web-webserver_1  | /docker-entrypoint.sh: Configuration complete; ready for start up
mmseqs-web-webserver_1  | 2023/12/04 17:05:35 [emerg] 1#1: host not found in upstream "mmseqs-web-api" in /etc/nginx/conf.d/default.conf:13
mmseqs-web-webserver_1  | nginx: [emerg] host not found in upstream "mmseqs-web-api" in /etc/nginx/conf.d/default.conf:13
serbulent-av commented 11 months ago

I think the issue might cause from;

can not modify /etc/nginx/conf.d/default.conf

part however I also assume this indicates docker file system not the instance that I run docker on.

milot-mirdita commented 11 months ago

You need to run docker compose from the docker-compose folder. There are a couple files there that need to be mounted into the container, including the nginx.conf.

serbulent-av commented 11 months ago

Thanks for your answer. However, I'm already running it from docker-compose folder as;

myuser@mmseqs2-server:~/MMseqs2-App/docker-compose$ docker-compose up

serbulent-av commented 11 months ago

In the logs of the web-api-container I found this;

panic: Key: 'ParamsDisplayV1.Status' Error:Field validation for 'Status' failed on the 'required' tag
Key: 'ParamsDisplayV1.Display.Name' Error:Field validation for 'Name' failed on the 'required' tag
Key: 'ParamsDisplayV1.Display.Path' Error:Field validation for 'Path' failed on the 'required' tag

goroutine 36 [running]:
main.server.func1()
        /opt/build/server.go:44 +0x1dc
created by main.server in goroutine 1
        /opt/build/server.go:41 +0x119
serbulent-av commented 11 months ago

Btw. redis service seems ok;

1:C 05 Dec 2023 14:13:55.314 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 1:C 05 Dec 2023 14:13:55.314 oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 05 Dec 2023 14:13:55.314 Redis version=7.2.3, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 05 Dec 2023 14:13:55.314 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 05 Dec 2023 14:13:55.315 monotonic clock: POSIX clock_gettime 1:M 05 Dec 2023 14:13:55.315 Running mode=standalone, port=6379. 1:M 05 Dec 2023 14:13:55.316 Server initialized 1:M 05 Dec 2023 14:13:55.317 Loading RDB produced by version 7.2.3 1:M 05 Dec 2023 14:13:55.317 RDB age 3093 seconds 1:M 05 Dec 2023 14:13:55.317 RDB memory usage when created 0.92 Mb 1:M 05 Dec 2023 14:13:55.317 Done loading RDB, keys loaded: 0, keys expired: 0. 1:M 05 Dec 2023 14:13:55.317 DB loaded from disk: 0.000 seconds 1:M 05 Dec 2023 14:13:55.317 * Ready to accept connections tcp

milot-mirdita commented 11 months ago

I tried to reproduce your issue, but it seems to work correctly here. Please delete any existing database/jobs folder and shutdown the current docker-compose setup with

docker-compose down

Make sure to update again:

docker-compose pull

Then download the PDB again:

docker-compose run db-setup PDB

Then start everything:

docker-compose up

The server should now run on the default port (set in the .env file) 8877.

serbulent-av commented 11 months ago

Thanks again Milot. I'm able run it after starting with a fresh system and install docker with;

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Also you need to add your user to the docker group

sudo usermod -aG docker $USER

finally as an update to the documentation in the latest version there is no standalone docker-compose exits instead it runs as

docker compose COMMAND

As a note I have encountered with another error but a separate ticket will be better for it.