I upgraded from 4.19 to 4.20 as well but preserved the files, as I would 
normally do as well with other packages.
Haven’t run into any issues still as of yet.

--
Jimmy

From: Nux <n...@li.nux.ro>
Date: Monday, 3 February 2025 at 23:25
To: users@cloudstack.apache.org <users@cloudstack.apache.org>
Cc: Andrei Miron <andrei.mi...@iqrate.ro>
Subject: Re: upgrade from 4.19 to 4.20
It might be helpful to run those operations with the log level set to
DEBUG, could give us more insights.

That said, I upgraded from 4.19 to 4.20 and I too hit issues, including
the new DB thing in 4.20 and the new log4j2 - make sure log4j2.xml is
symlink to log4j-cloud.xml in /etc/cloudstack/management and agent.
What I ended up doing was to compare the old and new properties files
and merge them carefully - not sure Cloudstack would have still worked
with the old syntax, I think it would have.

Anyway, whenever I needed to re-add a host I always preferred to backup
and move the agent.properties and start with a stock one (ie as it comes
in the rpm) and always worked.

I think upgrading to 4.20 should be given greater attention than usual
because of these changes, read the release notes carefully and test
thoroughly.



On 2025-02-03 16:54, Andrei Miron wrote:
> I did but it didn't change the behaviour of the agent.
> I tried the procedure to re-add the host (found it in the mailing list
> for an old version):
> 1. Copied the contents of the agent.properties file from another KVM
> host.
> 2. Removed the values in the fields like: guid and keystore.passphrase
> 3. Set the ca.plugin.root.auth.strictness to false in Global Settings.
> Restarted the management server
> 4. Started the agent. This created a new host entry with Unsecure
> status. The old host entry was still showing Disconnecrted.
> 5. Provisioned the new keys
> 6. Removed the old host entry with the Force option ticked
> 7. Reverted the setting in 3 above
> 8. Restarted the management server
> 9. Job done
>
> But it is not working anymore. The agent is not creating the new host
> (point 4) and I could't add in the management interface because I
> already have a host in the database.
> It seems that I'm the only one doing this update from 4.19 to 4.20?
> I installed 4.19 from scratch and update to 4.20 and both times I found
> the same problem.
>
> Andrei
>
>
> -----Original Message-----
> From: ustcweiz...@gmail.com <ustcweiz...@gmail.com>
> Sent: Sunday, February 2, 2025 22:39
> To: users@cloudstack.apache.org
> Subject: Re: upgrade from 4.19 to 4.20
>
> just copy the agent.properties from backup and retry ?
>
> I never faced this issue before. I always keep the old agent.properties
> during upgrade.
>
>
> -Wei
>
>
> On Sun, Feb 2, 2025 at 7:46 PM Andrei Miron <andrei.mi...@iqrate.ro>
> wrote:
>
>> I put all the data from the previous agent.properties and dB password
>> in dB.properties.
>> Management server is working but agent cannot connect to it because
>> SSL handshake.
>>
>> Romanian
>>
>> On 2 Feb 2025 20:40, ustcweiz...@gmail.com wrote:
>> Yes. But I think we do not need to change anything in db.properties.
>>
>> I advise you to restore db.properties and agent.properties from
>> backup.
>>
>> -Wei
>>
>> On Sunday, February 2, 2025, Andrei Miron <andrei.mi...@iqrate.ro>
>> wrote:
>>
>> > Yes, of course.
>> > 4.20 is coming with a new dB connector.
>> >
>> > Andrei
>> >
>> > On 2 Feb 2025 19:50, ustcweiz...@gmail.com wrote:
>> > Did you override the db.properties and agent.properties during upgrade ?
>> >
>> > On Sunday, February 2, 2025, Andrei Miron <andrei.mi...@iqrate.ro>
>> wrote:
>> >
>> > > Hi,
>> > >
>> > > I'm new to Cloudstack.
>> > > I installed Cloudstack 4.19 following the very good procedure
>> > > (thanks Rohit Yadav) noth management and KVM on the same host:
>> > > https://rohityadav.cloud/blog/cloudstack-kvm/#kvm-host-setup
>> > > After that I did an upgrade to see how easy/hard it is following
>> > > the official documentation:
>> > > https://docs.cloudstack.apache.org/en/4.20.0.0/
>> > > upgrading/upgrade/upgrade-4.19.html
>> > > I used the same repository from ShapeBlue but fro version 4.20
>> > >
>> > > There are some missing points in the documentation:
>> > >
>> > >   *   Management server:
>> > >      *   upgrade is not registering the new System VM as it does at the
>> > > installation. I did it manually but I don't know if I should
>> > > delete the
>> > old
>> > > one or not
>> > >      *   if the DB password is not the default one (cloud@localhost)
>> > > before starting the management server it should be changed in
>> > db.properties
>> > >      *   version 4.20 is not supporting hash password as 4.19 so the
>> > > password should not be copied from db.properties.dpkg-old (where
>> > > is
>> > hashed
>> > > ENC())
>> > >   *   agent:
>> > >      *   here it should be copied all the settings from the old file
>> > > agent.properties.dpkg-old otherwise all the setting are for a
>> > > vanilla installation
>> > >
>> > > Now the problem I could not solve is that after upgrade is the
>> > > fact
>> that
>> > > agent can't connect to the server. The error in log is:
>> > > 2025-02-02 13:40:14,580 INFO  [cloud.agent.Agent] (main:[])
>> > > (logid:) Connecting to host:192.168.0.130
>> > > 2025-02-02 13:40:14,581 INFO  [utils.nio.NioClient] (main:[])
>> > > (logid:) Connecting to 192.168.0.130:8250
>> > > 2025-02-02 13:40:14,581 INFO  [utils.nio.Link] (main:[]) (logid:)
>> > > Conf file found: /etc/cloudstack/agent/agent.properties
>> > > 2025-02-02 13:40:14,657 ERROR [utils.nio.Link] (main:[]) (logid:)
>> > > SSL error caught during unwrap data: Received fatal alert:
>> handshake_failure,
>> > > for local address=/192.168.0.130:52184, remote address=/
>> > 192.168.0.130:8250.
>> > > The client may have invalid ca-certificates.
>> > > 2025-02-02 13:40:14,658 ERROR [utils.nio.NioClient] (main:[])
>> > > (logid:)
>> > SSL
>> > > Handshake failed while connecting to host: 192.168.0.130 port:
>> > > 8250
>> > > 2025-02-02 13:40:14,658 ERROR [utils.nio.NioClient] (main:[])
>> > > (logid:) Unable to initialize the threads. java.io.IOException:
>> > > SSL Handshake
>> > failed
>> > > while connecting to host: 192.168.0.130 port: 8250
>> > >         at com.cloud.utils.nio.NioClient.init(NioClient.java:65)
>> > >         at com.cloud.utils.nio.NioConnection.start(
>> > NioConnection.java:96)
>> > >         at com.cloud.agent.Agent.start(Agent.java:298)
>> > >         at com.cloud.agent.AgentShell.launchNewAgent(AgentShell.
>> > java:455)
>> > >         at com.cloud.agent.AgentShell.launchAgentFromClassInfo(
>> > > AgentShell.java:432)
>> > >         at com.cloud.agent.AgentShell.launchAgent(AgentShell.java:416)
>> > >         at com.cloud.agent.AgentShell.start(AgentShell.java:512)
>> > >         at com.cloud.agent.AgentShell.main(AgentShell.java:542)
>> > >
>> > > 2025-02-02 13:40:14,658 INFO  [utils.nio.NioClient] (main:[])
>> > > (logid:) NioClient connection closed
>> > > 2025-02-02 13:40:14,658 INFO  [cloud.agent.Agent] (main:[])
>> > > (logid:) Attempted to connect to the server, but received an
>> > > unexpected
>> exception,
>> > > trying again... com.cloud.utils.exception.NioConnectionException:
>> > > SSL Handshake failed while connecting to host: 192.168.0.130 port: 8250
>> > >         at com.cloud.utils.nio.NioConnection.start(
>> > NioConnection.java:102)
>> > >         at com.cloud.agent.Agent.start(Agent.java:298)
>> > >         at com.cloud.agent.AgentShell.launchNewAgent(AgentShell.
>> > java:455)
>> > >         at com.cloud.agent.AgentShell.launchAgentFromClassInfo(
>> > > AgentShell.java:432)
>> > >         at com.cloud.agent.AgentShell.launchAgent(AgentShell.java:416)
>> > >         at com.cloud.agent.AgentShell.start(AgentShell.java:512)
>> > >         at com.cloud.agent.AgentShell.main(AgentShell.java:542)
>> > > Caused by: java.io.IOException: SSL Handshake failed while
>> > > connecting
>> to
>> > > host: 192.168.0.130 port: 8250
>> > >         at com.cloud.utils.nio.NioClient.init(NioClient.java:65)
>> > >         at com.cloud.utils.nio.NioConnection.start(
>> > NioConnection.java:96)
>> > >         ... 6 more
>> > >
>> > > Can you please tell me what should I do?
>> > >
>> > > Thanks,
>> > > Andrei
>> > >
>> > >
>> >
>>

Reply via email to