Should CargoDaemonServlet "load on startup"?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Should CargoDaemonServlet "load on startup"?

Erik Boye

Hi,

 

We are using Cargo Daemon to bootstrap our web containers. All containers are configured with the autostart property set to true.

The daemon itself is bootstrapped as a Windows service – which is configured to start automatically.

 

The problem is that after a server reboot, our containers are not automatically started by the daemon – as you (at least I) would expect with this setup.

The daemon starts (so our Cargo Daemon Windows service wrapper seems to work), but the daemon does not start any containers.

But if you access the Cargo Daemon browser UI, the autostart feature kicks in and all configured containers are started by the daemon.

 

It seems like the problem is related to the fact that the scheduled task that takes care of the autostart feature is initialized in the constructor of CargoDaemonServlet, and this constructor is not invoked before the servlet is loaded by the daemon web container (TJWS). This can easily be fixed by adding '<load-on-startup>1</load-on-startup>' to the CargoDaemonServlet configuration in web.xml (in cargo-daemon-webapp).

 

Comments? I would like to file an issue in the JIRA if you agree that this might be a bug in the Cargo Daemon.

 

Regards,

Erik

Reply | Threaded
Open this post in threaded view
|

Re: Should CargoDaemonServlet "load on startup"?

S. Ali Tokmen
Hi Erik

Yes, this is definitely a bug. You can file a JIRA - The correction is ready on my side.

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 25/03/15 13:02, Erik Boye wrote:

Hi,

 

We are using Cargo Daemon to bootstrap our web containers. All containers are configured with the autostart property set to true.

The daemon itself is bootstrapped as a Windows service – which is configured to start automatically.

 

The problem is that after a server reboot, our containers are not automatically started by the daemon – as you (at least I) would expect with this setup.

The daemon starts (so our Cargo Daemon Windows service wrapper seems to work), but the daemon does not start any containers.

But if you access the Cargo Daemon browser UI, the autostart feature kicks in and all configured containers are started by the daemon.

 

It seems like the problem is related to the fact that the scheduled task that takes care of the autostart feature is initialized in the constructor of CargoDaemonServlet, and this constructor is not invoked before the servlet is loaded by the daemon web container (TJWS). This can easily be fixed by adding '<load-on-startup>1</load-on-startup>' to the CargoDaemonServlet configuration in web.xml (in cargo-daemon-webapp).

 

Comments? I would like to file an issue in the JIRA if you agree that this might be a bug in the Cargo Daemon.

 

Regards,

Erik


Reply | Threaded
Open this post in threaded view
|

RE: Should CargoDaemonServlet "load on startup"?

Erik Boye

Thanks! Here is the Jira issue: https://jira.codehaus.org/browse/CARGO-1312

Hope to see this fixed in the next release of Cargo.

 

Regards,

Erik

 

From: S. Ali Tokmen [mailto:[hidden email]]
Sent: 27. mars 2015 00:36
To: [hidden email]
Subject: Re: [cargo-user] Should CargoDaemonServlet "load on startup"?

 

Hi Erik

Yes, this is definitely a bug. You can file a JIRA - The correction is ready on my side.

Thank you


S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

On 25/03/15 13:02, Erik Boye wrote:

Hi,

 

We are using Cargo Daemon to bootstrap our web containers. All containers are configured with the autostart property set to true.

The daemon itself is bootstrapped as a Windows service – which is configured to start automatically.

 

The problem is that after a server reboot, our containers are not automatically started by the daemon – as you (at least I) would expect with this setup.

The daemon starts (so our Cargo Daemon Windows service wrapper seems to work), but the daemon does not start any containers.

But if you access the Cargo Daemon browser UI, the autostart feature kicks in and all configured containers are started by the daemon.

 

It seems like the problem is related to the fact that the scheduled task that takes care of the autostart feature is initialized in the constructor of CargoDaemonServlet, and this constructor is not invoked before the servlet is loaded by the daemon web container (TJWS). This can easily be fixed by adding '<load-on-startup>1</load-on-startup>' to the CargoDaemonServlet configuration in web.xml (in cargo-daemon-webapp).

 

Comments? I would like to file an issue in the JIRA if you agree that this might be a bug in the Cargo Daemon.

 

Regards,

Erik

 

Reply | Threaded
Open this post in threaded view
|

Re: Should CargoDaemonServlet "load on startup"?

S. Ali Tokmen
Hi Erik

Thanks for the JIRA entry - It is now fixed and available as a SNAPSHOT.

To check it out, read more here: http://cargo.codehaus.org/Downloads#Downloads-continousBuilds

Regards

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 27/03/15 09:36, Erik Boye wrote:

Thanks! Here is the Jira issue: https://jira.codehaus.org/browse/CARGO-1312

Hope to see this fixed in the next release of Cargo.

 

Regards,

Erik

 

From: S. Ali Tokmen [[hidden email]]
Sent: 27. mars 2015 00:36
To: [hidden email]
Subject: Re: [cargo-user] Should CargoDaemonServlet "load on startup"?

 

Hi Erik

Yes, this is definitely a bug. You can file a JIRA - The correction is ready on my side.

Thank you


S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

On 25/03/15 13:02, Erik Boye wrote:

Hi,

 

We are using Cargo Daemon to bootstrap our web containers. All containers are configured with the autostart property set to true.

The daemon itself is bootstrapped as a Windows service – which is configured to start automatically.

 

The problem is that after a server reboot, our containers are not automatically started by the daemon – as you (at least I) would expect with this setup.

The daemon starts (so our Cargo Daemon Windows service wrapper seems to work), but the daemon does not start any containers.

But if you access the Cargo Daemon browser UI, the autostart feature kicks in and all configured containers are started by the daemon.

 

It seems like the problem is related to the fact that the scheduled task that takes care of the autostart feature is initialized in the constructor of CargoDaemonServlet, and this constructor is not invoked before the servlet is loaded by the daemon web container (TJWS). This can easily be fixed by adding '<load-on-startup>1</load-on-startup>' to the CargoDaemonServlet configuration in web.xml (in cargo-daemon-webapp).

 

Comments? I would like to file an issue in the JIRA if you agree that this might be a bug in the Cargo Daemon.

 

Regards,

Erik