Windows Server 2008 R2 error 1053 apache - apache

I have a simple PHP application running on this server which allows other people to verify some information on-line. The apache was running OK until a few days back.
The application uses Postgrees and the apache service was configured by an add-on "Enterprise Db Apache", it was not configured by me and is connected to a portal to be shown on-line. This was kinda dropped on me and I had no prior knowledge or experience with databases nor servers and need to put it back on-line. How can I start to find out what made it stop?
Here's a link to the error I'm receiving when trying to start it back again:
https://dl.dropboxusercontent.com/u/12837412/Erro%201053.png
Tried updating .NET to no success,
I've searched around SO and all the threads I found were based on custom services people wrote, and found out that this error code is very generic, I'm very lost and have my neck on the chopping block.
EDIT: Tried some fixes suggested here but had no success. I'm thinking about reinstalling the service, is it a really bad idea? Is there a safe way of doing this without loss of data in the Database? Is there a tutorial on this here already?

The problem was with compatibility of the versions of C/C++ libraries in the server which lead to the programs related to the service not being able to start properly. A simple reinstalation of the compatible version of the libraries made the service able to be started again.

Maybe your service is taking longer time than 30 seconds (Windows default timeout) to start and report ready to the Service Control Manager. Usually this happens because of performance issues.
A possible solution for this is to extend it through the Registry.
Go to Start > Run > and type regedit
Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
With the control folder selected, right click in the pane on the right and select new DWORD Value
Name the new DWORD: ServicesPipeTimeout
Right-click ServicesPipeTimeout, and then click Modify
Click Decimal, type '180000', and then click OK
Restart the computer

Related

Visual Studio with React project keeps starting multiple copies of the development server

I'm using Visual Studio 2022 with the React template on .NET (core) 6.
When I press f5 to start debugging, it starts a command prompt to start the development proxy server, fires up my deafult browser (chrome), and everything seems to work OK.
However, about every 2 minutes after, regardless of whether I have touched VS or the app, it then starts another copy of the development server, which then gets stuck with a prompt saying Something is already running on port 3000. Left to its own devices it just keeps starting more.
This doesn't stop the previous one working but it's frustrating to have all these windows appearing, especially as they steal focus when prompting with the "port in use".
Something that I suspect is related is a message appearing in the debug output around every 8 seconds saying "Microsoft.AspNetCore.SpaProxy.SpaProxyMiddleware: Information: SPA proxy is not ready. Returning temporary landing page." However as noted above the SPA proxy certainly seems to be running OK.
Has anyone got any ideas what might be happening or any workaround for this?
OK I managed to figure this out by creating another blank project and comparing them.
The port that the development server will listen on is stored in a file called ClientApp\.env.development; the port that visual studio expects it to listen on is in the .csproj file under PropertyGroup/SpaProxyServerUrl. If there is a mismatch you will get this behaviour because VS thinks the server isn't running and keeps on trying to start it.
In my case I had added the .env.development file to the version control ignore list thinking it wasn't important. This was causing the dev server to listen on the default port 3000.

Print PDF from Navision Application Server

I have problem printing reports to PDF through bullzip from Navision Application Server (1) if user is not in Local Admin group (2). Only under both conditions.
In Nav code I'm doing the following: init bullzip automation object (set all parameters to suppress GUI), run report to print document to virtual bullzip printer, catch output file. Thats it. Straight as a rail.
I have two environments: Windows Server 2008 and Windows 7 (different versions of Nav, but this is changing nothing). On Windows 7 it just do nothing (but works if user is admin). On server I can see error in Event Log (translated to English)
Faulting application gui.exe, version 9.8.0.1599, time stamp 0x517126dc, faulting module USER32.dll, version 6.0.6002.18541, time stamp 0x4ec3e39f, exception code 0xc0000142, fault offset 0x0006f52f, the process ID 0x3bc, application start time 0x01ce562238369fa9.
Gui.exe is a part of bullzip.
If I run the same code from Nav Classic Client, or from the same NAS launched in command line, or under local administrator account, or if i put the NAS user in local admin group - it works just fine.
To solve this problem i need to find out one of two and how to fix it:
What is the difference between local admin and regular user that could cause application to crash in non-interactive mode (service) under regular user account.
What is the difference in running NAS as service and as command line that could cause application to crash when run as service.
What I've tried so far: extend non-interactive desktop heap, give user all local privileges that admin have in gpedit. Not works. Don't know direction for further digging.
Any alternative free pdf printers advices are welcome.
This question is still actual. Though I've managed to setup PDF printing with PDFCreator. The tough part was to let several different NAS to print simultaneously. And now the setup have a bottleneck - PDFCreator's printing queue. With bullzip automations it could be avoided.
We've had some cases where third party DLL's have crashed within NAV due to permission restrictions.
The only effective way we could narrow down the files that it was trying to access was through using Process Monitor to try narrow down what was causing permission issues.
We found a folder within System32 to do with the System's Network Profile that some DLLs use. On that note, NAS's and such should be run under a domain account.
I think re-installing the application will do that,
Just make sure you are uninstalling each bullzip and ghost script,
Now Ghost script is tricky thing, if you are installing 32 bit over 64 then you are having problem,
refer this download link download appropriate version, install it,
and then install bullzip, after downloading new version from here
this will do..
then also if any problem(if you are using application for automation, you require new com object..) refer Forum, that explains most of application interface problems..
where you need to use public class PdfSettings with namespace bioPdf.
I hope this will help ..

ASP.MVC 4, Azure Caching: Error on both local and remote - "role discovery data is unavailable"

Whew...ok, been wrestling with this for a while and I can't figure out what is going on.
I am new to Azure caching, but at this point I have read a good bit and I think I have it setup right, but something is obviously wrong so what do I know?
Ok, so first I setup a dedicated caching web worker role using this fine tutorial: http://berniecook.wordpress.com/2013/01/27/distributed-caching-in-azure-cache-worker-role/
I have an ASP.net MVC 4 website that is supposed to be using it.
I have my solution set to multiple starting projects with my cloud caching project set to start first, but no matter what I do, I get the "role discovery data is unavailable".
Sometimes in my output log I get that the Role Environment failed to initialize, but not very often. Most of the time the output log says that is succeeds. Regardless of that, I still get the error above.
I was thinking that maybe the issue was because I was running on local azure storage and compute emulators, so I reconfigured and published the Cloud Service to Azure to see if that helped.
It didn't...
The fun part is that there have been exactly 2 times when it suddenly worked (both when I was working locally). 2 times about of about 100. I didn't do anything different...just ran the debugger and poof, it all worked. This at least lends a bit of credit that it is actually setup correctly.
Needless to say, this is putting a huge damper on my productivity so any advice would be appreciated.
Update
Ok, I have figured out a workaround of sorts...I have learned that the reason that it consistently failed was because the development web server was holding onto a file which prevented the caching server to launch correctly.
The workaround is to stop the web server each and every time I want to recompile and run the code. This is obviously not ideal, so any ways to make this more reliable would be appreciated.
Thanks,
David
I don't know if this helps but I find that if I don't shut down the both the storage and compute emulator, I get weird errors, so after doing an F5 and closing the browser down, I manually shut down both emulators

Windows Server 2008 Stuck At Preparing to configure Windows

I have a Windows Server 2008 Datacenter Edition VM on linux-xen. It has been working fine until a few days ago apparently it attempted to install an update. I have tried everything I can think of to get passed the 'Preparing to configure Windows' splash screen.
I have tried:
Booting into all three options of safe mode, all three performing the same splash screen step and endless reboot cycles.
Booting into last known good configuration, again boots to splash screen
F8, boot into repair, open cmd and use dism.exe /image:d:\ /remove-package PackageName:, which results in an error that I have found no information google about.
I have tried deleting windows\winsxs\pending.xml, it is currently deleted but still tries to configure updates.
Use dism.exe with the /revertpendingactions switch, which still brings me back to splash.
dism /image:D:\ /cleanup-image /revertpendingactions
Tried to repair via the installation disc, which does not have an OS repair option, just the same 3 options for Memory Diagnostics, Command Prompt and System Recovery
I did not realize that Windows Server 2008 DC Edition did not default to system restore points being enabled. Apparently I have no restore points available to revert to.
I am going out of my mind trying to find some successful way to get passed this splash screen for configuring windows updates. If the pending.xml file is missing then I do not understand how it could still be trying to configure updates.
I am at a loss, any additional troubleshooting steps or advice would be appreciated. In terms of advice, I now realize I need to double check that restore points are enabled and take regular windows system recovery disk image backups so that I have better restoration capabilities in the future.
Being that this is on a linux-xen guest, I could duplicate it and try other means, but I am not sure what else there is to do.
Can I reinstall windows 2008 server back on top of it again and achieve some sort of success without breaking all of the licensing, rdp users, profiles, data ETC? This server is not a member of a AD environment. It is simply a standalone server that allows 10-12 users to RDP to access a few applications.
However, regardless how I move forward the data on the server is needed even if I were to opt for creating a new VM with a fresh install for them to use.
Is it possible to inform Windows to skip the update installation / configuration procedure during boot by adding a particular switch to the Boot options? Currently it has:
/NOEXECUTE=OPTOUT
I am curious if it has some alternate runlevel like linux does that would potentially allow me to bypass this wretched situation.
Mine was stuck until I hit CTRL + ALT + DEL. It seems like it was a service pack that did it. I waited a few hours for it to finish when in fact all I had to do was hit CTRL + ALT + DEL.

windows service works on XP but fails with error 1053 on w2k3 64 bit

Forgive me if this is a stupid question, I'm fairly new to writing services. I've written a service that runs a timer and the timer code runs some checks to ensure our systems are up and running. It's written in VB.Net, framework 1.1. I then install the service using "sc create". The service works beautifully on the XP Pro machine that I'm developing on. However, when I install the service on a Windows 2003 server 64 bit, the service fails with error 1053 immediately. I put some debugging in to write to a text file as the first line of code in the OnStart function but even that doesn't run, so there must be a problem in the program starting up. Finally in desperation I created a brand new Windows Service in a new VB project in Visual Studio 2003 and compiled an empty service that merely declares and sets the value of a string variable in the OnStart function as follows:
Dim strTmp As String
strTmp = "hello"
Even that failed on the W2K3 server, but works fine on the XP dev machine.
The server has .Net Framework 1.1 installed and working, we use it in our CMS (written in ASP.Net 1.1).
The service runs as the local system account. I tried enabling interaction with the desktop but that didn't help. I ran Process Monitor and there are no access denied events. I emptied the Application Event Log, still doesn't work. No other events to help me out in the logs. Definitely using the Release build of the application. Permissions on the exe file are full control for System and for Admins.
Any ideas anyone? It must be something simple, but I'm damned if I can figure it out!
Thanks in advance.
#DavidHi, many thanks for the suggestions. I donĀ“t think the first point is my problem, partly because the MS article is about stopping or pausing the service, mine fails on starting; but also because the service does not timeout, there is no 30 second wait, it fails immediately. Secondly, when you say add an exception handler to the service startup, do you mean the OnStart sub? I tried adding a debug file write in there, but I'll try adding an event log instead. Regarding the systems checks, it can't be that because the brand new empty test service I created shows the same behaviour and that does not do anything at all. You last point could be the key. My dev environment IS 32bit. I'll do some research on the corflags thing, or perhaps I can build a 64bit dev environment. Many thanks again, you've given me some new things to think about at least!
Ok, have found a workaround. I was putting my exe file in System32. When I put it in a different folder, created by myself, the service ran, albeit briefly. I then had to move the ini file and the log files that it reads/writes to that folder too, rather than System32, and all seems to work nicely. God knows why it doesn't like running from System32 but at least it works now! Thanks for the help guys.
This looks very similar to this question which might help you out:
Starting a windows service fails with error 1053
A couple of other things to look out for:
Make sure you don't have either of the following statements in your deployed service:
System.Diagnostics.Debugger.Launch
System.Diagnostics.Debugger.Break
You may need to run the service with an account other than Local System (depending upon the permissions required by your service).
The 1053 error is a timeout related to the service control manager waiting for the service to respond to your start request. There is a knowledgebase article that refers to managed service stop request issues specifically relating to Framework 1.1-based services, so it is not precisely describing your problem, but it may have relevance in your situation. The link is provided for your reference.
http://support.microsoft.com/kb/839174
The other suggestion I would make to further diagnose the issue is to determine whether the Start is failing due to a "hidden" exception occurring in your service's startup code; the start call would not see the exception and could make you think it was merely timing out.
I would suggest you add an exception handler to your service startup that does nothing more than log a message to the event log with the particulars of the exception if one is caught. That would at least give you an idea that something is going wrong specifically within the service, and give you more information than you have right now.
One last thought: Does the service check the systems you describe over a network connection? If so, LocalSystem won't have sufficient privileges to perform network access.
Good luck!
EDIT One other possibility:
Is your development environment/execuable 32-bit? You mention your server is 64-bit, so you may need to use the "corflags" tool that forces 32bit operation on your executable
corflags /32bit+ YourServiceExectubable.exe
The source for this information was the following SO post:
32-bit Windows services in 64-bit environment
**Unfortunately, it appears corflags is applicable only for 2.0 assemblies, and was designed for specifically this type of problem. **