error 1053 when starting a service installed by install4j - windows

I am trying to make a bundled JBoss AS 7 into my exe, and install it as a service, so in the "Install a Service" action, I use [Other Service Executable], and give it the full path to standalone.bat so that it could execute it.
The service gets installed correctly, however when I try to start it , it gives me the error 1053
Error 1053: The service did not respond to the start or control
request in a timely fashion
What it is that I could have missed?

"standalone.bat" is not a service executable, so it cannot be started by the service manager. Either you have a 3rd party service executable for JBoss, or you can set up a generated service launcher in install4j that mimics the call made in standalone.bat.

Related

Unable to control Windows service created with sc

I created a Windows service for my application using a batch file containing the instruction:
sc create <name> binPath= "C:\my\path\" DisplayName= "MyName"
The service is created successfully and the application runs without issues. The Windows Service Manager shows the service in the list, however it does not have the "started" status, even though it is running. Clicking on "start service" fails with "Error 1053: The service did not respond to the start or control request in a timely fashion".
When attempting to control the service using the net command, such as
net stop <name>
or
net start <name>
these commands fail with similar error messages.
This happens consistently on all Windows I tested on (up to Windows 7). Restarting the machine does not change anything.
Any reason why a successfully created and running service cannot be started or stopped (or even have its status recognized)?
(Including information from comments to the question.)
Linux daemon processes are controlled through signals.
Windows Services have a completely model. The process needs to connect to the Service Control Manager (SCM: the services.exe process) on start up to provide a callback. This callback is the main entry to the service, and also how the SCM signals important events (eg. that the service should stop).
This is covered on MSDN, and .NET has specific support (by subclassing ServiceBase.)
It maybe possible to find a helper program that provides the SCM integration and launches you program, but likely it will just terminate your processes (*nix style signals do not exist on Windows) on the SCM sending a stop.

Mule Anypoint Gateway for .NET platform not running as a service in windows 7 professional desktop

I am trying to use MSMQ queue inside Mule flow;Going by the docs here, I find we need to run Anypoint Gateway as a service. The service wont run and gives error:
"Error 1053: The service did not respond to the start or control request in a timely fashion"
System:windows 7 professional desktop 64 bit;
How to resolve the issue?
Info from System logs:
A timeout was reached (30000 milliseconds) while waiting for the Anypoint Gateway service to connect.
Info from Application logs:
The program AnyPoint-Gateway-Service.exe version 1.0.0.0 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
Error from MSI installer:
Product: Anypoint Gateway for Windows -- Error 1920. Service 'Anypoint Gateway' (MuleMSMQService) failed to start. Verify that you have sufficient privileges to start system services.
I have admin privileges to install any service and running on .NET 4.03 platform.
The Mule Doc says for a .NET 4.0 prerequisite.
But I resolved the above error by:
1.Updating to .NET 4.5 platform
2.Running the Anypoint-Gateway.exe as compatible for windows 7(tweaking the properties of exe).
3.Also check if you have admin rights.

make a windows service from executable

I'm looking for a way to create a Windows service from an executable that is not a service itself. Do I need a wrapper service to response Windows service calls that calls non-service process?
Note: I'm familiar with SC.EXE and how to make a service. unfortunately when starting services made from non-service executable, I'm getting 1053 timout error.
Try to look on how to use srvany.exe, it should be a tool allowing to launch an app as a service.

How to start a windows service on local computer

I have created a windows service.
When I install msi, this service goes to local services, but doesn't start. When i try to start it, it gives this error:
Windows could not start this service on Local computer.
Error 1053: The service didnot respond to the start or control request in a timely fashion.
One more thing is, that when I install msi as a service, it goes to local services, but doesn't start and gives warning that you don't have privileges to start this service.
Once you have created the service, go to "Services", and find the service you just created.
Right click on the service name, and select Properties. Under Log On, make sure the service is using an account that has permissions to the machine and anything your service needs. The default account is a Local System account, which has access to the following .
Microsoft has a couple of fixes to this problem here and here. They might help you.

How to start windows service

I have created a windows service with Automatic Start Type and install it in my system successfully but it does not start until i restart my system.
Details: yesterday i have create and install my service and then restart my windows so the service started successfully. but the problem occurred today when i boot my windows and opened the services list of windows from Control Panel\Administrative Tools\Services and selected my service i saw that it did not start automatically.
what is my mistake?
Assuming the service is set to 'Automatic' as the startup mode, and that it's state is not 'Started', then there will be at least one message about why the service did not start in the System Event Log.
Typical reasons are that the service didn't start quickly enough (Service Controller imposes a time limit on how quickly services must respond to the 'Start' message) or that the service depended on another service which wasn't yet available (check your service dependencies) or that your service simply failed due to a software error (e.g. some resource it needs could not be found).
Find the error in the event log, and you'll have a much better idea of why your service hasn't started.
As your service was running fine yesterday but not today. Checking all its dependencies would be my first suggestion.
In your Start-> Run, type services.msc . It's a shortcut to open the services console.
Then Right click on your service , if it is listed there, click on Properties on this popup menu.
Open the Dependency tab (4th tab) , check if your service depends on some other service and that dependency is running.
Regards,
bhupendra
Example:
SC.exe config "ServiceName" start= auto

Resources