photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: ben on February 09, 2024, 04:47:38 PM

Title: Port for Imatch webservices seems to be random
Post by: ben on February 09, 2024, 04:47:38 PM
Hello,

i recently moved to a new computer and wanted to used my self written scripts for the first time.
It seems the REST calls are not answered.

I checked the Port definition and this is where i am stuck:

Whenever i change the port configuration, the link embedded in IMatch WebServices Documentation changes as well.
But it is always another number as under preferences.

Am I missing something?
Thanks Ben
Title: Re: Port for Imatch webservices seems to be random
Post by: thrinn on February 09, 2024, 05:07:31 PM
This should happen only if the port number you configured is already in use by another application.
See also the Port number (https://www.photools.com/help/imatch/rmh_config_appsettings.htm?dl=hid-10) topic in the help. Maybe the netstat command described there can tell you if the ports are blocked and by which application.
Title: Re: Port for Imatch webservices seems to be random
Post by: Mario on February 09, 2024, 05:34:49 PM
Precisely.
You can see the port numbers IMatch has tried in the log file (https://www.photools.com/help/imatch/#im_logfile.htm).
IMatch tries to open the configured port. If this is not possible (port locked by other application), IMatch tries to find the next free port.

It is not unusual today that different ports are locked in different Windows sessions - sometimes even for a short time span only. netstat may show a port as free - but it might not have been free when IMatch tried.

The automatic "portscan" allows IMatch to simply work in almost all cases. Only if IMatch is unable to find a free port, you'll be notified and anything that's based on an app in IMatch will not work until you configure a usable port yourself.
Title: Re: Port for Imatch webservices seems to be random
Post by: ben on February 09, 2024, 10:53:16 PM
Ok, understood, thank you.
I changed the port according to the help in steps of 20 and now it works.
Though, netstat didn't show the previous port (default) as used.
Well, now it works.

Ben