The Core Technologies Blog

Our Software // Windows Services // 24×7 Operation


Q&A: Why did Dropbox Stop Copying/Synchronizing my Files?

Q&A: Dropbox stopped copying my files
My client who has AlwaysUp for Dropbox running on his server informed me that his files stopped syncing.

I created a test file in their folder that is supposed to be syncing and sure enough, it was not working. I checked the service in AlwaysUp and it was running. I tried restarting it and still nothing. I stopped the service and opened Dropbox and it is now syncing.

Please inform me of what I need to do from here. Thanks.

— Kurt

Hi Kurt, sorry to hear of the trouble!

In response, our technical team took the latest version of Dropbox (Stable Build 105.4.651) for a test drive on our Windows Server 2019 machine. Sure enough, file synchronization stalled when running as a Windows Service in Session 0.

Our first instinct was to apply the time-tested advice from this troubleshooting article. We carefully ensured that:

  1. Dropbox.exe wasn’t updating itself (because frequent automatic updates can thwart 24/7 operation)

  2. The Dropbox sync folder was accessible

  3. Dropbox was not trying to get our attention (by showing a notification or confirmation prompt)

Yet after doing all that the problem remained!

So, we rolled up our technical sleeves, unplugged the phone, paused the email and dived into Dropbox. Here’s what we observed.

Dropbox synchronized files at first but stalled after a few minutes

Our testers employ a simple test plan to validate basic file synchronization functionality. It goes like this:

  1. Start Dropbox from AlwaysUp (in Session 0)

  2. Wait 1-2 minutes, to allow the program to initialize and get its bearings

  3. Copy a new file into the PC’s Dropbox folder

  4. Wait up to 1 minute, for Dropbox.exe to recognize the new file and copy it up to the cloud

  5. Check that the new file is listed on Dropbox.com

When we followed the process, step 5 failed. The new file did not appear on the website.

So, we tried again. This time, we noticed something interesting. Dropbox synchronized all pending files when it started, but it would not copy the new file we added. Apparently, synchronization worked at the outset but “broke” after a few minutes. Bizarre!

Upon closer examination — using Microsoft’s excellent Process Explorer — we observed the Dropbox application’s network connections behaving strangely. Let me explain.

A minute after Dropbox starts, the application opens several connections back to “home base”. Here you can see six sockets in the ESTABLISHED state linked to multiple cloud servers on the 162.125.*.* network:

Dropbox TCP/IP connections

A few minutes later, five of the connections have vanished and the final link is dead on its feet (in the terminal CLOSE_WAIT state):

Dropbox TCP/IP connections - Closed

At this point, Dropbox is unable to synchronize any files because it doesn’t have a functioning connection to the back-end servers.

Applying the “QT_OPENGL” fix restored synchronization

About a year ago, we experienced a puzzling situation where Dropbox would hang when started as a Windows Service. This post documents the problem and this post describes the fortuitous fix.

Back then, Dropbox wouldn’t process any files at all — very different from today’s situation, where the program starts strong but quickly goes AWOL.

Nevertheless, a very similar fix works!

Once we set the “QT_OPENGL” system environment variable to “software” (as described below), Dropbox seemed to maintain its server connections indefinitely.

To verify, we wrote a simple script that adds a new file to the Dropbox sync folder every 30 seconds. We let it run for six hours. During that time, Dropbox was able to upload each file to the cloud and every one showed up properly on the website.

Here is a screenshot of the test while in progress:

Dropbox copy test in progress

How to apply the “QT_OPENGL” fix

Please perform this step-by-step process to resume your client’s 24/7 service:

  1. Start a Windows command prompt as an Administrator (an elevated command prompt)

  2. Run this command:

    SETX /M QT_OPENGL software

    SETX /M QT_OPENGL software
  3. Close the command prompt.

  4. Stop and start your Dropbox entry in AlwaysUp.

You can confirm that the fix was applied by looking for the QT_OPENGL value in your system environment variables (available through the Control Panel):

QT_OPENGL System Environment Variable

Please be sure to get in touch if you notice any other misbehavior!

Posted in AlwaysUp | Tagged , , , , | Leave a comment

Essential Windows Services: LanmanServer / Server

Server Service

What is the LanmanServer (Server) service?

The LanmanServer service allows your computer to share files and printers with other devices on your network.

The service’s display name is Server and it runs inside the service host process, svchost.exe. By default, the service is set to start automatically when your computer boots:

LanmanServer Windows Service

What happens if I stop the LanmanServer service?

There will be a couple of potentially significant consequences if you stop the Server service.

1. File sharing will not work

Is your computer hosting a shared folder? If so, that folder will no longer be available to network computers once you stop LanmanServer.

Mapped drives pointing to your computer’s shared folders will be inaccessible and remote users will experience abrupt errors like this:

Mapped drive not accessible

In addition, all sharing controls will disappear from your computer’s File Explorer windows.

For example, the drive properties window has a Sharing tab while LanmanServer is running:

The Sharing tab is accessible

But once the service stops, the Sharing tab vanishes:

The Sharing tab has vanished

Of course, only remote users will be impacted. The underlying files and folders will still be available on the computer hosting the drive.

2. Remote printing will not work

Is your computer sharing its printer with other computers? If so, the service being down will affect folks printing from those other computers.

Specifically, Windows will tell them that the remote printer is “Offline”. All their print requests will enter the print queue, patiently waiting for the printer to come back online:

The printer is offline and jobs are queued

Note that local printing (from the computer with the printer attached) will still work. Only remote users/computers will be affected.

Is it safe to disable LanmanServer?

Yes, it should be safe to disable the service — provided that your computer is not sharing files or printers. As mentioned above, those services won’t operate without the Server service.

Note that Internet-based networking features (for example, accessing web sites from your browser) will still be available when the service is disabled. In theory, many non-networked or home computers will do just fine without LanmanServer always running.

And because LanmanServer doesn’t have any dependencies, disabling it shouldn’t prevent any other services from starting up:

LanmanServer has no dependencies

However, despite the above evidence to the contrary, Microsoft recommends keeping the Server service enabled. Unfortunately they don’t provide a reason or explanation!

Please proceed with caution if you decide to disable the LanmanServer service.

Questions? Problems?

If you would like to know more about the Server service, or you have a specific problem, please feel free to get in touch. We will do our best to help you!

Posted in Windows Services | Tagged , , , | Leave a comment

Q&A: I created a Windows Service with SC. Why won’t it Start?

Q&A: SC Windows Service won't start
  I installed my program as a Windows Service using the SC command. The result was “CreateService SUCCESS”, and my service is listed with all the others so I know it worked.

But whenever I try to start the service, the NET command fails with “The service is not responding to the control function”. What does that mean? Why can’t I start the service?

— Marc B.

Hi Marc.

You are running into a common problem with the SC utility. While SC will happily install any script, batch file or executable as a service, the service it creates may not be usable!

Let’s dig into the details.

SC is not picky; it will install anything as a service

As you have discovered, the “SC CREATE” command will create a new Windows Service. The command line must look like this:

SC CREATE <SERVICE-NAME> binpath= "<FULL-PATH-TO-PROGRAM>"

(Yes — the space after “binpath=” is required!)

Apparently all you need to specify is a friendly name and the full path to your program for SC to work it’s magic. Simple, right?

For example, to install the Windows Notepad application as a service called “NotepadService”, run this command from an administrative command prompt:

SC CREATE NotepadService binpath= "C:\Windows\Notepad.exe"

SC will confirm success:

SC creates a new service

And the new service will be listed in the Services application:

New service in services.msc

