Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"network error" cant login / register #1734

Open
audricd opened this issue Feb 10, 2025 · 7 comments
Open

"network error" cant login / register #1734

audricd opened this issue Feb 10, 2025 · 7 comments

Comments

@audricd
Copy link

audricd commented Feb 10, 2025

Describe the bug
Cannot register / use

To Reproduce
Steps to reproduce the behavior:

  1. Setup on remote server, download this yml, and adapt it as such:
services:
  client:
    image: bluewaveuptime/uptime_client:latest
    restart: always
    environment:
      UPTIME_APP_API_BASE_URL: "http://server:5000/api/v1"
    #ports:
      #- "80:80"
      #- "443:443"
    depends_on:
      - server
  server:
    image: bluewaveuptime/uptime_server:latest
    restart: always
    #ports:
      #- "5000:5000"
    depends_on:
      - redis
      - mongodb
    environment:
      - DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db
      - REDIS_HOST=redis
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
  redis:
    image: bluewaveuptime/uptime_redis:latest
    restart: always
    #ports:
      #- "6379:6379"
    volumes:
      - /home/kireek/docker/checkmate/redis/:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5s
  mongodb:
    image: bluewaveuptime/uptime_database_mongo:latest
    restart: always
    volumes:
      - /home/kireek/docker/checkmate/mongo/:/data/db
    command: ["mongod", "--quiet"]
    #ports:
      #- "27017:27017"                                  
networks:                                                  
  default:                                                 
    external:                                              
      name: ext

modifications explained:

  • changed UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1" to UPTIME_APP_API_BASE_URL: "http://server:5000/api/v1", as the container hostname (should be?) is server, as per the service name in the stack
  • unexpose the ports on the host because of:
  • added network ext which is nginx's
  1. in my register, made a new entry, subdomain, for this service
  2. in nginx: added a new entry with:

Image
I have also tried to expose all ports and go to serverip:80, but the behavior is exactly the same

After registering (manually going to /register) , I go to login (weirdly enough, I am not redirected to it. After clicking register, the register invite appears. again), and this error show up:

Image

Expected behavior
As per this documentation: https://docs.checkmate.so/users-guide/troubleshooting#q-i-installed-checkmate-but-i-dont-see-the-registration-page-to-sign-up-for-the-first-time I should be redirected to the registration page. However, I am redirected to the login page.
Yet, I go to /register manually, fill in the fields, and I expected to be able to login, without the "network error" message

Screenshots
see above

Desktop (please complete the following information):

  • Latest Firefox and Vivaldi. From workstation and cellphone
@audricd
Copy link
Author

audricd commented Feb 10, 2025

Same happens with this compose file:

services:
  client:
    image: bluewaveuptime/uptime_client:latest
    restart: always
    environment:
      UPTIME_APP_API_BASE_URL: "http://checkmate-server-1:5000/api/v1"
    #ports:
      #- "80:80"
      #- "443:443"
    depends_on:
      - server
  server:
    image: bluewaveuptime/uptime_server:latest
    restart: always
    #ports:
      #- "5000:5000"
    depends_on:
      - redis
      - mongodb
    environment:
      - DB_CONNECTION_STRING=mongodb://checkmate-mongodb-1:27017/uptime_db
      - REDIS_HOST=checkmate-redis-1
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
  redis:
    image: bluewaveuptime/uptime_redis:latest
    restart: always
    #ports:
      #- "6379:6379"
    volumes:
      - /home/kireek/docker/checkmate/redis/:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5s
  mongodb:
    image: bluewaveuptime/uptime_database_mongo:latest
    restart: always
    volumes:
      - /home/kireek/docker/checkmate/mongo/:/data/db
    command: ["mongod", "--quiet"]
    #ports:
      #- "27017:27017"                                  
networks:                                                  
  default:                                                 
    external:                                              
      name: ext   

Image

@ajhollid
Copy link
Collaborator

The original docker configuration is correct.

Your Client is running in your browser, not your Docker network, using server as the host will not work.

If your server is running on the sane machine as your client then the host is localhost

@audricd
Copy link
Author

audricd commented Feb 10, 2025

Hello @ajhollid , thank you very much for your support.

I have changed the server string to localhost, so my full compose looks like:

