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

Unknown database error #45

Open
Rupp3r opened this issue Nov 29, 2024 · 2 comments
Open

Unknown database error #45

Rupp3r opened this issue Nov 29, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Rupp3r
Copy link

Rupp3r commented Nov 29, 2024

Hey There

After updating to version 2.0.9 I have not been able to run Pønskelisten without encountering the below error.
The application run fine between a few days and this time an hour(I got to add 3 wishes before getting the error). First time I got the error was after a server reboot, but right now I was adding wishes as it stopped working - no reboot or nothing.

This is the forth time starting from scratch because of the error and me not having a backup of a working installation...
I can through PHPmyAdmin access the db with the credentials provided in the compose file used for setup.

Please let me know if you need any additional information.

Hope you can help 🙏🏻

Host

  • Installation type: Docker
  • Installed version: 2.0.9
  • OS and Distro: Ubuntu 24.04(Server)
  • Database type: Built-in mysql:5.7

Desktop

  • OS: Windows & Android
  • Browser Chrome & Firefox

Additional context

Output from Logs:

P Ø N S K E L I S T E N

Directory 'files' valid.

Log file set.

2024/11/29 11:21:31 Configuration file loaded.
2024/11/29 11:21:31 Running Pønskelisten version: v2.0.9
2024/11/29 11:21:31 Flags parsed.
2024/11/29 12:21:31 Timezone set.
2024/11/29 12:21:31 Private key set.
2024/11/29 12:21:31 Connecting to database...
2024/11/29 12:21:31 Attempting to connect to mysql database.
2024/11/29 12:21:31 /app/database/client.go:58
[error] failed to initialize database, got error Error 1049 (42000): Unknown database 'ponske'
panic: invalid DSN: missing the slash separating the database name
goroutine 1 [running]:
aunefyren/poenskelisten/database.CreateTable({0xc00027c010, 0x6}, {0xc0002199b0?, 0x19?}, {0xc00027c030, 0xc}, 0xc00003d880?, {0xc00027c020, 0x6})
	/app/database/client.go:87 +0x29c
aunefyren/poenskelisten/database.Connect({0xc000201fc9, 0x5}, {0xc00003acd8, 0x11}, {0xc00027c010, 0x6}, {0xc00027c018, 0x8}, {0xc00027c030, 0xc}, ...)
	/app/database/client.go:62 +0xc88
main.main()
	/app/main.go:135 +0x1065

Compose file:

XXXX = censored

services:
  db:
    image: mysql:5.7
    container_name: poenskelisten-db
    restart: unless-stopped
    network_mode: XXXX
    ports:
      - 3306:3306
    environment:
      MYSQL_DATABASE: ponske
      MYSQL_USER: XXXX
      MYSQL_PASSWORD: XXXX
      MYSQL_ROOT_PASSWORD: XXXX
    expose:
      - 3306
    volumes:
      - /XXXX/XXXX/poenskeny/db/:/var/lib/mysql/ # Location of DB data
  poenskelisten:
    container_name: poenskelisten-app
    image: aunefyren/poenskelisten:latest
    restart: unless-stopped
    network_mode: XXXX
    depends_on:
      - db
    volumes:
      - /XXXX/XXXX/poenskeny/data/:/app/files/
    ports:
      - 8081:8080
    environment:
      generateinvite: true
      port: 8080
      timezone: Europe/XXXX
      dbip: XXXX
      dbport: 3306
      dbname: ponske
      dbusername: XXXX
      dbpassword: XXXX
      disablesmtp: true
      smtphost: XXXX
      smtpport: 587
      smtpusername: XXXX
      smtppassword: XXXX
  phpmyadmin:
    image: phpmyadmin:latest
    restart: unless-stopped
    network_mode: XXXX
    environment:
      - PMA_ARBITRARY=1
      - PMA_HOST:ponske 
      - MYSQL_ROOT_PASSWORD:XXXX 
      - TZ=Europe/XXXX
    container_name: poenskelisten-phpmyadmin
    ports:
      - 82:80
    depends_on:
      - db
@aunefyren aunefyren added bug Something isn't working help wanted Extra attention is needed labels Dec 5, 2024
@aunefyren
Copy link
Owner

aunefyren commented Dec 5, 2024

Can you confirm the table present in PHPMyAdmin is named 'ponske'? Sorry for the late reply.

@Rupp3r
Copy link
Author

Rupp3r commented Dec 7, 2024

I just checked if I could access the db and not what tables were present...
The "ponske" table is gone and only the "information_schema" table is left. Same for the db from my previous try under XXX/poenske.

I deleted the other container, added "1" to the XXX/poenskeny in the compose file and ran it again. Here the table name is "ponske".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants