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

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.

Related

How do I make sure ports 8200..8299 for UIAutmator2 are free'd up after killing Appium?

I'm running Appium 24/7 on a Windows machine to perform automated tests. I'm running these tests via AVD on an emulator with Android 10. For my test, I give the correct Capabilities and runs functionally great. But after a few hours/days I get the follow error:
UnknownError: An unknown server-side error occurred while processing the command. Original error:*Cannot find any free port in range 8200..8299}. Please set the available port number by providing the systemPort capability or double check the processes that are locking ports within this range and terminate these which are not needed anymore at getResponseForW3CError at asyncHandler.
When my code is executed, I make sure the finally in try executes the AppiumDriverLocalService.stop(); method to kill Appium. My feeling says this does somehow not free up any ports for UIAutomator2 (which you can configure, but I have not configured, through systemPort capability.
} finally {
driver.closeApp();
service.stopServer();
System.exit(0);
}
Why does Appium not free up any ports for UIAutomator2 in the range 8000-8299 after stopping the service?
Android Debug Bridge version 1.0.40
Appium version 1.20.2
Android 10
PS I know of the adb command adb -s $UDID forward --remove-all but does this solve the real issue, I don't want to execute a Java Process each time
Update - Fix 2-3
I have fixed the issue by changing the finally clause to execute the following methods in order:
} finally {
AndroidDriver.quit();
AppiumDriverLocalService.stopServer();
In order to free up the port 8200..8299, AndroidDriver must be quit as UIAutomator2 is linked to this. The AppiumDriverLocalService will kill/forward/free this port and UIAutomator2, after this I can freely stop the server:
[ADB] Removing forwarded port socket connection: 8203
This issue is a good example of your problem. As you can see, Appium team is closing it as a Not A Bug.
Reason is obvious: Appium is not responsible for managing ports, it relies that your system has some free in required (by Appium code) range.
systemPort is used to connect to appium-uiautomator2-server, by default is 8200. Basically Appium selects one port from 8200 to 8299 for appium-uiautomator2-server. However, when you run tests in parallel, you must adjust the port to avoid conflicts. If you are not, you should be safe in 99% cases with the default.
Restart the system (assuming it will clear ports) and run tests. Check Appium server logs for any errors on closing session. It could be that issue is related to ADB setup or permission issue, and UI2 server is not stopped properly.
If so, port remains in use. And it is not Appium to deal with cleanup. I'm not sure that adb command you mentioned is a good 100% guaranteed way to do it.
I would just add a shell script that is executed before Appium server start to clean ports in 8200-8299 range and forget this problem.
killall -9 node - to kill all appium running internally and at root level
and adb kill-server - to kill the abd server by running this it resolved the above issue for me , hope may help someone

Tap Win32 Adapter install failed

The OpenVpn application needs an additional adapter to can work well. The Tap-Win32 virtual ethernet adapter will be installed during the application installation or can be added later.
Something went wrong, because I have tried everything, also running as administrator, troubleshooting, enable/disable, reinstall, but always will be going this to a failed status.
But without this adapter the connection will be failed too.
What can to do then?
It seems that the problem is solved by downloading the newest standalone Tap driver from OpenVpn repository.

Windows Service does not start automatically on Windows 7

I made a Windows Service application, set its properties to start automatically, using system account.
Windows 10 behavior: Starts as expected. On every system restart.
Windows 7 behavior: Does not start. No error / warning message in any log. Can be started by administrative user. Starts immediately.
I would understand an error occurs when the system is trying to start the service, but then again where's the log entry? Why the service can be started manually? Then, what's the weirdest part here: why does it work on Windows 10?
BTW, my service's OnStart is empty except base.OnStart(args).
The only log entry I get is System log:
A timeout was reached (30000 milliseconds) while waiting for the MY_SERVICE to connect.
Important fact: The service starts when set to "Delayed Start". But this is not acceptable for me. The service is to be started ASAP, "Delayed Start" occurs way too late for my needs.
How to make my service compatible with Windows 7, what may be the possible cause of service not starting automatically on Windows 7, but staring correctly on Windows 10?
My service uses .NET Framework 4.6.1 and it is installed on my test Windows 7 VM.

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".

Windows10 internet connection problems after restarting. No hardware devices connections found

Yesterday was 13th, probably well known virus caused crash of internet connection and Windows 10 functions. I could not use keyboard and mouse either to restart or to repair Windows10 with advanced options. With installation USB program started but with bugs and no internet connections was available since no hardware devices found.
The freeware tool cFosICS manages Windows Internet Connection Sharing. It comes with additional commands to fix the Windows 10 bug which may stop Internet Connection Sharing from working after a reboot.
See details here: https://www.cfos.de/en/cfosspeed/cfosics.htm
Try Installation from a DVD .This is Most preferable.Or you can use latest version of RUFUS to boot your Flash Drive.Install the latest version of Windows 10 Pro.
Goto Here For Download
Make sure you have internet connectivity to Sign in to Windows Account.
Set the Update off if you have all problems are solved.
Hope it will help !!
I checked status on cmd with configip/all and got answer IP routing is disabled. So I went to device manager I looked in help how to connect to internet. In Microsoft Management Console/Contents/Get Connected/ there is Connecting to the Internet procedure.
I used Get-NetAdapter. t-NetAdapter: Cannot connect to CIM server error. The service can not be started, either because it is disabled or because another software installation is in progress. Same with Test-Configuration command. The error means: „Cannot connect the computer to the server because of restart pending.
The simple is to use Microsoft Virtual Agent which will with your problem question and it will guide it through steps needed to solve problem. It also recommednds cmd commands as referred above. In my case I had to update Windows10 with formed USB key.

Resources