Skip to content

Port 80 in use by another process

Jeffrey Gilliam edited this page Jul 24, 2018 · 11 revisions

This page describes how to setup SIMRacingAppsServer to use a different port.

When port 80, the SIMRacingAppsServer's default port, is being used by another process, you have to either shutdown the offending process or change one of the processes to use a different port. The following message can be seen in the server window when another process is using the port.

SEVERE : Address already in use: bind Port: 80: com.SIMRacingApps.Server.main(Server.java:580)[main]

  1. Look for a file in your "Documents/SIMRacingApps" folder called "settings.txt". If it does not exist, run the SIMRacingAppsServer.exe and it will create it. Click on this file to open it in Notepad. Scroll down to the "port" variable and update it to a port that is not in use, like 8080. Save the file. Ports should range from 1000 to 32000.
  2. Close the server window and restart it.
  3. Take note of the new address in the title of the server window. You will need to use it to connect to the server from your browser. This will typically come in the form of "http://IP_ADDRESS:PORT". So, you may ask, why didn't I have to specify the port when it was set to 80? The answer has to do with that's the default port all web servers should be using. So, do not complicate the user experience by requiring them the enter a port in the address. So, when you pick a port other than 80, you have to specify it.

Electron

If you are starting Electron manually (such as from another device), you will need to create a shortcut and add the -port option. Follow this steps.

  1. From Windows Explorer, right click the "startapps.bat" file and select create shortcut.
  2. Right click on the shortcut that was created and select Properties.
  3. In the "Target" field add the option "-port 8080" to the end of the line separated with spaces.
  4. Click "OK"
  5. Now when running Electron, use the shortcut. You can move the shortcut to where ever you want, such as, your desktop.

As of release 1.6

This version added additional ports to try before giving the error message. First it will try port 80 (or what your settings "port" is set to), then it will try 8080, then 5555. If all of these ports are in use (highly unlikely), then the server will not start up. If something other than port 80 was chosen, take note of the port it found in the title of the server's window pane.

If you experience it choosing a different port than before, then you must have some other software interfering with it. Sometimes it interferes and other times not. You can mitigate this problem by choosing a port that will always be available and putting that port in the settings "port" variable.

You can’t perform that action at this time.