Agent : SSL Handshake failed while connecting to host on port: 8250

See original GitHub issue
ISSUE TYPE
  • Bug Report
COMPONENT NAME
cloudstack-agent - kvm
CLOUDSTACK VERSION
4.15.0.0
SUMMARY

I cant add a kvm, it works with xcp-ng/xen but not with kvm and I get this error :

Feb  7 00:59:56 cloud java[3387]: INFO  [cloud.agent.Agent] (main:) (logid:) Connecting to host:192.168.56.85
Feb  7 00:59:56 cloud java[3387]: INFO  [utils.nio.NioClient] (main:) (logid:) Connecting to 192.168.56.85:8250
Feb  7 00:59:56 cloud java[3387]: INFO  [utils.nio.Link] (main:) (logid:) Conf file found: /etc/cloudstack/agent/agent.properties
Feb  7 00:59:56 cloud java[3387]: WARN  [utils.nio.Link] (main:) (logid:) Failed to load keystore, using trust all manager
Feb  7 00:59:56 cloud java[1689]: ERROR [c.c.u.n.Link] (AgentManager-SSLHandshakeHandler-1:null) (logid:) SSL error caught during wrap data: Empty server certificate chain, for local address=>Feb  7 00:59:56 cloud java[3387]: ERROR [utils.nio.Link] (main:) (logid:) SSL error caught during unwrap data: Received fatal alert: bad_certificate, for local address=/192.168.56.85:53164, r>Feb  7 00:59:56 cloud java[3387]: ERROR [utils.nio.NioClient] (main:) (logid:) SSL Handshake failed while connecting to host: 192.168.56.85 port: 8250
Feb  7 00:59:56 cloud java[3387]: ERROR [utils.nio.NioConnection] (main:) (logid:) Unable to initialize the threads.
Feb  7 00:59:56 cloud java[3387]: java.io.IOException: SSL Handshake failed while connecting to host: 192.168.56.85 port: 8250
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.utils.nio.NioClient.init(NioClient.java:67)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.utils.nio.NioConnection.start(NioConnection.java:95)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.Agent.start(Agent.java:294)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.launchNewAgent(AgentShell.java:455)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.launchAgentFromClassInfo(AgentShell.java:422)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.launchAgent(AgentShell.java:406)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.start(AgentShell.java:512)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.main(AgentShell.java:547)
Feb  7 00:59:56 cloud java[3387]: INFO  [utils.nio.NioClient] (main:) (logid:) NioClient connection closed
Feb  7 00:59:56 cloud java[3387]: INFO  [cloud.agent.Agent] (main:) (logid:) Attempted to connect to the server, but received an unexpected exception, trying again...
Feb  7 00:59:56 cloud java[3387]: com.cloud.utils.exception.NioConnectionException: SSL Handshake failed while connecting to host: 192.168.56.85 port: 8250
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.utils.nio.NioConnection.start(NioConnection.java:101)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.Agent.start(Agent.java:294)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.launchNewAgent(AgentShell.java:455)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.launchAgentFromClassInfo(AgentShell.java:422)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.launchAgent(AgentShell.java:406)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.start(AgentShell.java:512)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.agent.AgentShell.main(AgentShell.java:547)
Feb  7 00:59:56 cloud java[3387]: Caused by: java.io.IOException: SSL Handshake failed while connecting to host: 192.168.56.85 port: 8250
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.utils.nio.NioClient.init(NioClient.java:67)
Feb  7 00:59:56 cloud java[3387]: #011at com.cloud.utils.nio.NioConnection.start(NioConnection.java:95)
Feb  7 00:59:56 cloud java[3387]: #011... 6 more
Feb  7 00:59:56 cloud java[1689]: INFO  [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-3:null) (logid:) Connection from /192.168.56.85 closed but no cleanup was done.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:31 (27 by maintainers)

github_iconTop GitHub Comments

1reaction
rohityadavcloudcommented, Mar 6, 2021

@abdelouahabb since you’ve disabled auth strictness you may want to do the same on your libvirtd, set the listen_tls = 0 and listen_tcp = 1 in libvirtd conf, restart libvirtd and try again.

Since the original issue of agent SSL failure was fixed with the global setting workaround, I’ll close the ticket. Please open new ticket for unrelated failures. I think you’re using a nested env in VirtualBox and the env lack entropy, otherwise the SSL handshake would also work. (from experience VMs in some desktop hypervisors for ex. VirtualBox run slower compared to on baremetal or more modern/well-supported hypervisors such as KVM, VMware).

0reactions
ThyLAWcommented, Feb 26, 2021

@ThyLAW @abdelouahabb is sudo and haveged installed on your system? Also note CloudStack required full virtualisation on KVM (PV may not work or at least not tested, usually you can use VMware workstation/fusion than VirtualBox on Windows/Mac and KVM on Linux, i.e. on your laptop/desktop). For Ubuntu-based quick install guide, you can refer to https://rohityadav.cloud/blog/cloudstack-kvm/ (change the version/repo accordingly) - see if there’s any step you missed?

Hello, virtualization works on Hyper-V by running a powershell script to enable it. I have tested it by creating a new virtual machine using virt-manager. I am going to go through your installation guide to see if that works. If not, I am going to try VMware though I don’t think it is the hypervisor that is causing issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSVM NIO SSL Handshake error-Apache Mail Archives - Re
The error message "Failed to send server's CLOSE message due to socket channel's failure." suggests that mgmt server was not able to accept...
Read more >
System VM Unable connect to management server on port 8250
SSVM agent state is shown as blank in Cloudplatform User Interface. When trying to start the cloud service , it fails with following...
Read more >
CloudStack 4.11.1 Agent SSL Errors · Issue #3067 - GitHub
NioConnectionException : SSL Handshake failed while connecting to host: 10.10.13.180 port: 8250 2018-11-29 09:24:41,004 INFO [cloud.agent.
Read more >
SSL authentication failure - users@cloudstack.apache.org
NioConnectionException : SSL Handshake failed while connecting to host: localhost port: 8250 2018-04-03 09:12:14,590 INFO [cloud.agent.
Read more >
Re: Unable to build first zone - The Mail Archive
IOException : SSL Handshake failed while connecting to host: 10.2.88.3 port: 8250 at com.cloud.utils.nio.NioClient.init(NioClient.java:67) at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found