But there are limits to what SC will do. Even as it dutifully performs the basic operations — creating the necessary entries in the Windows Registry — SC will not validate the path/program in any way. This means that:

  1. SC will succeed even if the program does not exist. You can give it a bogus path and see:

    SC installs non-existent program

    However, the following error pops up when you try to start the “BadPath” service installed above:

    You can't start a service with a bad path
  2. SC will succeed even if the program cannot run. For example, here we have installed a ridiculous service where the path is an MP3 music file:

    SC creates an MP3 service

    Indeed, as an MP3 is not a valid application, it is no surprise that attempting to start the service results in failure:

    You can't start a MP3 file as a service
  3. So, as we have shown, SC is firmly focused on basic installation — not operation. The fact that a service was created with SC does not mean that the service can ever start or run.

    Only a “true” Windows Service Application can be started as a service

    Even though SC will install any program as a service, the reality is that only specially constructed executables can actually operate as a service. We call those Service Applications.

    Service applications implement the Windows Services API — a set of operations used to control and monitor services. Windows uses the API to interact with Service Applications.

    The API is quite extensive. With it, Windows can command any Service Application to:

    • start running
    • stop running
    • report status
    • pause
    • resume running
    • prepare for system shutdown

    Unfortunately regular desktop applications (like Microsoft Word, Google Chrome and Adobe Acrobat Reader) do not support the Windows Services API. They are not Service Applications. There is simply no way for Windows to directly control or interrogate any of those desktop programs as a service.

    Non-Service Applications will fail to start, citing error 1053

    To illustrate, let’s take Dropbox — a leading cloud storage provider. The company produces Dropbox.exe, a desktop application that synchronizes files between your PC and the cloud. Dropbox.exe is not a service application.

    As you can see, SC has no problem installing Dropbox as a service:

    SC creates Dropbox service

    But when you try to start the Dropbox Service from the Services application, a curious scenario plays out:

    1. Windows starts Dropbox.exe.

      Here you can see Dropbox (and its two helper processes) running in Process Explorer:

      Dropbox.exe has been started
    2. Next, the Service Control window will report that “Windows is attempting to start” the service:

      Windows is attempting to start the Dropbox service
    3. And after about 30 seconds, the Dropbox.exe processes vanish from the system and Error 1053 is raised:

      Dropbox service failed to start with Error 1053

    Even though Windows kicked off Dropbox.exe as intended, the process was terminated in less than 40 seconds. A clear failure.

    And the story is the same with other regular, non-service applications as well. They all misfire in the same way.

    Why did the Dropbox service fail to start?

    The problem occurs in step 2.

    After launching Dropbox.exe (step 1), Windows waits for the new process to report its status and confirm that the service has started properly. However, since Dropbox does not support the Windows Services API, it fails to respond to that service-specific status check.

    And after a few seconds of lingering, Windows eventually gives up. It terminates the Dropbox.exe process (and all its sub-processes) and reports that “the application did not respond to the start or control request in a timely fashion” (i.e. error 1053).

    Use a “Service Wrapper” to install a regular program as a Windows Service

    As demonstrated above, you cannot simply install a regular application with SC and expect the service to work. You need help from a special “go-between”.

    A service wrapper is a Service Application that starts and stops another application in response to important events. When a service wrapper receives a Windows Services API request, it acknowledges the request and performs the appropriate action on the application it is managing.

    For example, let’s say that we have a service wrapper configured to manage Notepad. When the service wrapper receives a “start the service” request, it would start a new instance of Notepad.exe and let Windows know that the service was started successfully.

    And when the service wrapper receives a “stop the service” demand, it would terminate the Notepad process it started before exiting itself.

    Perhaps the best known service wrapper is Microsoft’s Srvany. Srvany is free and functional, but has some significant shortcomings.

    Alternatively, our AlwaysUp utility is a professional service wrapper. It’s not free, but is robust and mature, and makes running your application in the background as a Windows Service super easy.

Posted in Windows Services | Tagged , , , , | Leave a comment

Q&A: Why is the Stop Button Disabled for my Windows Service?

Why is the Stop Button Disabled for my Windows Service?
I want to stop a running service but can’t because the Stop button is grayed out. I am logged into an Administrator account and all other user accounts are logged off. Any ideas why I may be unable to stop the service?

Thank you, all, for your help.

— Matteo

Hi Matteo. Here are 4 potential reasons why the stop button is disabled:

1. The service is temporarily busy

Every now and then, Windows interrogates your service to ask an important question: What operations can users perform?

The service must respond to that status check with the list of operations it is willing to accept at that time. For example, if the service is running, the response might indicate that it is OK for someone to:

  • Stop the service
  • Pause the service
  • Send a trigger event

Notice that the list would not include “Start the service” because the service is already running.

The Services application uses the response to enable and disable buttons on the service’s properties window. A button will be disabled if its corresponding operation cannot be performed.

So, for whatever reason, your service may not be accepting the “Stop the service” operation at the current time. But that could be temporary. Try closing and reopening the Services application and see if the stop button is eventually enabled. Maybe fortune will smile on you. 🙂

2. The service is “unstoppable”

Some services simply refuse to accept the stop command at any time. They resolutely respond to the “What operations can users perform?” status check with “I cannot stop”.

You can detect one of those unstoppable services using the powerful SC command. Run this command (from an administrative command prompt) and look for NOT_STOPPABLE in the STATE:

sc query <Service-Name>

For example, the critical DCOM Server Process Launcher (DcomLaunch) is unstoppable:

The DcomLaunch service is unstoppable

