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

ganymede-api "error seeding database" upgrading to 2.0.0 #335

Closed
micksam7 opened this issue Dec 27, 2023 · 3 comments
Closed

ganymede-api "error seeding database" upgrading to 2.0.0 #335

micksam7 opened this issue Dec 27, 2023 · 3 comments

Comments

@micksam7
Copy link

I updated my install to 2.0.0 and it seemed to work perfectly until a restart of the container.

Now ganymade-api produces this in logs:

2023-12-27 00:57:32 -------------------------------------
2023-12-27 00:57:32 User uid:    1000
2023-12-27 00:57:32 User gid:    911
2023-12-27 00:57:32 -------------------------------------
2023-12-27 00:57:32 
2023-12-27 00:58:15 Version    : 
2023-12-27 00:58:15 Git Hash   : 35cad5d66e771e6c79d38cf13757f4c28aa7b78a
2023-12-27 00:58:15 Build Time : 2023-12-24T23:33:48Z
2023-12-27 00:58:15 {"level":"info","time":"2023-12-27T00:58:15-05:00","message":"Starting worker with config: {MAX_CHAT_DOWNLOAD_EXECUTIONS:5 MAX_CHAT_RENDER_EXECUTIONS:3 MAX_VIDEO_DOWNLOAD_EXECUTIONS:5 MAX_VIDEO_CONVERT_EXECUTIONS:3 TEMPORAL_URL:ganymede-temporal:7233}"}
2023-12-27 00:58:15 {"level":"info","time":"2023-12-27T00:58:15-05:00","message":"config file found at /data/config.json, loading"}
2023-12-27 00:58:15 {"level":"info","time":"2023-12-27T00:58:15-05:00","message":"config file found at /data/config.json, loading"}
2023-12-27 00:58:15 {"level":"debug","time":"2023-12-27T00:58:15-05:00","message":"config file loaded: /data/config.json"}
2023-12-27 00:58:15 {"level":"debug","time":"2023-12-27T00:58:15-05:00","message":"config file loaded: /data/config.json"}
2023-12-27 00:58:15 {"level":"debug","time":"2023-12-27T00:58:15-05:00","message":"authenticating with twitch"}
2023-12-27 00:58:16 {"level":"info","time":"2023-12-27T00:58:16-05:00","message":"authenticated with twitch"}
2023-12-27 00:58:16 {"level":"debug","time":"2023-12-27T00:58:16-05:00","message":"setting up database connection"}
2023-12-27 00:58:16 {"level":"info","Namespace":"default","TaskQueue":"video-download","WorkerID":"5d02aaaa42a7","time":"2023-12-27T00:58:16-05:00","message":"Started Worker"}
2023-12-27 00:58:16 {"level":"info","Namespace":"default","TaskQueue":"video-convert","WorkerID":"5d02aaaa42a7","time":"2023-12-27T00:58:16-05:00","message":"Started Worker"}
2023-12-27 00:58:16 {"level":"info","Namespace":"default","TaskQueue":"archive","WorkerID":"5d02aaaa42a7","time":"2023-12-27T00:58:16-05:00","message":"Started Worker"}
2023-12-27 00:58:17 {"level":"info","Namespace":"default","TaskQueue":"chat-download","WorkerID":"5d02aaaa42a7","time":"2023-12-27T00:58:17-05:00","message":"Started Worker"}
2023-12-27 00:58:17 {"level":"info","Namespace":"default","TaskQueue":"chat-render","WorkerID":"5d02aaaa42a7","time":"2023-12-27T00:58:17-05:00","message":"Started Worker"}
2023-12-27 00:58:17 {"level":"fatal","error":"error creating user: ent: constraint failed: pq: duplicate key value violates unique constraint \"users_username_key\"","time":"2023-12-27T00:58:17-05:00","message":"error seeding database"}

And refuses to continue starting.

Workaround:
Changing config.json db_seeded to true seems to fix and allow the api container to continue starting.

@micksam7 micksam7 changed the title ganymede-api database seeding issue upgrading to 2.0.0 ganymede-api "error seeding database"" upgrading to 2.0.0 Dec 27, 2023
@micksam7 micksam7 changed the title ganymede-api "error seeding database"" upgrading to 2.0.0 ganymede-api "error seeding database" upgrading to 2.0.0 Dec 27, 2023
@Zibbp
Copy link
Owner

Zibbp commented Dec 27, 2023

Is this repeatable if you restart the container again?

@Zibbp
Copy link
Owner

Zibbp commented Dec 27, 2023

Possible fix for this in #321 / #334

@Zibbp
Copy link
Owner

Zibbp commented Dec 27, 2023

Fixed in v2.0.1. Thanks for the bug report!

@Zibbp Zibbp closed this as completed Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants