maxun icon indicating copy to clipboard operation
maxun copied to clipboard

Register Account not possible

Open nocomment-bln opened this issue 1 year ago • 36 comments

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

nocomment-bln avatar Jan 07 '25 03:01 nocomment-bln

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

amhsirak avatar Jan 07 '25 04:01 amhsirak

the logs of the docker container are while trying to register

Screenshot_2025-01-07_12 20 16

nocomment-bln avatar Jan 07 '25 11:01 nocomment-bln

same with version 0.6

nocomment-bln avatar Jan 07 '25 13:01 nocomment-bln

experiencing the same thing as above

luis15pt avatar Jan 08 '25 18:01 luis15pt

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

nocomment-bln avatar Jan 09 '25 07:01 nocomment-bln

@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 avatar Jan 09 '25 17:01 amhsirak

@nocomment-bln @luis15pt

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

amhsirak avatar Jan 10 '25 11:01 amhsirak

@amhsirak debian, no firewall

nocomment-bln avatar Jan 10 '25 11:01 nocomment-bln

i ended up fixing my issue, but i dont know how, i think at one point i used a made up email instead of @gmail.com and that did the trick?

On Fri, Jan 10, 2025 at 11:31 AM Karishma Shukla @.***> wrote:

@nocomment-bln https://github.com/nocomment-bln @luis15pt https://github.com/luis15pt

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

— Reply to this email directly, view it on GitHub https://github.com/getmaxun/maxun/issues/323#issuecomment-2582491827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYCEIF32RZ2JD3ARAALDBUD2J6VQLAVCNFSM6AAAAABUWZVWMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBSGQ4TCOBSG4 . You are receiving this because you were mentioned.Message ID: @.***>

luis15pt avatar Jan 10 '25 13:01 luis15pt

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

amhsirak avatar Jan 10 '25 14:01 amhsirak

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.

SaschaValentin avatar Jan 15 '25 06:01 SaschaValentin

@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

amhsirak avatar Jan 15 '25 06:01 amhsirak

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

SaschaValentin avatar Jan 15 '25 07:01 SaschaValentin

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

davidqiangzi avatar Jan 15 '25 14:01 davidqiangzi

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>

VINTX2 avatar Jan 19 '25 07:01 VINTX2

@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?

SaschaValentin avatar Jan 19 '25 14:01 SaschaValentin

@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 🙏

amhsirak avatar Jan 19 '25 17:01 amhsirak

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.

VINTX2 avatar Jan 19 '25 19:01 VINTX2

I´ve added the networks to docker-compose - but still not working

SaschaValentin avatar Jan 22 '25 06:01 SaschaValentin

I had the same problem with the unmodified docker-compose.yml, but after building the develop branch everything works.

Uncomment

   #build:
      #context: .
      #dockerfile: server/Dockerfile

---

   #build:
      #context: .
      #dockerfile: Dockerfile

Comment

image: getmaxun/maxun-backend:latest

---

image: getmaxun/maxun-frontend:latest

shaunjanssens avatar Jan 23 '25 10:01 shaunjanssens

Hey @shaunjanssens, so many thanks for your help. At least now it no longer gets stuck during registration. But I'm afraid there seems to be a problem with the database. He can't find the "maxun" database. Here is the log...

postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization postgres-1 | postgres-1 | 2025-01-24 11:19:07.983 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 postgres-1 | 2025-01-24 11:19:08.006 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 postgres-1 | 2025-01-24 11:19:08.006 UTC [1] LOG: listening on IPv6 address "::", port 5432 postgres-1 | 2025-01-24 11:19:08.013 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" postgres-1 | 2025-01-24 11:19:08.032 UTC [27] LOG: database system was shut down at 2025-01-24 11:19:06 UTC postgres-1 | 2025-01-24 11:19:08.046 UTC [1] LOG: database system is ready to accept connections postgres-1 | 2025-01-24 11:19:36.725 UTC [51] FATAL: database "maxun" does not exist postgres-1 | 2025-01-24 11:19:36.765 UTC [52] FATAL: database "maxun" does not exist

SaschaValentin avatar Jan 24 '25 11:01 SaschaValentin

Have been facing the same issue, has this been resolved?

Vigneshwaran-93 avatar Jan 27 '25 16:01 Vigneshwaran-93

@Vigneshwaran-93 share you .env file and the browser console logs while registering - I'll walk you through to set up everything

amhsirak avatar Jan 27 '25 17:01 amhsirak

For me, I'm expecting for the frontend and backend server to securely connect on a docker network on the host and the browser to only communicate on the frontend.

Either way, port 8080 is taken on almost every host so I changed it to 8070:8080 on my test machine. It's abnormal to expose a backend port so I was using 8080 as the "backend URL" when it should be 8070 (in my case) for this to work.

To fix it - use your exposed port as the "backend URL" (most people probably change from 8080?)

To fix the code - I don't know......... tips for @amhsirak, specific to this issue:

  • use docker network for communication between components, e.g. backend:8080 instead of localhost, or IP. ideally, this compose file should have only the frontend port exposed (maybe minio console if needed)
  • preferably use names like getmaxun-postgres for playing nice in environments with other containers.
  • let the user handle .env: put all needed environmental variables in the compose file and let someone template them out on their own. look at other popular containers like linuxserver.io that follow this pattern. it's not about brevity; by defining these (eg all required env vars) you are providing the best way for someone to immediately get things working.
  • optional variables can be commented out or referenced in documentation. I wouldn't use env_file: .env. You can have a separate compose for development if it's easier for your workflow.

I noticed a lot more other than that, but I think those things would help make this more portable and save you a lot of open issues!

coversheets avatar Jan 29 '25 14:01 coversheets

Anyone has a solution for the missing database? As you can see, a container is running...

Image

But it doesn´t find the "maxun" database. Here is my .env file:

Image

SaschaValentin avatar Jan 30 '25 09:01 SaschaValentin

hi, i have same issue, and problem is that is localhost url is hardcoded, to register, you need to login on system where is installed maxun and register using this url: http://localhost:5173, after that, registration will be executed with success Warning! http://localhost:5173 and http://127.0.0.1:5173 is different URL! use http://localhost:5173.

Image

onlineapps-cloud avatar Feb 20 '25 16:02 onlineapps-cloud

i have same issue, run with local host possible only local install, not for vps without gui

kitsune0n avatar Feb 20 '25 17:02 kitsune0n

So does that mean I can´t run Maxun on a VPS?

I´m just despairing. Tried everything. All containers are running, but it says there is no database.

Image

Image

https://github.com/user-attachments/assets/52c22c0d-1aaf-4915-89ce-53696f4e5f0f

SaschaValentin avatar Feb 23 '25 13:02 SaschaValentin

So does that mean I can´t run Maxun on a VPS?

Should be possible with port forwarding. Worked for Maxun running on a VM.

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

VINTX2 avatar Feb 23 '25 17:02 VINTX2

So does that mean I can´t run Maxun on a VPS?

Should be possible with port forwarding. Worked for Maxun running on a VM.

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

this worked, thanks

onlineapps-cloud avatar Mar 27 '25 10:03 onlineapps-cloud