And as a result, all its buttons are disabled:

DcomLaunch service buttons grayed out

Is your service unstoppable? Perhaps it is a critical service that needs to run all the time. The only reliable way to stop one of those services is to shut down the computer.

3. The service is hung/stuck

By definition, an unresponsive Windows Service does not answer the periodic status check. The consequence is that no operations can be performed on the service. All its buttons will be disabled in the Services application, as we see here with a service developed by one of our customers:

Windows Service buttons disabled

Put on your detective hat and check the Event Viewer for errors and warnings from your service. Maybe something is going wrong that you (or the author of the software) should address.

4. You don’t have permission to stop the service

The Stop button may be grayed out because you simply don’t have the right to press it.

Are you an administrator on your PC? If so, you might be able to grant yourself the ability to stop the service using our free Service Security Editor utility. Please review this article to showing how to adjust the rights of your Windows Service.

For example, here we see that user “Mike Jones” is explicitly prevented from stopping a service on our Windows Server 2019 machine:

Stop service denied

We removed the check mark from the Deny column and added it to the Allow column (and clicked the Apply button) to enable Mike to stop the service:

Allow stop service

How to forcibly stop your service

Each Windows Service is backed by a process listed in Task Manager. Terminating that process will stop the service. Here is how to do that, referencing the Print Spooler service as an example:

  1. Find the name of your service. It will be displayed at the top of the service’s properties window.

    For example, the name of the Print Spooler service is Spooler:

    Print Spooler service name

  2. Start an administrative command prompt.

  3. Run this command, replacing <SERVICE-NAME> with the name of the service you found in step 1:

    sc queryex "<SERVICE-NAME>"

    Note the PID value in the command’s output (2444 in this example):

    Query the status of the Spooler service
  4. Replacing <PID> with the PID you collected, run this command to forcibly terminate the service’s process:

    taskkill /F /T /PID <PID>

    Use Taskkill to terminate the Spooler process

If all goes well, your service should stop.

Best of luck!

Posted in Windows Services | Tagged , , , , | Leave a comment

4 Amazing Benefits of Monitoring & Auto-Restarting your Mission-Critical Applications

4 Amazing Benefits of Auto-Restarting your Mission-Critical Software

Does your company rely on one or more important Windows applications?

Will your business (and reputation) suffer if those programs stop running or become unavailable?

If so, downtime is your enemy. Look to our AlwaysUp and Service Protector utilities to help you ensure that your applications start at boot and continue to run 24/7 — even in the face of failure.

And getting closer to 100% uptime can have a huge impact on your business. Here are four of the most important benefits of monitoring and automatically restarting your vital Windows software:

1. Fewer support calls

Less support calls

Frustrated customers make phone calls and send angry emails when software stops working. Someone in your company has to take those calls and respond to those emails — often at considerable time and expense.

Automatically curing failures eliminates those infuriating “your software is down again!” complaints. Your support staff will thank you. And even better, they will have more time to focus on the higher-value interactions that move your company forward, not backward.

2. Less off-hours interruptions

Less off-hours interruptions

Picture this: You’re at a pricey restaurant enjoying a rare evening out with friends when your phone rings. It’s your boss. An important customer is down and you need to restore service now.

You rush to your car to get your laptop and spend the next 30 minutes frantically connecting to a secure Wi-Fi network, logging into the VPN and ultimately restarting the offending application. By the time you get back to the table, your dinner is cold and your friends are ready to move on. That sucks!

But none of that needed to happen.

In an alternate universe — one where a “set-it-and-forget-it” application monitoring package has your back — the failure was detected, your application was automatically recycled and your customer was never inconvenienced. You received a friendly email letting you know what happened, just as you started your main course. You didn’t miss a beat.

3. Happier customers

Happier customers

Customers despise buggy software. It can be very stressful when they are trying to complete urgent tasks but the supporting software is down!

Making sure that your software is always available reduces stress. And less stress leads to happier, satisfied customers who remain loyal for years to come.

4. More time to focus on your business

More time to focus on your business

With fewer support calls and less toxic interruptions, you will have a few extra hours each month to focus on important issues. How will you use that valuable time?

Of course, you can move on to fighting the next customer “fire”. There are always lots of those.

But even better, why not focus on advancing and growing your business — for all customers?

P.S. Check out these 30 customer service tips from the folks at Nextiva.

Posted in Uptime | Tagged , , , | Leave a comment