h44z / wg-portal

WireGuard Configuration Portal with LDAP connection
https://wgportal.org/
MIT License
920 stars 126 forks source link

Can't start wg-portal #159

Open papania777 opened 1 year ago

papania777 commented 1 year ago

use docker-compose up -d I have already started with a clean server several times and I get the same error:

wg-portal    | INFO[2023-04-14 23:58:59] sysinfo: os=linux, arch=amd64
wg-portal    | INFO[2023-04-14 23:58:59] starting WireGuard Portal Server [master-20b71b4]...
wg-portal    | INFO[2023-04-14 23:58:59] real working directory: /app
wg-portal    | INFO[2023-04-14 23:58:59] current working directory: .
wg-portal    | WARN[2023-04-14 23:58:59] unable to load config.yml file: failed to open config file config.yml: open config.yml: no such file or directory, using default configuration...
wg-portal    | FATA[2023-04-14 23:58:59] setup failed: user-manager initialization failed: failed to migrate user database: index idx_users_deleted_at already exists

obviously the problem is in the database, but I can't understand why it turns out and how to fix it.

I have a clean ubuntu 20.04.06 installed and configured wireguard from ubuntu repo + dependencies: golang (20), docker-compose, docker

papania777 commented 1 year ago

today I did the same thing on debian 11 and everything worked as it should, I have no idea how to explain it at all, but for some reason on ubuntu it inside the container gave an error to the database.

jormungandrer commented 1 year ago

i get the same problem on ubuntu 20.04. after 04.17.2023

jormungandrer commented 1 year ago

it turned out to run on version v1.0.17 with ubuntu 20.04

latest version will throw an error: setup failed: user-manager initialization failed: failed to migrate user database: index idx_users_deleted_at already exists

borysohnsorge commented 1 year ago

same error on Ubuntu 22.04

valireality commented 1 year ago

delete database file and start again if its a new installation

loquanet commented 1 year ago

I found it to not be that issue at all with "file not found" is because the config.yml file is not manually created and in the same directory as the ./cmd/wg-portal/main.go file. Once I did that, (which wasn't in any instructions or documentation, then the go app wgportal ran "ran/worked"

Still can't get AD to authenticate so I disabled ldap and just ran the app alone to see how it works. https://github.com/h44z/wg-portal/issues/164