cockpit install

Issues related to applications and software problems
lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

cockpit install

Post by lightman47 » 2020/02/13 21:32:03

On my CentOS 8 machines, cockpit is installed by default and works. Liking the quick overview it provides, I've installed it on a couple CentOS 7 machines having found it in the repos. Despite ENABLEing both cockpit and cockpit-motd services on, and rebooting these machines, I have no access until I SSH into the machine and manually START one of those services. Then I am good to go.

What have I missed with the setup?

Thank you.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: cockpit install

Post by aks » 2020/02/14 18:07:05

So the service(s) don't start at boot? Why not? Perhaps status and/or journalctl will give you a hint.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: cockpit install

Post by lightman47 » 2020/02/14 18:52:10

despite multiple ENABLEs, and even subsequent STARTs, the next reboot:

Code: Select all

# systemctl status -l cockpit
● cockpit.service - Cockpit Web Service
   Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:cockpit-ws(8)

Code: Select all

# journalctl _SYSTEMD_UNIT=cockpit.service
-- No entries --

Code: Select all

 
# man:cockpit-ws(8)
-bash: syntax error near unexpected token `8'

Code: Select all

man cockpit-ws(8)
-bash: syntax error near unexpected token `('

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: cockpit install

Post by lightman47 » 2020/02/15 16:36:57

More investigation reveals there is no cockpit.target.wants (or anything like that) in /etc/systemd/system. Indeed, when I systemctl enable cockpit, I never got the normal message about the link being copied. Instead, nothing!


Hmmm

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: cockpit install

Post by MartinR » 2020/02/15 17:22:33

I do see

Code: Select all

ls /etc/systemd/system/sockets.target.wants
avahi-daemon.socket  cups.socket      iscsid.socket    multipathd.socket  spice-vdagentd.socket  virtlockd.socket
cockpit.socket       dm-event.socket  iscsiuio.socket  rpcbind.socket     sssd-kcm.socket        virtlogd.socket
However cockpit is only started on demand:

Code: Select all

# systemctl status cockpit
● cockpit.service - Cockpit Web Service
   Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:cockpit-ws(8)
Point my browser at cockpit

Code: Select all

# systemctl status cockpit
● cockpit.service - Cockpit Web Service
   Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
   Active: active (running) since Sat 2020-02-15 17:14:25 GMT; 8s ago
     Docs: man:cockpit-ws(8)
  Process: 5666 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type=etc_t (code=exited, status=0/S>
 Main PID: 5668 (cockpit-ws)
    Tasks: 3 (limit: 25007)
   Memory: 3.6M
   CGroup: /system.slice/cockpit.service
           └─5668 /usr/libexec/cockpit-ws
Log in

Code: Select all

# systemctl status cockpit
● cockpit.service - Cockpit Web Service
   Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
   Active: active (running) since Sat 2020-02-15 17:14:25 GMT; 45s ago
     Docs: man:cockpit-ws(8)
  Process: 5666 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type=etc_t (code=exited, status=0/S>
 Main PID: 5668 (cockpit-ws)
    Tasks: 4 (limit: 25007)
   Memory: 9.4M
   CGroup: /system.slice/cockpit.service
           ├─5668 /usr/libexec/cockpit-ws
           └─5691 /usr/bin/ssh-agent

Feb 15 17:14:24 CentOS8.home systemd[1]: Starting Cockpit Web Service...
Feb 15 17:14:25 CentOS8.home systemd[1]: Started Cockpit Web Service.
Feb 15 17:14:25 CentOS8.home cockpit-ws[5668]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Feb 15 17:15:01 CentOS8.home cockpit-session[5686]: pam_ssh_add: Identity added: /home/****/.ssh/id_rsa (/home/****/.ssh/id_rsa)
Feb 15 17:15:01 CentOS8.home cockpit-session[5686]: pam_ssh_add: Identity added: /home/****/.ssh/id_dsa (/home/****/.ssh/id_dsa)
Feb 15 17:15:01 CentOS8.home cockpit-session[5686]: pam_unix(cockpit:session): session opened for user **** by (uid=0)
Feb 15 17:15:02 CentOS8.home cockpit-ws[5668]: logged in user session
Feb 15 17:15:03 CentOS8.home cockpit-ws[5668]: New connection to session from 192.168.X.Y

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: cockpit install

Post by lightman47 » 2020/02/15 17:29:24

Oh, then it's likely me who's 'messed-up'. I installed it assuming it would always be available, as is the case in CentOS 8. I'll probably have to manually create a start service for it on my C7 machines.

Thank you!

EDIT: Corrected 'tar service' to 'start service'.
Last edited by lightman47 on 2020/02/15 17:57:08, edited 1 time in total.

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: cockpit install

Post by MartinR » 2020/02/15 17:54:32

Oops, my mistake. I've only come across cockpit on C8 and so the examples were all from a C8 VM. If you're running the server on C7 it may be different. Sorry for the noise.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: cockpit install

Post by lightman47 » 2020/02/15 18:00:24

No problem - input is useful! Currently I'm poking around my C8 machine to see how they're starting it. If it's a simple service file somewhere, and I can merely copy (or copy/edit a little) it then life is good.

;)

Interestingly, it would appear that the "locate" command, or some components thereof, are now gone in C8. Example: # locate cockpit*.*
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: cockpit install

Post by lightman47 » 2020/02/15 18:17:15

According to the man page, cockpit-ws is the 'listener'. It is installed.

Code: Select all

Package cockpit-ws-195.1-1.el7.centos.0.1.x86_64 already installed and latest version

Code: Select all

systemctl enable cockpit-ws
Failed to execute operation: No such file or directory
I am missing something basic methinks.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: cockpit install

Post by TrevorH » 2020/02/15 18:22:23

systemctl list-unit-files | grep cockpit ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply