can't setup agent, due to com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host #10716
Replies: 19 comments 2 replies
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
-
Hi @gangaswamy can you share your management server and KVM agent logs in DEBUG more (set DEBUG instead of INFO in the log4j xml configuration). Does it happen only on 20.04, have you tried 22.04? |
Beta Was this translation helpful? Give feedback.
-
I am trying on Ubuntu 20.04, $ sudo systemctl status cloudstack-agent
$ sudo systemctl status cloudstack-management
Log Management-server.log Agent log |
Beta Was this translation helpful? Give feedback.
-
@gangaswamy could you check whether package |
Beta Was this translation helpful? Give feedback.
-
$ dpkg -l | grep tzdata it is installed and its latest version. tzdata-java package is not available for Ubuntu |
Beta Was this translation helpful? Give feedback.
-
@gangaswamy Was this server added to CloudStack during zone initialization? If so, please modify the server's IP address to another unused IP address in the same VLAN, and re-add the server. |
Beta Was this translation helpful? Give feedback.
-
@gangaswamy can you run commands please also check the status and log of |
Beta Was this translation helpful? Give feedback.
-
Any news regarding this issue? I do have the same issue with Ubuntu 22.04 jammy and Cloudstack 4.18.1.0: Failed to setup keystore on the KVM host: |
Beta Was this translation helpful? Give feedback.
-
@axeldaiber do you use netplan ? have you configured |
Beta Was this translation helpful? Give feedback.
-
I got this error message when the automated ssh-login (from setup to the host) without a tty was unsuccessful. For diagnostics, I tried again with root, and that worked. Hope this may help others. Ubuntu Jammy & Cloudstack 4.18 |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if |
Beta Was this translation helpful? Give feedback.
-
I temporarily allowed root password login via SSH (revered after deployment) and it worked. Setting root as the user for the target host fixed the keystore problem. |
Beta Was this translation helpful? Give feedback.
-
I see this error on ACS 4.20.0: can't setup agent, due to com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: 192.168.1.1 - Failed to setup keystore on the K
VM host: 192.168.1.1 This happens due to the following: 2024-09-10T11:22:15,279 DEBUG [c.c.u.s.SSHCmdHelper] (qtp481511146-370:[ctx-23c36759, ctx-2d609a42]) (logid:136b20d9) SSH command: sudo /usr/share/cloudstack-common/scripts/util/keystore-setup /etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
SSH command output:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required So there's an invalid |
Beta Was this translation helpful? Give feedback.
-
Actually, > # /usr/share/cloudstack-common/scripts/util/keystore-setup /etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
Failed to generate CSR file, retrying after removing existing settings
Reverting libvirtd to not listen on TLS
Removing cloud.* files in /etc/cloudstack/agent
Retrying to generate CSR file
Failed to generate CSR file while retrying |
Beta Was this translation helpful? Give feedback.
-
this is not the full command , if you copied from management server log. |
Beta Was this translation helpful? Give feedback.
-
Yes, the command above was lifted from the log. I executed it in the command line and pasted the output 2024-09-10T11:52:05,946 DEBUG [c.c.u.s.SSHCmdHelper] (qtp481511146-33:[ctx-b9629dea, ctx-60272547]) (logid:c352422a) SSH command: sudo /usr/share/cloudstack-common/scripts/util/keystore-setup /etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
SSH command output:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required |
Beta Was this translation helpful? Give feedback.
-
Can you enable NOPASSWD in sudoers for the user ? |
Beta Was this translation helpful? Give feedback.
-
@weizhouapache Thanks, that fixed my problem! I've been using ACS since 2019 and each time I reinstall it I figure out yet another issue/trouble 😆 |
Beta Was this translation helpful? Give feedback.
-
Spent an hour battling this one. For me error wasn't associated with access. I was only able to resolve by installing agent manually and then making sure the java 17 is default. On the host you are adding:
The installation guide needs a revamp. It didn't say anything about how to prepare a host. I only found some (outdated) instructions in quickstart which is focused on much simpler setup. Also, the need to create bridges is only in troubleshooting but not in the installation guide. |
Beta Was this translation helpful? Give feedback.
-
Similar bugs were reported for previous versions like #6716, but tagged as fixed however it is not working in 4.18
ISSUE TYPE
UI,
CLOUDSTACK VERSION
4.18
CONFIGURATION
Basic Networking
OS / ENVIRONMENT
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
SUMMARY
Error 530
Could not add host at [http://192.168.122.1] with zone [2], pod [2] and cluster [2] due to: [ can't setup agent, due to com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: 192.168.122.1 - Failed to setup keystore on the KVM host: 192.168.122.1].
STEPS TO REPRODUCE
Fresh install on Ubuntu 20.04
Cloudstack Management server installed successfully and I can add Zone, Pod, Cluster, Network etc but not able to add host on KVM host.
I am using the sudo user and password
EXPECTED RESULTS
Suppose to add host easily
ACTUAL RESULTS
Not able to add KVM host
Beta Was this translation helpful? Give feedback.
All reactions