问题

问题

问题

当我尝试登录cockpitCentOS 7使用 URLhttps://localhost:9090root凭证,我得到身份验证失败:超时错误。已在网上搜索解决方案,但无法解决问题。

安装 COCKPIT 的步骤

# yum install cockpit cockpit-dashboard
# systemctl enable --now cockpit.socket
# firewall-cmd --permanent --zone=public --add-service=cockpit
# firewall-cmd --reload

输出

防火墙命令——list-all

target: default
  icmp-block-inversion: no
  interfaces: em1
  sources: 
  services: cockpit dhcpv6-client nfs rpc-bind ssh
  ports: 5901/tcp 944/tcp 944/udp 945/tcp 945/udp 946/udp 9090/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

/var/log/消息输出

Mar  1 23:22:20 srv01 systemd: Starting Cockpit Web Service...
Mar  1 23:22:20 srv01 systemd: Started Cockpit Web Service.
Mar  1 23:22:20 srv01 cockpit-ws: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Mar  1 23:22:40 srv01 cockpit-session: pam_ssh_add: Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Mar  1 23:22:40 srv01 systemd: Created slice User Slice of root.
Mar  1 23:22:40 srv01 systemd-logind: New session 6 of user root.
Mar  1 23:22:40 srv01 systemd: Started Session 6 of user root.
Mar  1 23:22:41 srv01 journal: clutter_actor_set_size: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar  1 23:22:41 srv01 journal: clutter_actor_show: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar  1 23:23:10 srv01 cockpit-ws: cockpit-session: session timed out during authentication
Mar  1 23:23:10 srv01 org.gtk.vfs.Daemon: A connection to the bus can't be made
Mar  1 23:23:10 srv01 cockpit-ws: cockpit-session: authentication timed out
Mar  1 23:23:10 srv01 systemd-logind: Removed session 6.
Mar  1 23:23:10 srv01 systemd: Removed slice User Slice of root.
Mar  1 23:23:11 srv01 journal: clutter_actor_set_size: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar  1 23:23:11 srv01 journal: clutter_actor_show: assertion 'CLUTTER_IS_ACTOR (self)' failed

journalctl -f 输出

Mar 01 23:22:20 srv01.vlsi.silicon.ac.in systemd[1]: Starting Cockpit Web Service...
Mar 01 23:22:20 srv01.vlsi.silicon.ac.in systemd[1]: Started Cockpit Web Service.
Mar 01 23:22:20 srv01.vlsi.silicon.ac.in cockpit-ws[6374]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Mar 01 23:22:21 srv01.vlsi.silicon.ac.in rtkit-daemon[1123]: Supervising 1 threads of 1 processes of 1 users.
Mar 01 23:22:21 srv01.vlsi.silicon.ac.in rtkit-daemon[1123]: Supervising 1 threads of 1 processes of 1 users.
Mar 01 23:22:40 srv01.vlsi.silicon.ac.in cockpit-session[6430]: pam_ssh_add: Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Mar 01 23:22:40 srv01.vlsi.silicon.ac.in systemd[1]: Created slice User Slice of root.
Mar 01 23:22:40 srv01.vlsi.silicon.ac.in systemd-logind[1129]: New session 6 of user root.
Mar 01 23:22:40 srv01.vlsi.silicon.ac.in systemd[1]: Started Session 6 of user root.
Mar 01 23:22:40 srv01.vlsi.silicon.ac.in cockpit-session[6430]: pam_unix(cockpit:session): session opened for user root by (uid=0)
Mar 01 23:22:41 srv01.vlsi.silicon.ac.in gnome-shell[2736]: clutter_actor_set_size: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 01 23:22:41 srv01.vlsi.silicon.ac.in gnome-shell[2736]: clutter_actor_show: assertion 'CLUTTER_IS_ACTOR (self)' failed
Mar 01 23:23:10 srv01.vlsi.silicon.ac.in cockpit-ws[6374]: cockpit-session: session timed out during authentication
Mar 01 23:23:10 srv01.vlsi.silicon.ac.in org.gtk.vfs.Daemon[6465]: A connection to the bus can't be made
Mar 01 23:23:10 srv01.vlsi.silicon.ac.in cockpit-session[6430]: pam_unix(cockpit:session): session closed for user root
Mar 01 23:23:10 srv01.vlsi.silicon.ac.in cockpit-ws[6374]: cockpit-session: authentication timed out
Mar 01 23:23:10 srv01.vlsi.silicon.ac.in systemd-logind[1129]: Removed session 6.
Mar 01 23:23:10 srv01.vlsi.silicon.ac.in systemd[1]: Removed slice User Slice of root.
Mar 01 23:23:11 srv01.vlsi.silicon.ac.in gnome-shell[2736]: clutter_actor_set_size: assertion 'CLUTTER_IS_ACTOR (self)' failed

使用 Firefox 登录 Cockpit

驾驶舱登录失败

答案1

该问题与 Origins 有关,您需要在 conf 文件中像这样指定它们

[WebService]  
Origins = http://10.0.0.18 http://192.168.1.0 
AllowUnencrypted = yes  

相关内容