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

Login issue after update 1.19.3-0~ynh2 to 1.19.3-0~ynh5 #51

Open
kazukyakayashi opened this issue Jul 17, 2023 · 6 comments
Open

Login issue after update 1.19.3-0~ynh2 to 1.19.3-0~ynh5 #51

kazukyakayashi opened this issue Jul 17, 2023 · 6 comments

Comments

@kazukyakayashi
Copy link

After the update it was impossible to connect to my account. In addition, it seems to have completely bugged the server, which becomes unreachable (services are cut off, only to become accessible again 5 to 10 minutes later).

Forgejo Upgrade logs
https://paste.yunohost.org/raw/ajoqinewot

In /var/log/forgejo/forgejo.log

2023/07/17 05:13:37 ...s/graceful/server.go:62:NewServer() [I] [64b4ce01-2] Starting new Web server: tcp:127.0.0.1:6001 on PID: 1810816
2023/07/17 05:13:39 ...rvices/cron/tasks.go:140:GetTask() [I] [64b4ce03] Getting sync_external_users in &{{0 0} sync_external_users 0xc0053ee270 0x21f1560    0}
2023/07/17 05:13:39 .../ldap/source_sync.go:128:Sync() [E] [64b4ce03-2] SyncExternalUsers[YunoHost LDAP]: Error creating user kazukyakayashi: user already exists [name: kazukyakayashi]
2023/07/17 06:09:18 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4db0d] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:09:21 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4db11] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:09:23 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4db13] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:09:29 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4db18-2] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:10:45 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4db65] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:22:58 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4de41-2] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:22:59 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4de43] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:23:08 ...odels/user/avatar.go:56:GenerateRandomAvatar() [I] [64b4de4c] New random avatar created: 2
2023/07/17 06:23:15 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4de53] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:23:17 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4de55] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:27:08 ...rvices/cron/tasks.go:140:GetTask() [I] [64b4df3c] Getting sync_external_users in &{{0 0} sync_external_users 0xc0053ee270 0x21f1560 finished   1}
2023/07/17 06:27:08 .../ldap/source_sync.go:128:Sync() [E] [64b4df3c-2] SyncExternalUsers[YunoHost LDAP]: Error creating user kazukyakayashi: user already exists [name: kazukyakayashi]
2023/07/17 06:27:40 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4df5c] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:40:19 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4e253] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:40:27 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4e25b] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:40:29 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4e25d] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:43:35 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4e317] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
2023/07/17 06:43:58 ...ers/web/auth/auth.go:206:SignInPost() [I] [64b4e32e] Failed authentication attempt for KazukyAkayashi from my-ip:0: user does not exist [uid: 1, name: KazukyAkayashi, keyid: 0]
@kazukyakayashi
Copy link
Author

Even after restoring the backup from before the upgrade the problem persists ... I deduce that the installation of 1.19.3-0~ynh5 has changed something else that it should not have?

@grosmanal
Copy link
Collaborator

Hello @kazukyakayashi,
I'm sorry to read forgejo upgrade doesn't work for you.

In the log you provided (https://paste.yunohost.org/raw/ajoqinewot), I don't see any problem. The upgrade process seems to work correctly.
…except the error about user creation in forgejo.log

Can you post the content of the user and login_source table please (after upgrading to 1.19.3-0~ynh5) ? :
PGPASSWORD=$(sudo yunohost app setting forgejo db_pwd) psql -U forgejo -d forgejo -c "select * from public.user"
PGPASSWORD=$(sudo yunohost app setting forgejo db_pwd) psql -U forgejo -d forgejo -c "select * from login_source"

@kazukyakayashi
Copy link
Author

I returned to the previous version with a backup, which also forced me to change my password to connect to my account again.

I'll try the upgrade again but not right now, sorry (I need my Forgejo instance at the moment).

@grosmanal
Copy link
Collaborator

Can you precise which password you're telling about ?

@kazukyakayashi
Copy link
Author

I had to change the password on my Forgejo user account to log in.
I simply changed it using the forget password form.

But I have to admit that I don't understand at all how the update was able to block/delete/change my password, unless it was the fact that it tried to create an account that already existed that blew everything up, even after restoring the backup to 1.19.3-0~ynh2. (No mistake about the password on my part, I have it in my head and in my password manager.)

@grosmanal
Copy link
Collaborator

You shouldn't have to type any password to log into forgejo. Forgejo is configured to trust yunohost as a «reverse proxy authentication».
I suggest to correct this before upgrading forgejo.
Could you post me the result of command I've mention earlier, even if you use version 1.19.3-0~ynh2 ?

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