Why does self made(.NET) Worker Service as Windows Service give "Error 1067: The process terminated unexpectedly" while starting the serivce? - windows-services

I created a worker service in .NET and I planned to deploy that service to windows machine so I created it as windows service.
When I started deploying the service (using sc.exe), everything went smoothly until I tried to start up the service and I got error: "Error 1067: The process terminated unexpectedly".
It did start up in my dev machine so the problem must be related with the target machine.
Answers from "googling" didn't help me much and were kind of disperse.
What might cause this error?

For me the solution was simple. My target machine was missing the directory that my service was trying to use. I added the proper directory and folder into my dev machine and the error was gone.

Related

Docker Engine Fails to start on Windows Server 2019

Our application is docker based and requires Nat network to be created on the host machine in order to communicate since its a web service. It was working since last 4 months and suddenly stopped working. Checked and found that docker service is stopped. Manually tried restarting the service but it failed to start. Below is the error in the event log:
Error:
fatal: failed to start deamon: Error initializing network controller: Error creating default network: failed during hnsCallRawResponse: hnsCall failed in Win32: There are no more endpoints available from endpoint mapper. (0x6d9)
Tried the below steps:
Deleted the hns.data and restarted the hns service. Then restarted the docker engine service. The issue persists.
Tried running MOFCOMP. Same issue.
Tried removing docker and reinstalling it. Doesn't work.
Tried creating nat network manually. But getting the above mentioned error.
Can someone help here? what needs to be checked or what could be the reason for this issue?

thingsboard: system error 1067

Please help after installing Thingsboard successfully on windows I'm getting this error while try start the services.
The ThingsBoard Server Application service is starting.
The ThingsBoard Server Application service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
In some cases, you must set the full path to the java file.to do that:
1- open the thingsboard.xml file in the base directory.
2- search for this line <executable>java</executable>
3- change the above line with <executable>C:\Program Files\Java\jdk1.8.0_121\bin\java</executable>
4- net start thingsboard
output
The ThingsBoard Server Application service is starting.
The ThingsBoard Server Application service was started successfully.
This is a known bug (see here).
If AYR1112013's solution will not work, you can temporarly fix the issue by removing the flag "-XX:+UseCondCardMark" in your thingsboard.xml.
After that start the service as usual with "net start thingsboard".

deploy to azure webApp virtual directory

I created an ASP.Net project (.net 4.7.1), it's basically the default temple project without any change at all!
I created a build to publish it to an Azure WebApp- result : works just fine.
then I cloned the build and this time I target a virtual directory (I built the virtual directory from the portal and ticked it as an application)
surprisingly, although it has published successfully ( I doubled check from console), but when I browse it , it doesn't work and I get te below error:
HTTP Error 502.5 - Process Failure Common causes of this issue: The
application process failed to start The application process started
but then stopped The application process started but failed to listen
on the configured port Troubleshooting steps: Check the system event
log for error messages Enable logging the application process' stdout
messages Attach a debugger to the application process and inspect
it doesn't make sense to me, so I tried with different project type and .net version but the result is the same!
I found a workaround if I deploy pure HTML file (without asp.net) in the root, then the virtual directories will start working.
it looks like it's related to the fact that web.config of the virtual directory inserts something from the config of the root.

Troubleshoot windows error: Failed to schedule Software Protection service for re-start at 2014-09-13T08:09:23Z. Error Code: 0x80040154

My setup:
Opertaing System: Windows 8.1
Memory: 16GB
HD: 500GB
etc. non relevant.
Issue:
I noticed the issue when my printer stopped working after a normal restart. At that point I tried to uninstall and reinstall the printer driver. The install failed.
At that point I also realized all my remote desktop connections were also failing, with not being able to find the remote host.
Here is the error I was seeing when install for the printer was failing:
can't start printer spooler service not enough resources are available to start the service
Manually trying to start the spooler service and checking in the event Viewer of windows showed that it was failing on:
Failed to schedule Software Protection service for re-start at 2014-09-13T08:09:30Z. Error Code: 0x80040154.
Further trying to restart the protection service revealed that it was failing on:
Task Scheduler service has encountered RPC initialization error in "RpcServerUseProtseq:ncacn_ip_tcp". Additional Data: Error Value: 1721.
In either case my computer had become somewhat useless as I couldn't install anything and my printer and remote desktop was broken too.
Reporting the problem just in case if someone has a similar issues.
The resolution for my problem is actually posted here, but way back so bringing it to more light:
http://social.technet.microsoft.com/Forums/windows/en-US/0c438376-1486-4ae4-9847-2de7a8767f27/task-scheduler-service-has-encountered-rpc-initialization-error-in?forum=itprovistasp
For me what worked was just to starting the prompt in adminstrator mode, running:
netsh winsock reset
and restarting my machine.
Not exactly certain of what actually fixed the issue.

MSDeploy WMSVC is not working in .net environment

I have a build/test server which is currently running Jenkins for my continuous integration and it also is acting as my test server where code will be deployed to once built (i hope to rectify this and seperate these at a later date when budget allows)
I have a .NET web solution (nothing complex just Umbraco essentially) that i have in SVN and Jenkins is now building correctly. I now want to deploy it onto the same server using MSDeploy. After the build completes the package is generated but the deploy fails with the error
ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started
Here is my msbuild parameters that Jenkins uses
/P:Configuration=Release
/P:DeployOnBuild=True
/P:MSDeployPublishMethod=WMSVC
/P:DeployTarget=MSDeployPublish
/P:PublishProfile=GetSomePixels
/P:MsDeployServiceUrl=https://build.########
/P:AllowUntrustedCertificate=True
/P:CreatePackageOnPublish=True
/P:UserName=#######
/P:Password=########
I've checked the server and the Web Management Service is running and is starting up manually
I've also gone into IIS 8 manager (server 2012) and checked the "Allow Remote Connections" box under "Management Service". Restarted IIS and the WMSVC and still not working.
If i go to https://myserver.co.uk:8172/MsDeploy.axd in a browser it resolves (gives you the warning about an untrusted cert) and then displays a blank page.
Anyone got any ideas as to what i can do? I thought that it may be firewall related and even though it had added an exception to windows firewall for 8172 i have turned the entire firewall off to completely rulle that out and still no luck.
Have run this on the server to check its listening on the correct port
C:\Users\Administrator>netstat -a | findstr 8172
TCP 0.0.0.0:8172 GSP-BUILD:0 LISTENING
TCP [::]:8172 GSP-BUILD:0 LISTENING
Ok i've resolved this. It appears you have to activate the web management service first and then install web deploy and i'd done it the other way round. I uninstalled WebDeploy and re-installed it, restarted the server and its working
Agree with comment.
We had a similar issue. Initial installation even post Web Management Service activation appeared to be incomplete. In our case, even though the service said it was started we couldn't achieve the "green tick" when testing the connection from the Publish dialog when defining a profile.
Reinstalling WebDeploy 3.6 made it function properly.

Resources