On Debian systems, sometimes I find that cron can give some problems. Not regarding the scheduling in itself; more of the process.

Lately I found this error in /var/log/messages:

repeated countless times, usually 1 message per second. This means that there is already a pid file locking the execution of the process, but since another cron is trying to start, probably there’s a problem: maybe previous process crashed so that it couldn’t delete its pid, or previous process is not responding (even if it is still running), or previous process is running correctly but something is trying to start another instance.

Following there’s a solutions I found for each case. The cause is usually too system dependant to be useful to discuss.

List of Solutions

CRON crashed

One possible scenario is that cron crashed (probably because of a script you wrote that made it crash or because of a syntax error in cron files). You can check and resolve this case by executing these commands:

this will tell you if there’s a process running with the above pid (the otherpid of the error). If there isn’t any process running, the above command should return nothing. In this case, you can delete the pid file and check if process can start without errors:

CRON is stuck

This is probably the simplest – and at least in my case – most frequent error. I have a lot of cron jobs doing lots of automatic operations. In a couple of system, sometimes I see the error above; one of my jobs is stuck, blocking cron – something like it can’t go on with operations. Automatically the system tries to restart cron, but it can’t, so I see the error above. Errors like these can be extremely tricky to debug – they happens 3 or 4 times a YEAR, so maybe is not worth the time to find the real cause.

Anyway – the solution is extremely simple in this case: kill the offending process.

Then what is trying to start the process again should immediatly restart it correctly.

To check if it worked run below commands:

If you see again the error in the title, this wasn’t the problem. You can try to restart the process (/etc/init.d/cron restart) but in my experience it didn’t solve the problem.

For the last case, I don’t know at the moment if there is a more common case. It seems to me that a mechanism that tries to restart cron once a second while the official one is running must be a custom one or a linux internal one – possibly with some sort of strange bug. But I don’t know for sure.

More In Depth

Above I said that the second but is not worth solving. Well, I hate leaving processes with known bugs, but I had to give up to similar bugs. If they are very rare, appears at random times, and causes relatively few damage, the cost in time to track down and solve those bugs may be too high to be worth the solution.

To be honest, sometimes in my (limited) experience, I spent at least a month (in total) hunting for a problem like the above, never to find a real solution and experiencing only a minor annoyance. In the end, the server reached its end of life and was migrated. I never really understood what was happening, but in fact the problem disappeared in the new server. So, in fact, the month I spent on this bug was just a big waste of time; and it is something I don’t want to do again.

Well, another of those absurd, incredible, unbelievable bugs. The ones that break your day and make you lose time, energy and ruins your mood, all for some sloppy programmer – or for an all-too-complicated environment.

Brief explanation of the situation:

  • I have a host with ESXi 5.1 with several virtual machines
  • There’s a PfSense firewall in a virtual machine in front of everything, connected to the only switch with internet access.
  • Within vSphere I created various vSwitch not connected to any physical network interface, to manage various network zones.
  • I attached a virtual network interface to the firewall for each vSwitch, so to manage with the firewall various zones and allow them to selectively connect to each other and to internet.

One beautiful day I had to create a new network area. This is not a tutorial to add a new vSwitch, so I’ll assume you know how to do it.

After creating it, I added the new interface to the virtual machine, then I added it to the firewall itself. For the moment this isn’t a mission critical server, so I decided to restart the firewall.

Then, BOOOOOOOM!!!! I couldn’t access to any of the servers behind the firewall. ANY!  Strangely, I could access to the firewall and through some tricks directly to vSphere. From the firewall I tried to ping the VMs – nothing. From the VMs I tried to access the firewall – nothing. The firewall was broadcasting ARP requests; the VMs told me the host was down.

At first I thought was something related to ESXi. Then I found that I could ping VM to VM behind the firewall, although couldn’t access internet or the firewall. So maybe it isn’t a vSphere problem but a virtual machine problem. But then I checked the configuration of the firewall and everything seemed to be ok.

So I thought: “Maybe is something in the configuration of the virtual machine!” – so I checked, and I noticed something very strange. NETWORK INTERFACE NAMES WERE IN THE WRONG ORDER.

Let me explain. When you add network interfaces in this way, the appearance seems to follow a first-add-first-appear rule, or maybe an alphabetical order. This time, last interface added wasn’t the last one in order, and surely it wasn’t alphabetical order. So a doubt occurred to me. Maybe something messed up the association MAC Address – vSwitch?

I checked the MAC Address – Network Zone in the firewall with the ones in the Virtual Machine configuration, and that was the case. As soon as I switched Network Zones in the VM configuration to match with the one in the firewall, everything worked correctly again.

I have configured a few VPNs on my Ubuntu notebook. Some of them are OpenVPN, and in fact they are fairly easy to configure.
However, sometimes I receive this error:

I wasn’t able to exactly identify the situation when this happens – it seems to be related to networking, and it happens more often when I log into my desktop with WI-FI connection, OpenVPN daemon starts, then I plug an ethernet cable.


A quick solution is simply to log out and log in again. It is simple but I don’t like it very much.

Other than that everything regarding VPNs on Ubuntu Desktop seems to be a bit of a mess. In the long answer you can find some more details regarding OpenVPN.


In Internet you can find a lot of guides on how to set up an OpenVPN on Ubuntu Desktop. One simple and effective is Ubuntu’s Official: Help Ubuntu – OpenVPN. Anyway, most of the times everything is reduced to

to install a service, or

to install an extension to the Network Manager GUI.

However, the GUI option has some limitation – for example, you can only connect to one VPN at the time. If you have more than one VPN (and you can handle all routing problems with overlapping networks that can occur), you have to go with the service. To go with the service, you have to put all your OpenVPN configuration files, with extension .conf, in folder /etc/openvpn . Then (if your configuration files are correct, if your connection is ok, and a billion other ifs) if you restart openvpn service, you should see something like this:

That means that your VPNs are up and running.

However, if you have password authentication, for some reason, even if you have your credentials in a file connected to the configuration file, sometimes the service will hang, simply because the VPN restarts and it is waiting in background for a password. So, you have to restart the service.

But the agent of the first error it’s not this service. They are two completely different things. I think that this agent is something GUI related, for I meet this error only on the network manager GUI, and not with the service – which keeps running. However, it could just be that the service it’s still using WI-FI connection.

Unfortunately I have no real explanation for this and no real solution; just a quick workaround. It is a fairly complicated matter, which would require a lot of debug for a very simple task, and I don’t think it is worth the time.

Delete Windows Saved Network Password

by admin on

This very simple how-to can be used for all versions of Windows 7, Windows 8 and Windows Server 2008 . I didn’t test on Windows Server 2012

The most common situation it happens to me is: “OK, I have this network share. Let’s access with this user…ok it works. No, wait! This is the wrong user!!” or even “Let’s access with this user and save the password..NOOOOOO I didn’t check ‘Save Password!!!” And then I have to restart the PC and hope that it asks again for user and password.

After the 100th time I did something like this, I decided to learn how to make Widows forget saved network passwords.


In truth there’s ONLY a short answer. All you have to do is:

  • Start->Search programs and files
  • Type Credentials Manager
  • On the field Windows Credentials you should have one or more rows.

    Credential Manager - Summary

    Credential Manager – Summary

  • Click on the credential you want to remove
  • Click on Remove from vault

    Credential Manager - Remove from vault

    Credential Manager – Remove from vault

  • Now you can access again to the share you want to save and use the right credential and/or save them
  • By the way, if you want to change the credentials, you can click on Edit and change user and/or password. You cannot change the server (URL or IP).

    Credential Manager - Edit

    Credential Manager -Edit