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.25k stars 1.12k forks source link

Blank screen after login #13310

Closed bernd-wechner closed 3 years ago

bernd-wechner commented 4 years ago

Cockpit version: 164-1 OS: Linux Mint 19.2 Page: https://myserver.lan:9090/system

I installed cockpit recently on three servers I have:

  1. Ubuntu 18.04
  2. Raspbian 10 (buster)
  3. Mint 19.2

It worked brilliantly on all three and I fell in love. Nice. beautiful app. Thanks.

Then a day after the install 3. the Mint 19.2 system presents a login page, but once I log in I get a blank page.

If I look in the Firefox console I see:

Source map error: Error: request failed with status 404
Resource URL: https://myserver.lan:9090/cockpit/$c415b1318ee3f4f8895647e8466a7707098c89d4/shell/index.css
Source Map URL: index.css.map

Source map error: Error: request failed with status 404
Resource URL: https://myserver.lan:9090/cockpit/$c415b1318ee3f4f8895647e8466a7707098c89d4/base1/patternfly.css
Source Map URL: patternfly.min.css.map

then after a short while it spews some more errors including:

transport closed: timeout index.js:3618:25
Firefox can’t establish a connection to the server at wss://cyclops.lan:9090/cockpit/socket. cockpit.js:291:24
received unsupported version in init message: undefined cockpit.js:392:25

and

Failed to query RHEL subscription status: 
Object { problem: "disconnected", name: null, message: "Server has closed the connection.", toString: toString()
 }
system.js:2520:53
Error reading machine id 
Object { problem: "disconnected", message: "Server has closed the connection.", toString: toString()
 }
system.js:1871:29
Checking for available updates failed: Server has closed the connection. system.js:1805:33
The connection to wss://myserver.lan:9090/cockpit/socket was interrupted while the page was loading. cockpit.js:291:24
Source map error: Error: request failed with status 401
Resource URL: https://myserver.lan:9090/cockpit/$c415b1318ee3f4f8895647e8466a7707098c89d4/base1/cockpit.js
Source Map URL: cockpit.min.js.map
Source map error: Error: request failed with status 401
Resource URL: https://myserver.lan:9090/cockpit/$c415b1318ee3f4f8895647e8466a7707098c89d4/shell/index.js
Source Map URL: index.min.js.map

Source map error: Error: request failed with status 401
Resource URL: https://cyclops.lan:9090/cockpit/$c415b1318ee3f4f8895647e8466a7707098c89d4/system/system.js
Source Map URL: system.min.js.map

and more . Methink JS is running and barfing.

Steps to reproduce

  1. Surf to https://myserver.lan:9090
  2. Log in
  3. See white page
$ journalctl --since -10m
-- Logs begin at Mon 2019-02-25 01:02:04 AEDT, end at Wed 2019-12-18 17:45:33 AEDT. --
Dec 18 17:37:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:37:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:37:31 myserver cockpit-ws[2392]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:39:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:39:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:39:31 myserver cockpit-ws[2420]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:41:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:41:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:41:31 myserver cockpit-ws[2470]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:43:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:43:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:43:31 myserver cockpit-ws[2492]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:45:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:45:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:45:31 myserver cockpit-ws[2509]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:45:33 myserver cockpit-session[2515]: pam_ssh_add: Failed adding some keys
Dec 18 17:45:33 myserver cockpit-session[2515]: pam_unix(cockpit:session): session opened for user myuser by (uid=0)
Dec 18 17:45:33 myserver systemd-logind[735]: New session 47 of user myuser.
Dec 18 17:45:33 myserver systemd[1]: Started Session 47 of user myuser.
Dec 18 17:45:33 myserver polkitd(authority=local)[811]: Registered Authentication Agent for unix-session:47 (system bus name :1.118 [c
Dec 18 17:45:33 myserver cockpit-ws[2509]: logged in user session
Dec 18 17:45:48 myserver cockpit-ws[2509]: session timed out
Dec 18 17:45:48 myserver polkitd(authority=local)[811]: Unregistered Authentication Agent for unix-session:47 (system bus name :1.118,
Dec 18 17:45:48 myserver cockpit-session[2515]: pam_unix(cockpit:session): session closed for user myuser
Dec 18 17:45:48 myserver systemd-logind[735]: Removed session 47.

and

$ journalctl -u cockpit --since -60m
-- Logs begin at Mon 2019-02-25 01:02:04 AEDT, end at Wed 2019-12-18 17:49:31 AEDT. --
Dec 18 16:51:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 16:51:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 16:51:29 myserver cockpit-ws[20792]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 16:53:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 16:53:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 16:53:29 myserver cockpit-ws[20817]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 16:55:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 16:55:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 16:55:29 myserver cockpit-ws[21577]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 16:57:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 16:57:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 16:57:29 myserver cockpit-ws[21596]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 16:59:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 16:59:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 16:59:29 myserver cockpit-ws[21611]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:01:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:01:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:01:29 myserver cockpit-ws[21666]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:03:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:03:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:03:29 myserver cockpit-ws[21689]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:05:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:05:29 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:05:29 myserver cockpit-ws[21706]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:07:29 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:07:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:07:30 myserver cockpit-ws[21724]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:09:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:09:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:09:30 myserver cockpit-ws[21743]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:11:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:11:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:11:30 myserver cockpit-ws[21766]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:12:51 myserver cockpit-session[21780]: pam_ssh_add: Failed adding some keys
Dec 18 17:12:51 myserver cockpit-session[21780]: pam_unix(cockpit:session): session opened for user myuser by (uid=0)
Dec 18 17:12:51 myserver cockpit-ws[21766]: logged in user session
Dec 18 17:13:06 myserver cockpit-ws[21766]: session timed out
Dec 18 17:14:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:14:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:14:30 myserver cockpit-ws[21808]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:16:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:16:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:16:30 myserver cockpit-ws[21839]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:17:32 myserver systemd[1]: Stopping Cockpit Web Service...
Dec 18 17:17:32 myserver systemd[1]: Stopped Cockpit Web Service.
Dec 18 17:24:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:24:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:24:30 myserver cockpit-ws[2178]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:25:38 myserver cockpit-session[2204]: pam_ssh_add: Failed adding some keys
Dec 18 17:25:38 myserver cockpit-session[2204]: pam_unix(cockpit:session): session opened for user myuser by (uid=0)
Dec 18 17:25:38 myserver cockpit-ws[2178]: logged in user session
Dec 18 17:25:53 myserver cockpit-ws[2178]: session timed out
Dec 18 17:27:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:27:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:27:30 myserver cockpit-ws[2244]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:29:30 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:29:30 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:29:31 myserver cockpit-ws[2260]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:31:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:31:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:31:31 myserver cockpit-ws[2298]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:33:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:33:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:33:31 myserver cockpit-ws[2329]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:33:56 myserver cockpit-session[2339]: pam_ssh_add: Failed adding some keys
Dec 18 17:33:56 myserver cockpit-session[2339]: pam_unix(cockpit:session): session opened for user myuser by (uid=0)
Dec 18 17:33:56 myserver cockpit-ws[2329]: logged in user session
Dec 18 17:34:11 myserver cockpit-ws[2329]: session timed out
Dec 18 17:35:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:35:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:35:31 myserver cockpit-ws[2366]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:37:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:37:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:37:31 myserver cockpit-ws[2392]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:39:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:39:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:39:31 myserver cockpit-ws[2420]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:41:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:41:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:41:31 myserver cockpit-ws[2470]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:43:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:43:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:43:31 myserver cockpit-ws[2492]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:45:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:45:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:45:31 myserver cockpit-ws[2509]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:45:33 myserver cockpit-session[2515]: pam_ssh_add: Failed adding some keys
Dec 18 17:45:33 myserver cockpit-session[2515]: pam_unix(cockpit:session): session opened for user myuser by (uid=0)
Dec 18 17:45:33 myserver cockpit-ws[2509]: logged in user session
Dec 18 17:45:48 myserver cockpit-ws[2509]: session timed out
Dec 18 17:47:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:47:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:47:31 myserver cockpit-ws[2554]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Dec 18 17:49:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:49:31 myserver systemd[1]: Started Cockpit Web Service.
Dec 18 17:49:31 myserver cockpit-ws[2584]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert

and

$ ll -R /etc/cockpit/
/etc/cockpit/:
total 24
drwxr-xr-x   4 root root  4096 Dec 18 17:24 ./
drwxr-xr-x 153 root root 12288 Dec 18 17:24 ../
drwxr-xr-x   2 root root  4096 Mar 22  2018 machines.d/
drwxr-xr-x   2 root root  4096 Dec 12 12:16 ws-certs.d/

/etc/cockpit/machines.d:
total 8
drwxr-xr-x 2 root root 4096 Mar 22  2018 ./
drwxr-xr-x 4 root root 4096 Dec 18 17:24 ../

/etc/cockpit/ws-certs.d:
total 12
drwxr-xr-x 2 root root       4096 Dec 12 12:16 ./
drwxr-xr-x 4 root root       4096 Dec 18 17:24 ../
-rw-r----- 1 root cockpit-ws 2865 Dec 12 12:16 0-self-signed.cert

and

$ apt show -a cockpit
Package: cockpit
Version: 208-1~ubuntu18.04.1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 63.5 kB
Depends: cockpit-bridge, cockpit-ws, cockpit-system
Recommends: cockpit-storaged, cockpit-networkmanager, cockpit-dashboard, cockpit-packagekit
Suggests: cockpit-doc, cockpit-pcp, cockpit-docker, cockpit-machines, xdg-utils
Homepage: https://cockpit-project.org/
Download-Size: 18.0 kB
APT-Sources: http://mirror.as24220.net/pub/ubuntu bionic-backports/universe amd64 Packages
Description: Web Console for Linux servers
 The Cockpit Web Console enables users to administer GNU/Linux servers using a
 web browser.
 .
 It offers network configuration, log inspection, diagnostic reports, SELinux
 troubleshooting, interactive command-line sessions, and more.

Package: cockpit
Version: 164-1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 58.4 kB
Depends: cockpit-bridge (>= 138), cockpit-dashboard (>= 164-1), cockpit-dashboard (<< 164-1.1~), cockpit-ws (>= 164-1), cockpit-ws (<< 164-1.1~), cockpit-system (= 164-1)
Recommends: cockpit-storaged (= 164-1), cockpit-networkmanager (= 164-1)
Suggests: cockpit-doc (= 164-1), cockpit-docker (= 164-1), cockpit-packagekit (>= 164-1), xdg-utils
Homepage: http://cockpit-project.org/
Download-Size: 16.0 kB
APT-Manual-Installed: yes
APT-Sources: http://mirror.as24220.net/pub/ubuntu bionic/universe amd64 Packages
Description: User interface for Linux servers
 Cockpit runs in a browser and can manage your network of GNU/Linux
 machines.

and

$ systemctl status cockpit
● cockpit.service - Cockpit Web Service
   Loaded: loaded (/lib/systemd/system/cockpit.service; static; vendor preset: enabled)
   Active: inactive (dead) since Wed 2019-12-18 17:53:01 AEDT; 664ms ago
     Docs: man:cockpit-ws(8)
  Process: 2633 ExecStart=/usr/lib/cockpit/cockpit-ws (code=exited, status=0/SUCCESS)
  Process: 2632 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type= (code=exited, st
 Main PID: 2633 (code=exited, status=0/SUCCESS)

Dec 18 17:51:31 myserver systemd[1]: Starting Cockpit Web Service...
Dec 18 17:51:31 myserver systemd[1]: Started Cockpit Web Service.

and

$ sudo fuser 9090/tcp
9090/tcp:                1  3203
$ ps -p 3203
  PID TTY          TIME CMD
 3203 ?        00:00:00 cockpit-ws

Though I notice it's a new pid every 2 minutes or so just like visible in the journalctl logs .... aaarg.

So I rebooted. Same issue. I removed cockpit and reinstalled it with apt remove cockpit and apt install cockpit Same issue.

Bizarre. As it was working fine then stopped and now is broken and not real clues bar:

  1. The servcie seems to restart every 2 minutes, bad sign
  2. The JS console shows 404 errors immediately after login
  3. There are many other "blank page afte rlogin" bugs filed but none seemed to inform me much
garrett commented 4 years ago

Are you running Cockpit through a SSL proxy, such as with Nginx?

Cockpit version: 164-1

By-the-way: Your version of Cockpit is over a year and a half old. You may want to update it.

I'm not quite sure, as I use Fedora, but I think using the Debian backport would work on Mint? https://cockpit-project.org/running.html#debian

bernd-wechner commented 4 years ago

Thanks for the note. I just checked status again and observe three things:

  1. Said machine is on Mint 19.3 now (so underwent a general wholesale update)
  2. Cockpit works fine when I log on there, as it used to.
  3. Journctl still reveal incessant restarts which is concerning:
$ journalctl -u cockpit --since -120m
-- Logs begin at Mon 2019-02-25 01:02:04 AEDT, end at Fri 2020-01-10 15:07:43 AEDT. --
Jan 10 13:12:12 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:12:12 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:12:12 myserver cockpit-ws[27764]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:16:45 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:16:45 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:16:45 myserver cockpit-ws[27899]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:21:20 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:21:20 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:21:20 myserver cockpit-ws[28033]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:26:00 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:26:00 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:26:00 myserver cockpit-ws[28176]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:30:22 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:30:22 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:30:22 myserver cockpit-ws[28306]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:34:50 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:34:50 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:34:50 myserver cockpit-ws[28438]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:39:12 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:39:12 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:39:12 myserver cockpit-ws[28570]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:42:50 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:42:50 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:42:50 myserver cockpit-ws[28677]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:46:27 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:46:27 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:46:27 myserver cockpit-ws[28785]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:50:43 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:50:43 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:50:43 myserver cockpit-ws[28912]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:55:10 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:55:10 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:55:10 myserver cockpit-ws[29045]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 13:59:42 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 13:59:42 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 13:59:42 myserver cockpit-ws[29170]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:04:00 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:04:00 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:04:00 myserver cockpit-ws[29338]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:08:46 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:08:46 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:08:46 myserver cockpit-ws[29480]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:13:21 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:13:22 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:13:22 myserver cockpit-ws[29615]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:17:58 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:17:58 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:17:58 myserver cockpit-ws[29749]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:22:22 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:22:22 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:22:22 myserver cockpit-ws[29883]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:26:55 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:26:55 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:26:55 myserver cockpit-ws[30021]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:31:17 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:31:18 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:31:18 myserver cockpit-ws[30154]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:35:30 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:35:30 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:35:30 myserver cockpit-ws[30279]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:40:30 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:40:30 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:40:30 myserver cockpit-ws[30428]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:43:58 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:43:58 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:43:58 myserver cockpit-ws[30532]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:47:40 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:47:40 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:47:40 myserver cockpit-ws[30643]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:51:43 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:51:43 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:51:43 myserver cockpit-ws[30761]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 14:55:59 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 14:55:59 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 14:55:59 myserver cockpit-ws[30889]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 15:00:05 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 15:00:05 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 15:00:05 myserver cockpit-ws[31044]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 15:04:28 myserver systemd[1]: Starting Cockpit Web Service...
Jan 10 15:04:28 myserver systemd[1]: Started Cockpit Web Service.
Jan 10 15:04:28 myserver cockpit-ws[31187]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Jan 10 15:04:38 myserver cockpit-session[31200]: pam_ssh_add: Failed adding some keys
Jan 10 15:04:38 myserver cockpit-session[31200]: pam_unix(cockpit:session): session opened for user myuser by (uid=0)
Jan 10 15:04:38 myserver cockpit-ws[31187]: logged in user session
Jan 10 15:04:40 myserver cockpit-ws[31187]: New connection to session from 192.168.0.11

So, although it works fine, this restart every 5 mins is concerning.

bernd-wechner commented 4 years ago

Oh and no not connecting through any proxy. Direct connection on the LAN. Only make cockpit available to on the LAN not outside of it. All behind a gateway, firewall, NAT etc, and on a 109.162.0 subnet.

As to versions well I'm using the Ubuntu standard I guess. I would perhaps update to a later version on a PPA, but and also content to run with Ubuntu's vetting.

garrett commented 4 years ago

cockpit.socket is a port listener that starts cockpit.service on demand, so logs will show Cockpit starting and stopping a good bit (such as whenever you hit port 9090 with a web browser).

I'm not sure about the lower level details like this, only guessing: It might also dynamically start and stop when you access the machine from another Cockpit instance in the dashboard or via the host switcher. @martinpitt would know more.

martinpitt commented 4 years ago

It might also dynamically start and stop when you access the machine from another Cockpit instance in the dashboard or via the host switcher.

No, that doesn't involve the web server (cockpit-ws, cockpit.socket, cockpit.service) at all. Just ssh and cockpit-bridge (but that's not a service, just a simple executable that runs in the user session, not on the system level).

bernd-wechner commented 4 years ago

For what it's worth I just checked that server and it's blank screening after login again. Seems intermittent. Examining the page source reveals a pretty rich page structure for a blank page ;-). The browser console however lends a clue:

Source map error: Error: request failed with status 401
Resource URL: https://myserver.lan:9090/cockpit/$c415b1318ee3f4f8895647e8466a7707098c89d4/shell/index.js
Source Map URL: index.min.js.map

is repeated a few times. Yet if I click that link (surf to that URL it reported 401 for I get a page of JS. I guess I should try and uninstall and install the latest version, but it smells of a bug. The server isn't slow per se, but maybe there's a timing issue with the availability of support files like that index.js and ungraceful handling of it. Would take some debugging I've not made time for ...

garrett commented 4 years ago

Source map errors wouldn't cause a blank page.

Source maps only map the compiled JS/CSS to the original JS/CSS files. If they're missing, then you just won't be able to map the sources back in browser developer tools. It would not impact anything else.

(We shouldn't have source maps referenced in packages; that's a bug.... but it really shouldn't impact anything other than developer tools.)

garrett commented 4 years ago

Ah, there's already a bug for source map issues @ https://github.com/cockpit-project/cockpit/issues/10420

Interestingly, the reporter also had some blank screen issue — caused by a browser extension called "Disable Autoplay". (FWIW: Firefox can natively disable autoplay without extensions now.)

bernd-wechner commented 4 years ago

Interesting. I checked the server in Chrome and it logged in and displayed fine. So I tried again in FF and it was fine again as well. It seems so intermittent somehow.

I don't have the Disable Autoplay extension installed. And I don't know off hand how to check FF configs to see if FF natively is disabling it.

patatetom commented 4 years ago

hi,

I'm running OpenMediaVault (Debian 10) and I have the same white page problem after successful authentication.

when using Firefox's dev mode, I observe that all the GETs are OK 200 except one which is Forbidden 403 : the one on the websocket...

direct access without proxy (eg. on port 9090) return Switching Protocols 101 on the websocket.

(note that favicon.ico is 404 behind proxy and 200 with direct access)

regards, lacsaP.

patatetom commented 4 years ago

hi,

for my part, it was just a problem of origins (cross domain). no more blank page once the variable Origins correctly defined in /etc/cockpit/cockpit.conf.

(ignore the previous note concerning favicon.ico which is requested by the navigator and not by the cockpit)

regards, lacsaP.

DevDema commented 3 years ago

hi,

for my part, it was just a problem of origins (cross domain). no more blank page once the variable Origins correctly defined in /etc/cockpit/cockpit.conf.

(ignore the previous note concerning favicon.ico which is requested by the navigator and not by the cockpit)

regards, lacsaP.

Hello, I managed to solve this myself. How did you do for the 404 on favicon.ico?

Devnol commented 3 years ago

I am experiencing a similar issue when accessing my cockpit Raspbian 10 instance through nginx. Going to the same cockpit instance through the internal ip of the system works fine, so I suspect the issue lies within the nginx setup. Any help appreciated

Catfriend1 commented 3 years ago

I've seen the white page problem coming up on Debian 10 because my browser used a wpad proxy script and ws/wss need special treatment in there.

I've edited my wpad.dat script to exempt the following addresses and it worked properly after restarting the browser.

(...)
        (shExpMatch(url, "ws://IP_OF_COCKPIT_SERVER:*")) || 
        (shExpMatch(url, "wss://IP_OF_COCKPIT_SERVER:*")) || 
(...)
martinpitt commented 3 years ago

undefined cockpit.js:392:25

I just debugged this, this is a duplicate of issue #12745. PR coming.