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

Register Account not possible #323

Open
nocomment-bln opened this issue Jan 7, 2025 · 18 comments
Open

Register Account not possible #323

nocomment-bln opened this issue Jan 7, 2025 · 18 comments
Labels
Status: Needs more info Requires more context Status: Work In Progess This issue/PR is actively being worked on Type: Bug Something isn't working

Comments

@nocomment-bln
Copy link

Can not register an Account.

image image

`version: '3.8'

services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "${DB_PORT:-5432}:${DB_PORT:-5432}"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

redis:
image: redis:6
environment:
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
ports:
- "${REDIS_PORT:-6379}:${REDIS_PORT:-6379}"
volumes:
- redis_data:/data

minio:
image: minio/minio
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
command: server /data --console-address :${MINIO_CONSOLE_PORT:-9001}
ports:
- "${MINIO_PORT:-9000}:${MINIO_PORT:-9000}" # API port
- "${MINIO_CONSOLE_PORT:-9001}:${MINIO_CONSOLE_PORT:-9001}" # WebUI port
volumes:
- minio_data:/data

backend:
#build:
#context: .
#dockerfile: server/Dockerfile
image: getmaxun/maxun-backend:v0.0.9
ports:
- "${BACKEND_PORT:-8080}:${BACKEND_PORT:-8080}"
env_file: stack.env
environment:
BACKEND_URL: ${BACKEND_URL}
# to ensure Playwright works in Docker
PLAYWRIGHT_BROWSERS_PATH: /ms-playwright
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0
# DEBUG: pw:api
# PWDEBUG: 1 # Enables debugging
CHROMIUM_FLAGS: '--disable-gpu --no-sandbox --headless=new'
security_opt:
- seccomp=unconfined # This might help with browser sandbox issues
shm_size: '2gb' # Increase shared memory size for Chromium
mem_limit: 2g # Set a 2GB memory limit
depends_on:
- postgres
- redis
- minio
volumes:
- /var/run/dbus:/var/run/dbus

frontend:
#build:
#context: .
#dockerfile: Dockerfile
image: getmaxun/maxun-frontend:v0.0.5
ports:
- "${FRONTEND_PORT:-5173}:${FRONTEND_PORT:-5173}"
env_file: stack.env
environment:
PUBLIC_URL: ${PUBLIC_URL}
BACKEND_URL: ${BACKEND_URL}
depends_on:
- backend

volumes:
postgres_data:
minio_data:
redis_data:`

NODE_ENV=production JWT_SECRET=a9Z$kLq7^f03GzNw!bP9dH4xV6sT2yXl3O8vR@uYq3 DB_NAME=maxun DB_USER=postgres DB_PASSWORD=postgres343 DB_HOST=postgres DB_PORT=5432 ENCRYPTION_KEY=f4d5e6a7b8c9d0e1f23456789abcdef01234567890abcdef123456789abcdef0 MINIO_ENDPOINT=minio MINIO_PORT=9000 MINIO_CONSOLE_PORT=9001 MINIO_ACCESS_KEY=jdslslf4843 MINIO_SECRET_KEY=dsjs4333dgg REDIS_HOST=redis REDIS_PORT=6379 BACKEND_PORT=8080 FRONTEND_PORT=5173 BACKEND_URL=http://localhost:8080 PUBLIC_URL=http://localhost:5173 VITE_BACKEND_URL=http://localhost:8080 VITE_PUBLIC_URL=http://localhost:5173 MAXUN_TELEMETRY=true

Logs:

postgres

