[en] Cannot start HTTP trigger on a specific port

La traduzione ufficiale non è ancora disponibile.

[en] Problem

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

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

[en] or

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

[en] 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.

[en] Solution

[en] Limited user rights, solution 1

[en] 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
[en] Limited user rights, solution 2

[en] 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.

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

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

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

[en] Other application uses the port

[en] 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.

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

[en] netstat -ano | findStr "6772"

[en] where 6772 is a port number.

Esempio 5. [en] Example

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

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

31_ports1.jpg

[en] Port is excluded from the available port list

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

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

[en] netsh interface ipv4 show excludedportrange protocol=tcp

[en] Command Prompt will list all excluded ports.