mlukas
Posts: 10
Joined: Tue Jun 14, 2011 6:24 am

Starting a Service

I am installing a service and using a Service Control Operation to start the service on install. I have "Wait until the service completes" checked. If the service fails to start, AI takes 2.5 minutes to display an error message instead of the 30 seconds described in the documentation.

The error message provides two options: Retry and Cancel. If you select Cancel, the installation is rolled back. Is there a way to allow the install to complete even if the service cannot be started?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Starting a Service

Hello and welcome to the Advanced Installer Forums,

As explained in this thread, the 30 seconds represent additional time for a critical event to return a failure error.

Can you please try the setup on other machines and also specify the error message you are getting?
Is there a way to allow the install to complete even if the service cannot be started?
You can add a Service Failure action for your service.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mlukas
Posts: 10
Joined: Tue Jun 14, 2011 6:24 am

Re: Starting a Service

The error message is

"Service <name> failed to start. Verify that you have sufficient privileges to start system services. Retry Cancel

where <name> is the name of the service being installed that failed to start.

The is repeatable on other machines. I know why the service is not starting and can correct that. However, this has raised an issue with the installer and I want to ensure that the installer will run to completion (and not rollback) even if a service that is being installed fails to start.

The Service Failure Action seems to relate to how the service being installed is configured within the Windows SCM and the actions that Windows will take once install is complete. I need a way to control behaviour during the installation process.
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Starting a Service

Hi,

I'm afraid these are the only options available in Advanced Installer. If you want, you can use a simple custom action for starting the service instead of our predefined support from
Services page. You could use a Launch File or Open URL custom action and the following Windows tool to start the service.

The custom actions should be set as "Synchronous execution, ignore return code", so if fails to start the service the installation can continue.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
navya
Posts: 55
Joined: Thu Jan 05, 2012 6:36 am

Re: Starting a Service

Hi,
Can any 1 please help me out to solve my issue, I am waiting for the answer from past 2 days, getting very late respond. I have new Tomcat Application. When i install my Application in my system everything working fine. But when i restart my system and then clicking on shortcuts on desktop. I am raising 404 error in tomcat which means tomcat Application failed to load. when i go in to http://localhost:9090/manager/html . there i found my application failed to load. manually when i click on "start" button it working fine.
Now what i want is when i restart my system. even my Application need to be in start mode with tomcat and shouldn't face any troubleshooting for users who use it.
Please give me immediate reply as u can
Regards,
Nav
navya
Posts: 55
Joined: Thu Jan 05, 2012 6:36 am

Re: Starting a Service

Hi,
Can any 1 please let me know how to modify things in server.xml file of tomcat Application.I couldn't able to change things in server.xml file.
navya
Posts: 55
Joined: Thu Jan 05, 2012 6:36 am

Re: Starting a Service

Hi,
Manually when i deploy my Application in tomcat and make tomact in automatic mode, then my aplication is running after restart of system. but when i insatll exe file in my system. for the 1st time my appplication is working, but once we restart the system. and clicking on shortcuts it showing 404 error. any help please let me know.
in logs i can see error:
SEVERE: Context [/] startup failed due to previous errors
Feb 29, 2012 3:42:03 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Feb 29, 2012 3:42:05 PM org.apache.catalina.startup.HostConfig deployDirectory
Last edited by navya on Thu Mar 01, 2012 8:10 am, edited 1 time in total.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Starting a Service

Hello Navya,
Can any 1 please let me know how to modify things in server.xml file of tomcat Application.I couldn't able to change things in server.xml file.
Have you tried using our XML update feature.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Starting a Service

When the service type is automatic( as you set it ) the service should start automatically after reboot.
However, it seems you are using an ODBC driver which is not handled correctly by the service. The issue lies in the service, so I'm afraid there's nothing we can help you with. You can try to debug and find out why the driver behaves this way.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
navya
Posts: 55
Joined: Thu Jan 05, 2012 6:36 am

Re: Starting a Service

Hi,
When i Deploy application in tomcat manually. i dont find any issues. but when i pack them in Advanced installer and create exe file i found this issue. on restart of system. Apllication getting failed to start
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Starting a Service

Hi,

This problem is not related to Advanced Installer or the application. The service itself fails to start because of an ODBC driver it's using. So you need to determine why the service cannot start after a reboot and fix it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”