NGINX Error: ’98: Address already in use’

KB ID 0001694

Problem

After an update, (WordPress – unrelated) yesterday, this website fell over! I rebooted the host, site was still down. I reluctantly restored to the previous evenings backup, and powered on the server. Alarmingly the site was still down!

I logged a call to my VPS provider, and attempted to troubleshoot the problem while I was waiting.

Very soon it was apparent my server appeared to be OK, but my web hosting platform (NGINX) was not running, and when I attempted to get it running this happened;

[box]

Aug 12 13:42:28 localhost nginx[2045]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Aug 12 13:42:28 localhost nginx[2045]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Aug 12 13:42:29 localhost nginx[2045]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Aug 12 13:42:29 localhost nginx[2045]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Aug 12 13:42:29 localhost nginx[2045]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Aug 12 13:42:29 localhost nginx[2045]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Aug 12 13:42:30 localhost nginx[2045]: nginx: [emerg] still could not bind,()
Aug 12 13:42:30 localhost systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 12 13:42:30 localhost systemd[1]: nginx.service: Failed with result 'exit-code'.
Aug 12 13:42:30 localhost systemd[1]: Failed to start A high performance web server and a reverse proxy server.

[/box]

Solution

A Google search kept pointing me towards my config files for NGINX being improperly formatted for port 80, but a) NIGINX has been running fine since the server was built, and b) I update things regularly! But nevertheless I wasted an hour and half going down that road. THIS WAS A BLIND ALLEY, MY NGINX CONFIG FILES WERE FINE! 

Other posts were, (more correctly) telling me something is using that port (TCP 80 or HTTP). So, to find out what;

[box]

sudo netstat -plant | grep 80

[/box]

BOOM! theres my problem Apache, what’s that doing running? I’m pretty sure I (stupidly) managed to install this a while ago, when updating my PHP to the latest version. I’m guessing that this had been a ticking time bomb and my WordPress update and reboot had caused it to explode! This would also explain why a restore didn’t fix the problem!

Lets stop and disable Apache;

[box]

sudo systemctl disable apache2 && sudo systemctl stop apache2

[/box]

And then (fingers crossed) start NGINX;

[box]

service nginx start
sudo service nginx status

[/box]

Site back up and running again (lesson learnt!)

Related Articles, References, Credits, or External Links

NA

Windows Server – DHCP Service Starts then Stops again

KB ID 0000617 

Problem

Saw this last week on an SBS 2011 Server. When attempting to get the DHCP service running it span up then stopped straight away.

Solution

A quick look in Event Viewer showed me what the problem was,

Event ID 1054

The DHCP/BINL service on this computer is shutting down. See the previous event log messages for reasons

Fair enough lets see the previous error on the same server;

Event ID 1053

The DHCP/BINL service has encountered another server on this network with IP Address, (IPv4 or IPv6 address), belonging to the domain

In this example the offending IP (192.168.87.254) Was a Cisco PIX 501 firewall that was running a DHCP server. Thankfully My main job that day was to replace the firewall so when I put in a new ASA I didn’t have the DHCPD service running.

If you see this elsewhere you will need to locate the offending IP and disable DHCP on it.

 

Related Articles, References, Credits, or External Links

NA

Windows 8 – ‘Network Connectivity Assistant service is stopped or not responding’

KB ID 0000841

Problem

When attempting to check Direct Access connection status on a Windows 8 client machine with a Get-DaConnectionStatus command you see the following error;

Get-DaConnectionStatus : Network Connectivity Assistant service is stopped or not responding.

OK, so lets go and check the status of that service, if it starts great, but mine did not as you can see.

And it logged an Event ID 7024

The Network Connectivity Assistant service terminated with the following service-specific error:
The request is not supported.

Note: This will also happen if you have not configured Remote Access properly on your server, and the client has not got the necessary group policies applied, so make sure that’s discounted first!

Solution

In my case the problem was a little more obscure, it seems this will not work on Windows 8 (Professional), to check your version simply run msinfo32;

Windows 8 Professional

Windows 8 Enterprise

Try the same this on a Windows 8 (Enterprise) client and it will run without error.

Related Articles, References, Credits, or External Links

NA

Exchange 2010 Install Error – ‘Service ‘MSExchangeTransport’ failed to reach status ‘Running’ on this server’

KB ID 0000577 

Problem

I had a nice clean install on a greenfield site today, Exchange 2010 Standard c/w SP1 on Server 2008 R2, so I was not happy when this happened!

Error:
The following error was generated when “$error.Clear();
if ($RoleStartTransportService)
{
start-SetupService -ServiceName MSExchangeTransport
}
” was run: “Service ‘MSExchangeTransport’ failed to reach status ‘Running’ on this server.”.

Service ‘MSExchangeTransport’ failed to reach status ‘Running’ on this server.

Solution

A quick google on this error, turned up loads of posts that said, “This is because you’ve disabled (Unticked) IPv6 on the properties of the nerwork card”, like so;

However as you can see, mine had NOT BEEN DISABLED

Every post and answer that had been accepted said either, retick this box, or manually start the Microsoft Exchange Transport service, this also failed. Turns out the problem WAS related to IPv6, This server was multi homed (I don’t know if that’s relavant).

What Fixed it for me:

1. On the Exchange server, Start >In the Search/Run box type regedit {Enter}.

2. Navigate to:

[box]
HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > Tcpip6 > Parameters [/box]

Create a new 32 BIT DWORD value called “DisabledComponents”, and set its value to 0xffffffff (Hexadecimal) or 4294967295 (Decimal).

3. Finally locate the server’s hosts file (C:WindowsSystem32Driversetchosts) and make sure if there is an IPv6 entry for ::1 it has been commented out (i.e. the line has a hash symbol at the start of it).

 

Related Articles, References, Credits, or External Links

NA

McAfee Groupshield for Exchange is not currently available

KB ID 0000015 

Problem

The Groupsheild config file has corrupted replace it with the default one (note this means you will loose any custom configured settings – you might want to restore one from backup).

Solution

1. Start > Run > services.msc {enter}

2. Locate the “McAfee Groupshield for Exchange Service” and stop it.

3. Right click the taskbar > Task Manager > Processes

If any of the following are running STOP THEM (right click > end process tree).

postmaster.exe postgress.exe RPCServ.exe

4. Navigate to C:Program FilesMcAfeeGroupShield for Exchangeconfig.

5. Rename McAfeeConfig.xml to McAfeeConfigOLD.OLD.

6. Copy C:Program FilesMcAfeeGroupShield for Exchangeconfig_409 to C:Program FilesMcAfeeGroupShield for Exchangeconfig.

7. Start the McAfee Groupshield for Exchange Service.

 

Related Articles, References, Credits, or External Links

NA