The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /var/lib/postgresql/data -l logfile start waiting for server to start....2025-01-07 02:54:37.511 UTC [48] LOG: starting PostgreSQL 13.18 (Debian 13.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit 2025-01-07 02:54:37.516 UTC [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-01-07 02:54:37.524 UTC [49] LOG: database system was shut down at 2025-01-07 02:54:37 UTC 2025-01-07 02:54:37.530 UTC [48] LOG: database system is ready to accept connections done server started CREATE DATABASE /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* 2025-01-07 02:54:37.810 UTC [48] LOG: received fast shutdown request waiting for server to shut down....2025-01-07 02:54:37.816 UTC [48] LOG: aborting any active transactions 2025-01-07 02:54:37.818 UTC [48] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1 2025-01-07 02:54:37.818 UTC [50] LOG: shutting down 2025-01-07 02:54:37.855 UTC [48] LOG: database system is shut down done server stopped PostgreSQL init process complete; ready for start up. 2025-01-07 02:54:37.940 UTC [1] LOG: starting PostgreSQL 13.18 (Debian 13.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit 2025-01-07 02:54:37.941 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2025-01-07 02:54:37.941 UTC [1] LOG: listening on IPv6 address "::", port 5432 2025-01-07 02:54:37.944 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-01-07 02:54:37.955 UTC [63] LOG: database system was shut down at 2025-01-07 02:54:37 UTC 2025-01-07 02:54:37.964 UTC [1] LOG: database system is ready to accept connections 2025-01-07 02:55:56.346 UTC [128] LOG: invalid length of startup packet 2025-01-07 02:55:57.464 UTC [130] LOG: invalid length of startup packet 2025-01-07 02:55:58.217 UTC [131] LOG: invalid length of startup packet 2025-01-07 02:55:58.249 UTC [132] LOG: invalid length of startup packet 2025-01-07 02:55:58.308 UTC [133] LOG: invalid length of startup packet 2025-01-07 02:56:50.009 UTC [183] LOG: invalid length of startup packet

Thanks Guys
backend
`> [email protected] server

cross-env NODE_OPTIONS='--max-old-space-size=8000' nodemon server/src/server.ts

[nodemon] 2.0.22

[nodemon] to restart at any time, enter rs

[nodemon] watching path(s): .

[nodemon] watching extensions: ts,json

[nodemon] starting ts-node server/src/server.ts

Worker is running...

Connected to Redis!

Database connected successfully

MinIO connected successfully.

Database synced successfully!

2025-01-07T02:55:07.033Z info: Server listening on port 8080`

frontend:

`> [email protected] client

vite --host
The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
VITE v5.4.10 ready in 311 ms
➜ Local: http://localhost:5173/
➜ Network: http://172.18.0.6:5173/`

redis

1:C 07 Jan 2025 02:54:36.263 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 07 Jan 2025 02:54:36.263 # Redis version=6.2.17, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 07 Jan 2025 02:54:36.263 # 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 07 Jan 2025 02:54:36.264 * monotonic clock: POSIX clock_gettime 1:M 07 Jan 2025 02:54:36.264 * Running mode=standalone, port=6379. 1:M 07 Jan 2025 02:54:36.264 # Server initialized 1:M 07 Jan 2025 02:54:36.264 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can 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:M 07 Jan 2025 02:54:36.265 * Ready to accept connections

minio

INFO: Formatting 1st pool, 1 set(s), 1 drives per set. INFO: WARNING: Host local has more than 0 drives of set. A host failure will result in data becoming unavailable. MinIO Object Storage Server Copyright: 2015-2025 MinIO, Inc. License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html Version: RELEASE.2024-12-18T13-15-44Z (go1.23.4 linux/amd64) API: http://172.18.0.4:9000 http://127.0.0.1:9000 WebUI: http://172.18.0.4:9001 http://127.0.0.1:9001 Docs: https://docs.min.io

@amhsirak
Copy link
Member

amhsirak commented Jan 7, 2025

@nocomment-bln can you provide logs for when you try to register? docker logs as well as browser console errors if any.

@amhsirak amhsirak added the Status: Needs more info Requires more context label Jan 7, 2025
@nocomment-bln
Copy link
Author

the logs of the docker container are while trying to register

Screenshot_2025-01-07_12 20 16

@nocomment-bln
Copy link
Author

same with version 0.6

@luis15pt
Copy link

luis15pt commented Jan 8, 2025

experiencing the same thing as above

@nocomment-bln
Copy link
Author

good to know that I'm not the only one. Maybe @amhsirak wanna help us ?

@amhsirak
Copy link
Member

amhsirak commented Jan 9, 2025

@nocomment-bln based on the browser console logs, there seems to be some connection error [ERR_CONNECTION_REFUSED]

@nocomment-bln @luis15pt Trying to reproduce on my end. Actively looking into this

@amhsirak amhsirak added Type: Bug Something isn't working Status: Work In Progess This issue/PR is actively being worked on labels Jan 9, 2025
@amhsirak
Copy link
Member

@nocomment-bln @luis15pt

  1. What is your operating system?
  2. Are you behind a firewall/proxy?

@nocomment-bln
Copy link
Author

@amhsirak debian, no firewall

@luis15pt
Copy link

luis15pt commented Jan 10, 2025 via email

@amhsirak
Copy link
Member

@luis15pt thanks for the update. I don't think the email is the issue, but maybe something to do with docker internal network.

@SaschaValentin
Copy link

I have the same problem. Installed Maxun several times because I thought I did something wrong when entering my own values in .env. Last two times I used the example env-file but it´s the same. As soon as I want to register it stops working.

But I noticed after finishing docker-compose there is only one maxun-container and not the five there should be (front, bach, redis, posgres, minio). So I guess when register process is hanging it depends o the missing database.

@amhsirak
Copy link
Member

@SaschaValentin when you try to register, are all services up and running? It should look like this: https://docs.maxun.dev/assets/images/docker-819378e00008d2071f5ae55f14440960.png

@SaschaValentin
Copy link

Yes, now all five services are running - but the issue is still the same: no way to register.
But as I click the register button the browser throws this error:

Uncaught (in promise) TypeError: error.response is undefined
submitForm Register.tsx:51

@davidqiangzi
Copy link

same with version 0.7
Snipaste_2025-01-15_22-49-51
Snipaste_2025-01-15_22-48-40

@VINTX2
Copy link

VINTX2 commented Jan 19, 2025

Same issue on my side. This is my first install.
Docker does not show any logs while I try to register. I get the same error in the browser console as the others.

Docker is installed inside an Ubuntu 24.04 LTS VM.
For the docker compose installation, I have copied the .env and docker-compose.yml files without modifying.
Version 0.0.7

Edit:
I got it.
You need to forward both the frontend and backend port for the registration to work.

ssh -L 5173:localhost:5173 -L 8080:localhost:8080 <username>@<server-ip>

@SaschaValentin
Copy link

@VINTX2 Thanks for the hint. Could you please tell us what we have to do with docker-compose.yml or .env file to make this work?

@amhsirak
Copy link
Member

@VINTX2 Thanks for the update. I've been trying to reproduce this issue for a while but not successful. Can see people register too.

It would be really awesome if you could share more about your fix 🙏

@VINTX2
Copy link

VINTX2 commented Jan 19, 2025

It would be really awesome if you could share more about your fix 🙏
I do not know how to fix it, sorry.

For better understanding:
My setup:
Ubuntu VM (libvirt) with Docker.
Host is Linux, too.

By default, the network between the VM and the host is not shared.
With the ssh -L command, you can specify which ports you want to forward from the VM to the host.

This suggests that there is some networking problem between the frontend and backend.
Are the container on the same network? Afaik, docker containers are not on the same network by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs more info Requires more context Status: Work In Progess This issue/PR is actively being worked on Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants