After using Vikunja for a good time (something like a year) by hosting it on a RaspberryPi using Docker, I have decided today to update the images as it was a while.
After that update, I had an issue telling me that the migration of the DB failed (I haven’t noted the error message, sadly). The API image was failing and restarting permanently.
I’ve tried to rollback to older versions, then the migration seemed to work and the applications started properly.
Though, when I’m trying to connect to any account, I now get Wrong username or password.
I’m sure of the identifiers since I’m using a password manager who was still working before the update.
Logs:
The logs mainly contains the actual error.
Besides that, only the first line of log puzzle me a bit but it may be legit:
api_1 | info: creating the new user vikunja with 1000:1000
api_1 | usermod: no changes
api_1 | 2023/10/31 13:28:37 No config file found, using default or config from environment variables.
api_1 | 2023-10-31T13:28:37.708378962Z: INFO ▶ migration/Migrate 052 Ran all migrations successfully.
api_1 | 2023-10-31T13:28:37.708839364Z: INFO ▶ models/RegisterReminderCron 053 Mailer is disabled, not sending reminders per mail
api_1 | 2023-10-31T13:28:37.709532949Z: INFO ▶ models/RegisterOverdueReminderCron 054 Mailer is disabled, not sending overdue per mail
api_1 | 2023-10-31T13:28:37.709999315Z: INFO ▶ cmd/func25 055 Vikunja version v0.21.0
api_1 | ⇨ http server started on [::]:3456
api_1 | 2023-10-31T13:28:57.749061669Z: WEB ▶ 192.168.1.110 GET 404 /info 111.795µs - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) vikunja-desktop/0.21.0 Chrome/114.0.5735.134 Electron/25.2.0 Safari/537.36
api_1 | 2023-10-31T13:28:57.756502682Z: WEB ▶ 192.168.1.110 GET 200 /api/v1/info 1.025934ms - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) vikunja-desktop/0.21.0 Chrome/114.0.5735.134 Electron/25.2.0 Safari/537.36
api_1 | 2023-10-31T13:28:57.770896677Z: WEB ▶ 192.168.1.110 GET 200 /api/v1/info 716.53µs - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) vikunja-desktop/0.21.0 Chrome/114.0.5735.134 Electron/25.2.0 Safari/537.36
api_1 | 2023-10-31T13:29:05.650005686Z: WEB ▶ 192.168.1.110 OPTIONS 204 /api/v1/login 29.87µs - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) vikunja-desktop/0.21.0 Chrome/114.0.5735.134 Electron/25.2.0 Safari/537.36
api_1 | 2023-10-31T13:29:08.079405225Z: ERROR ▶ v1/Login 0ad Wrong username or password
api_1 | 2023-10-31T13:29:08.080022256Z: WEB ▶ 192.168.1.110 POST 412 /api/v1/login 2.426501922s - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) vikunja-desktop/0.21.0 Chrome/114.0.5735.134 Electron/25.2.0 Safari/537.36
Configuration:
Nothing particular.
I suppose it’s the default config, then.
How to host:
I’m just using a docker-compose file with a service for the db, one for the api and one for the frontend.
The only thing I’ve change is the image of the api: vikunja/api:0.21. (I don’t know what was the previous, I was using latest, but I don’t know exactly from when).
It does not contain any login information (except for the DB, but I don’t think that’s related).
Hmm, I’ve tried to uppercase them and it fails with a SQL migration error.
For what it’s worth, it worked like a charm for the last year with this docker-compose.
Regarding the database, it seems there is some data in it. There are many files, for a total of more than 200MB. Not sure what I should look at or how to read these data without the app, though
Sorry for the late answer! Took me a while to have again some time to look into that.
I’ve tried to enable the DB logs as requested but I cannot see any queries when I try to log in.
I was unsure how to do it so I’ve followed this answer.
I think it works because I got some logs while doing some query:
root@3c65d424fd31:/# /usr/bin/tail -f /var/log/mysql/mysql.log
mysqld, Version: 5.7.30-0ubuntu0.18.04.1 ((Ubuntu)). started with:
Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
Time Id Command Argument
2023-12-15T15:15:50.577525Z 4 Query SET global log_output = 'file'
2023-12-15T15:15:57.305688Z 4 Quit
2023-12-15T15:18:07.670173Z 5 Connect vikunja@localhost on using Socket
2023-12-15T15:18:07.670585Z 5 Query select @@version_comment limit 1
2023-12-15T15:19:06.366131Z 5 Query SELECT DATABASE()
2023-12-15T15:19:06.369454Z 5 Init DB vikunja
2023-12-15T15:19:07.915061Z 5 Query select * from tasks
2023-12-15T15:19:36.666375Z 5 Quit
Between these different queries, I’ve tried to log in both from the Web UI and from the desktop application, where I got the ‘Wrong password error’.
Is it some expected output? Did I do something wrong?
While digging a bit more in the documentation, I’ve found CLI | Vikunja so I suppose that must be it (not sure why I haven’t found it the first time ).
Anyway, before trying that, I had the curiosity to run vikunja user list first and it seems the users are not there:
Well, as mentioned earlier, using the uppercase name is leading to a migration error, which may be a step forward actually.
The error is:
api_1 | 2023-12-18T10:09:30.852249507Z: CRITICAL ▶ migration/Migrate 051 Migration failed: migration 20221113170740 failed: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLUMN `list_id` TO `project_id`' at line 1
Ah, good shot! I’ll try that.
When I’ve started, I actually had a bit of trouble finding an image that was working well for the DB as I’m on arm64 (Raspberry Pi), but I can retry to find one.
If you have a suggestion of a docker image that is working well for arm64 and vikunja API, please let me know.