services:
  client:
    image: bluewaveuptime/uptime_client:latest
    restart: always
    environment:
      UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1"
    #ports:
      #- "80:80"
      #- "443:443"
    depends_on:
      - server
  server:
    image: bluewaveuptime/uptime_server:latest
    restart: always
    #ports:
      #- "5000:5000"
    depends_on:
      - redis
      - mongodb
    environment:
      - DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db
      - REDIS_HOST=redis
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
  redis:
    image: bluewaveuptime/uptime_redis:latest
    restart: always
    #ports:
      #- "6379:6379"
    volumes:
      - /home/kireek/docker/checkmate/redis/:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5s
  mongodb:
    image: bluewaveuptime/uptime_database_mongo:latest
    restart: always
    volumes:
      - /home/kireek/docker/checkmate/mongo/:/data/db
    command: ["mongod", "--quiet"]
    #ports:
      #- "27017:27017"                                  
networks:                                                  
  default:                                                 
    external:                                              
      name: ext

My nginx configuration is the same:

Image

Unfortunately the behavior remains the same as described in my first post

  1. I am redirected to login page instead of register
  2. Manually going to register, filling the fields "works"
  3. But trying to login, returns "network error"

Dont I need to set up SMTP configuration through environment variables? I saw on the documentation they were needed, for development. But not for docker deployment. Is a smtp server bundled within the container?

Client logs:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/env.sh
UPTIME_APP_API_BASE_URL=http://localhost:5000/api/v1
/docker-entrypoint.sh: Configuration complete; ready for start up
2025/02/10 15:01:16 [notice] 1#1: using the "epoll" event method
2025/02/10 15:01:16 [notice] 1#1: nginx/1.27.1
2025/02/10 15:01:16 [notice] 1#1: built by gcc 13.2.1 20240309 (Alpine 13.2.1_git20240309) 
2025/02/10 15:01:16 [notice] 1#1: OS: Linux 6.8.0-52-generic
2025/02/10 15:01:16 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2025/02/10 15:01:16 [notice] 1#1: start worker processes
2025/02/10 15:01:16 [notice] 1#1: start worker process 34
2025/02/10 15:01:16 [notice] 1#1: start worker process 35
2025/02/10 15:01:16 [notice] 1#1: start worker process 36
2025/02/10 15:01:16 [notice] 1#1: start worker process 37
2025/02/10 15:01:16 [notice] 1#1: start worker process 38
2025/02/10 15:01:16 [notice] 1#1: start worker process 39
2025/02/10 15:01:16 [notice] 1#1: start worker process 40
2025/02/10 15:01:16 [notice] 1#1: start worker process 41
172.26.0.15 - - [10/Feb/2025:15:01:32 +0000] "GET /assets/index-DkqZ8c_4.css HTTP/1.1" 200 26165 "https://status.labaudric.net/" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:32 +0000] "GET /assets/index-CO2SgZMe.js HTTP/1.1" 200 1865272 "https://status.labaudric.net/" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:32 +0000] "GET / HTTP/1.1" 200 424 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:33 +0000] "GET /checkmate_favicon.svg HTTP/1.1" 200 29924 "https://status.labaudric.net/" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:43 +0000] "GET /register HTTP/1.1" 200 424 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:43 +0000] "GET /assets/index-CO2SgZMe.js HTTP/1.1" 304 0 "https://status.labaudric.net/register" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:43 +0000] "GET /register HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:01:43 +0000] "GET /assets/index-DkqZ8c_4.css HTTP/1.1" 304 0 "https://status.labaudric.net/register" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" "149.102.236.196"
172.26.0.15 - - [10/Feb/2025:15:05:21 +0000] "GET / HTTP/1.1" 200 424 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "185.185.171.17"
172.26.0.15 - - [10/Feb/2025:15:05:21 +0000] "GET /assets/index-DkqZ8c_4.css HTTP/1.1" 200 26165 "https://status.labaudric.net/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "185.185.171.17"
172.26.0.15 - - [10/Feb/2025:15:05:21 +0000] "GET /assets/index-CO2SgZMe.js HTTP/1.1" 200 1865272 "https://status.labaudric.net/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "185.185.171.17"
172.26.0.15 - - [10/Feb/2025:15:05:22 +0000] "GET /checkmate_favicon.svg HTTP/1.1" 200 29924 "https://status.labaudric.net/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" "185.185.171.17"

db logs:

t={"$date":"2025-02-10T15:05:16.603+00:00"} t={"$date":"2025-02-10T15:05:16.603+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer msg=WiredTiger message attr={"message":{"ts_sec":1739199916,"ts_usec":603643,"thread":"1:0x7997378006c0","session_name":"WT_SESSION.checkpoint","category":"WT_VERB_CHECKPOINT_PROGRESS","category_id":7,"verbose_level":"DEBUG_1","verbose_level_id":1,"msg":"saving checkpoint snapshot min: 271, snapshot max: 271 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 1"}}
t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer msg=WiredTiger message t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I t={"$date":"2025-02-10T15:06:16.622+00:00"} t={"$date":"2025-02-10T15:06:16.622+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer msg=WiredTiger message attr={"message":{"ts_sec":1739199976,"ts_usec":622007,"thread":"1:0x7997378006c0","session_name":"WT_SESSION.checkpoint","category":"WT_VERB_CHECKPOINT_PROGRESS","category_id":7,"verbose_level":"DEBUG_1","verbose_level_id":1,"msg":"saving checkpoint snapshot min: 285, snapshot max: 285 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 1"}}
t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer msg=WiredTiger message t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I t={"$date":"2025-02-10T15:07:16.632+00:00"} t={"$date":"2025-02-10T15:07:16.632+00:00"} s=I c=WTCHKPT id=22430 ctx=Checkpointer msg=WiredTiger message attr={"message":{"ts_sec":1739200036,"ts_usec":632832,"thread":"1:0x7997378006c0","session_name":"WT_SESSION.checkpoint","category":"WT_VERB_CHECKPOINT_PROGRESS","category_id":7,"verbose_level":"DEBUG_1","verbose_level_id":1,"msg":"saving checkpoint snapshot min: 286, snapshot max: 286 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 1"}}

redis logs:

1:C 10 Feb 2025 15:01:15.728 # 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 10 Feb 2025 15:01:15.728 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 10 Feb 2025 15:01:15.728 * Redis version=7.4.2, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 10 Feb 2025 15:01:15.728 # 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 10 Feb 2025 15:01:15.729 * monotonic clock: POSIX clock_gettime
1:M 10 Feb 2025 15:01:15.731 * Running mode=standalone, port=6379.
1:M 10 Feb 2025 15:01:15.731 * Server initialized
1:M 10 Feb 2025 15:01:15.731 * Ready to accept connections tcp

server logs:

(node:1) [MONGOOSE] Warning: Duplicate schema index on {"teamId":1} found. This is often due to declaring an index using both "index: true" and "schema.index()". Please remove the duplicate index definition.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) [MONGOOSE] Warning: `errors` is a reserved schema pathname and may break some functionality. You are allowed to use it, but use at your own risk. To disable this warning pass `suppressReservedKeysWarning` as a schema option.
2025-02-10T15:01:18.760Z info: [UserModel](init) User model initialized
2025-02-10T15:01:18.941Z info:(connect) Connected to MongoDB
2025-02-10T15:01:18.963Z info: [ServiceRegistry](register) Registering service JobQueue
2025-02-10T15:01:18.964Z info: [ServiceRegistry](register) Registering service MongoDB
2025-02-10T15:01:18.965Z info: [ServiceRegistry](register) Registering service SettingsService
2025-02-10T15:01:18.966Z info: [ServiceRegistry](register) Registering service EmailService
2025-02-10T15:01:18.966Z info: [ServiceRegistry](register) Registering service NetworkService
2025-02-10T15:01:18.967Z info: [ServiceRegistry](register) Registering service StatusService
2025-02-10T15:01:18.967Z info: [ServiceRegistry](register) Registering service NotificationService
2025-02-10T15:01:18.980Z info: server started on port:5000

stack:

Image

I am deploying through portainer, if that makes any difference.

Thanks again!

@ajhollid
Copy link
Collaborator

Hi @audricd ,

No problem.

I have no idea how portainer works, but you do need to expose the required ports in the docker compose file.

You have a purely networking issue, your Client cannot communicate with your server for whatever reason.

I don't know the specifics of your network and providing network support is beyond the scope of what we can do, but I would start by pinging your various services and seeing if they are reachable.

If you can't ping the server at localhost:5000 then your server either isn't running at localhost 5000 or there is something on your network blocking your request.

Hope that helps you track it down!

@ajhollid
Copy link
Collaborator

On another note, I would try just using vanilla docker compose with the provided docker compose file and seeing if the problem is with portainer.

That will help narrow down the possibilities.

@audricd
Copy link
Author

audricd commented Feb 10, 2025

I see, thanks!

Well just sharing in case it can enlighten anyone else:

Following your advice, I have used the default compose file:

services:
  client:
    image: bluewaveuptime/uptime_client:latest
    restart: always
    environment:
      UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1"
    ports:
      - "880:80"
      - "4443:443"
    depends_on:
      - server
  server:
    image: bluewaveuptime/uptime_server:latest
    restart: always
    ports:
      - "5000:5000"
    depends_on:
      - redis
      - mongodb
    environment:
      - DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db
      - REDIS_HOST=redis
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
  redis:
    image: bluewaveuptime/uptime_redis:latest
    restart: always
    ports:
      - "6379:6379"
    volumes:
      - /home/kireek/docker/checkmate/redis/:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5s
  mongodb:
    image: bluewaveuptime/uptime_database_mongo:latest
    restart: always
    volumes:
      - /home/kireek/docker/checkmate/mongo/:/data/db
    command: ["mongod", "--quiet"]
    ports:
      - "27017:27017"

They are only two modifications:

  1. Default ports are already in use in my network, so I changed them (and of course, used them on nginx)
  2. And changed the location for files. I use those directories for backup purposes

Unfortunately, the behavior is exactly the same. And the issue is not nginx: I have tried to register, and login through serverip:880, and same result.

So I am very confused. Default, with ports exposed, doesnt work either.

For the record, on paper, my modified compose should work:

services:
  client:
    image: bluewaveuptime/uptime_client:latest
    restart: always
    environment:
      UPTIME_APP_API_BASE_URL: "http://checkmate-server-1:5000/api/v1"
    #ports:
      #- "80:80"
      #- "443:443"
    depends_on:
      - server
  server:
    image: bluewaveuptime/uptime_server:latest
    restart: always
    #ports:
      #- "5000:5000"
    depends_on:
      - redis
      - mongodb
    environment:
      - DB_CONNECTION_STRING=mongodb://checkmate-mongodb-1:27017/uptime_db
      - REDIS_HOST=checkmate-redis-1
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
  redis:
    image: bluewaveuptime/uptime_redis:latest
    restart: always
    #ports:
      #- "6379:6379"
    volumes:
      - /home/kireek/docker/checkmate/redis/:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5s
  mongodb:
    image: bluewaveuptime/uptime_database_mongo:latest
    restart: always
    volumes:
      - /home/kireek/docker/checkmate/mongo/:/data/db
    command: ["mongod", "--quiet"]
    #ports:
      #- "27017:27017"                                  
networks:                                                  
  default:                                                 
    external:                                              
      name: ext

Why? Because all containers can see each other with the hostname I have set:

Image

Image

The other two containers do no have ping installed so I cannot troubleshoot in that direction

Image

@ajhollid
Copy link
Collaborator

ajhollid commented Feb 10, 2025

@audricd there is no issue with the Docker network, as I can see from your logs the Server is reaching the MongoDB docker container and connecting correctly.

The issue is between your Client, which is not in your Docker network, and the Server.

The server operates on a port, default 5000. The Docker container must expose this port, or the Client will not be able to connect to it.

If you change what ports/hosts your Server operates on you must update your configuration to reflect that.

You do not need to ping the Server container from the Client container. All the Client container does is start an nginx instance that serves the Client application to your browser.

To resolve this issue you need to find out why you cannot connect to your Server container from wherever your client is running. In your case this is almost certainly your browser running on your local machine, so you should ping from your local machine to whatever host/port you've set your Server to operate on. By default this is localhost on port 5000.

Hope that helps clarify what the issue is and helps you track it down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants