cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.33k stars 1.13k forks source link

Cannot login to cockpit on openSUSE micro-os #21208

Open Chuansen opened 3 weeks ago

Chuansen commented 3 weeks ago

Explain what happens

Summary I've been trying to set up cockpit on my openSUSE micro-os device but am not able to log in after installing and enabling the socket. It seems that the session is started but immediately closes

Steps

  1. Follow install instructions for enterprise micro (https://cockpit-project.org/running.htm)
  2. Reboot
  3. Attempt to log in

HTTP Errors Get a 403 (Permission denied) error when attempting to log in (localhost:9090)

Additional troubleshooting steps

Other

Version of Cockpit

322-2.1

Where is the problem in Cockpit?

Unknown or not applicable

Server operating system

other

Server operating system version

openSUSE MicroOS:20241031

What browsers are you using?

Firefox, Chrome

System log

Nov 03 11:21:15 localhost.xyz cockpit-session[8106]: Libgcrypt warning: missing initialization - please fix the application
Nov 03 11:28:03 localhost.xyz cockpit-tls[7969]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
Nov 03 11:28:03 localhost.xyz systemd[1]: Started Cockpit Web Service https instance factory (PID 7969/UID 61690).
Nov 03 11:28:03 localhost.xyz systemd[1]: Starting Socket for Cockpit Web Service https instance xxx855...
Nov 03 11:28:03 localhost.xyz systemd[1]: Listening on Socket for Cockpit Web Service https instance xxx855.
Nov 03 11:28:03 localhost.xyz systemd[1]: Started Cockpit Web Service https instance xxx855.
Nov 03 11:28:03 localhost.xyz systemd[1]: cockpit-wsinstance-https-factory@8-7969-61690.service: Deactivated successfully.
Nov 03 11:28:04 localhost.xyz cockpit-session[8524]: pam_systemd(cockpit:session): New sd-bus connection (system-bus-pam-systemd-8524) opened.
Nov 03 11:28:04 localhost.xyz systemd-logind[1317]: New session 18 of user abc.
Nov 03 11:28:04 localhost.xyz systemd[1]: Started Session 18 of User abc.
Nov 03 11:28:04 localhost.xyz cockpit-session[8524]: pam_unix(cockpit:session): session opened for user abc(uid=1000) by abc(uid=0)
Nov 03 11:28:04 localhost.xyz systemd-logind[1317]: Session 18 logged out. Waiting for processes to exit.
Nov 03 11:28:04 localhost.xyz systemd[1]: session-18.scope: Deactivated successfully.
Nov 03 11:28:04 localhost.xyz systemd-logind[1317]: Removed session 18.
martinpitt commented 3 weeks ago

Hmm, so the PAM authentication phase succeeded and it started the session. It just immediately logged out again. This could either be a silent failed session PAM module, or cockpit-session gets some other unusual error.

Do you get any errors in the JS console? Ctrl+Shift+J. You can also try and open the login page, run window.debugging = 'login' in the JS console, then enter your credentials. Most probably that won't show anything useful, but it's worth trying as it doesn't require rebuilding anything.

It can't be a bridge crash: That would show up in the journal, and it wouldn't result in a 403, but a "disconnected" page. It doesn't get as far as running the bridge.

You could also rebuild cockpit-session with setting this define (DEBUG_SESSION) to 1, and checking the logs again what it's doing.

TheRsKing commented 2 days ago

https://bugzilla.opensuse.org/show_bug.cgi?id=1230546 https://bugzilla.suse.com/show_bug.cgi?id=1230638 not a cockpit bug, opensuse is working on this i suggest using the desktop flatpak app for now