Cannot start HTTP trigger on a specific port

Problem

When you try to start the HTTP trigger in Automation, you get an error message:

"It isn’t possible to start HTTP server at port 54321, access was refused."

or

"Cannot start HTTP server on port: 54321. System error message: The process cannot access the file because it is being used by another process."

The error occurs if Automation runs with limited user rights or some other application uses the port or the port is excluded from the available port list.

Solution

Limited user rights, solution 1

Assign NiceLabel Proxy Service 10 to a user with administrative permissions. Go to Services > NiceLabel Automation Service 1> Log On tab. Select a user with administrative privileges in This account section.

29_printer_settings5.png
Limited user rights, solution 2

If you don't wan't to assign NiceLabel Proxy Service 10 to a user with administrative permissions, you can still run the service by enabling a specific port to this user.

Run Command Prompt (CMD) application as administrator and use the following syntax:

netsh http add urlacl url=http://+:56425*/ user=MyAutomationLimitedUser

where 56425 is a port number and MyAutomationLimitedUser is a user name with limited rights.

Other application uses the port

If you get the error message "The process cannot access the file because it is being used by another process.", you can check which application uses your Automation trigger port.

Run Command Prompt (CMD) application and use the following syntax:

netstat -ano | findStr "6772"

where 6772 is a port number.

Example 5. Example

Port 56423 is open and you can use this port with the Automation trigger.

The process with PID 5168 is listening to port 6772 so the Automation trigger can't use this port.

31_ports1.jpg

Port is excluded from the available port list

Some applications, like Docker for Windows or Hyper-V can reserve ports, and other applications can't use them.

To check if the port is on the excluded port list, run Command Prompt (CMD) application as administrator and use the following syntax:

netsh interface ipv4 show excludedportrange protocol=tcp

Command Prompt will list all excluded ports.