IMatch WebServices Port

Started by Carlo Didier, December 18, 2020, 08:21:29 AM

Previous topic - Next topic

Carlo Didier

Concerning release note #01296 "IMatch WebServices Port", is there a simple and fast way to detect outside of iMatch which port it uses?
External Applications/Scripts have to be changed each time the port changes, unless they find out which port is used.
Note that the port does not show with netstat ...

Mario

The port is listed in the Info & Activity Panel.
If you have to adapt external applications when IMatch has to select a port by itself, I recommend you find a free port and configure it under Edit > Preferences > Application.
If the port configured there is free, IMatch will use it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

Quote from: Mario on December 18, 2020, 08:44:41 AM
The port is listed in the Info & Activity Panel.
If you have to adapt external applications when IMatch has to select a port by itself, I recommend you find a free port and configure it under Edit > Preferences > Application.
If the port configured there is free, IMatch will use it.
As from previous threads to that problem, from time to time, the port configured in iMatch is blocked for reasons unknown. Chnaging it only solves the problem temporarily.
So it would be nice to detect the currently used port. Note that even if it was visible with netstat, that would be a very slow way to find it.

Mario

If the port is blocked by something on your machine, IMWS cannot start. So IMWS finds a free port by itself.

You can always do a curl or something to the /info endpoint. It lists the port number. But in order to connect to IMWS/IMatch, you need the port number.
You could write a small IMatch service app which runs with IMatch starts and which queries /info, finds out the port and saves it to a text file or a registry key from where your other tools can fetch it.
If you really need this amount of automation for your other applications.

If something would block arbitrary ports on my machine, I would try to find out more.
The only applications which blocks ports are the Windows Firewall, another firewall-style product you might run or your anti-virus. Although it's hard to say these days, with all the crap than insists on running as a background service. Sometimes firewall logging and then checking for dropped connections is needed etc...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook