Cannot get IMWS to work

Started by DigPeter, September 15, 2017, 07:48:35 PM

Previous topic - Next topic

DigPeter

I have tried looking in help, but cannot solve this.  I have installed the trial version and done the things I should, but I continuously get the attached error message.  I also attach the log file.  I have created exceptions on both my windows and AVG firewalls.

Mario

There should be other log files as well (see the log files help topic).
Also check the Windows Event log for errors reported by the IMatchWebService.

All I can see for now is: Time out while waiting for service to start.

Either iMWS fails to start or is so slow that Windows gives up waiting after 30 seconds.

How large is your database?
Windows version?
PC spec?
Did you reboot after installing?
Virus Checker?
...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on September 15, 2017, 08:00:41 PM
There should be other log files as well (see the log files help topic).
Also check the Windows Event log for errors reported by the IMatchWebService.
All that I can find is attached, including those loaded with the OP.   Where do I find the Windows event log?
QuoteEither iMWS fails to start or is so slow that Windows gives up waiting after 30 seconds.
Error comes up almost instantly.


QuoteHow large is your database?
some 60,000 files
QuoteWindows version?
PC spec?
Did you reboot after installing?
Virus Checker?
...
Windows 7 Home Premium SP1.
Intel Core i5 @ 250Ghz
6GB RAM
Intel HD graphics.

Yes - rebooted.

AVG virus checker working to spec.

Mario

#3
The IMATCH log file is not relevant for IMWS:

IMatch WebServices creates it's own log file in the WINDOWS\TEMP folder (this is the default, unless you run the service unter another user).
IMatch WebServices also writes entries into the Windows Event Log which you can view with the Windows Event Log Viewer. In German Windows version this is named "Ereignisanzeige" I think.

All information about the log file and how to view the event log is contained in the IMatch WebService Controller help. Just click on the Help button or press <F1> in the Controller dialog and then search for log file.

I see a semaphore error 4 in your log file. Very unusual.

This means that the database system is unable to create a semaphore file in the folder containing the database.
Either the database is already open in IMatch (unlikely) or the user under which you run IMatch WebServices (default: Local System) has no write privilege to the folder containing your database (check in Windows Explorer) or some software is preventing the service from creating the file (virus checker).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

@Mario,  Thanks.

Imatch 2017 was in fact running, hence the error.  Having closed it IMA opens after a about 10 secs, while an amber sign flashes.  When the attached appeared, I clicked 'OK'.    The web browser then tried to access 'http://peter-pc:8081/imatchviewer/'  , but timed out stating there was a problem loading page.  I am afraid I am now in territory I do not understand.  In case it is relevant, I attach theIMWS  service info. 

Mario

IMWS is listening on port 8081 on the PC named peter-pc. This looks correct.

Are you trying to access IMWS from this PC or from another computer?

The typical reason for the connect not working is a firewall disallowing the access or the PC trying to access being unable to resolve the computer name to the corresponding IP address.

Can you access 'http://peter-pc:8081/info from your browser? This should return information about the current state of IMWS.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

I am trying to access IMWS from this PC on which the program is installed.

Firewall excludes 'service controller.exe'  and 'WebService.exe'

I cannot access 'http://peter-pc:8081/info from the browser

Mario

#7
What happens if you use /info?

Error code like 404 returned?
Browser timing out after 10 seconds or so?
Browser immediately returning an error?

Try

http://localhost/info

or

http://127.0.01/info

Also, please locate the IMATCH_WEBSERVICE_LOG.TXT in your \WINDOWS\TEMP folder. This file is created by IMatchWebServices and may contain important info.
Note: You need Admin privileges to access this file.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

In all cases browser times-out with "unable to connect" and "problem loading page".

Trying IMA again results with page shown in the first attachment.   Log text also attached.

Mario

Mhm. Looks like a firewall problem then. No errors reported in the log.

When you look at the "Services" tab in Windows Task Manager, is the IMatch WebService listed as running?

Please open the Advanced Options in IMatch WebService Controller (via the Options button).

Enter a file name for both the access log (if not already set) and the error log options.
Then stop and restart the service.
This will produce additional log files which we can analyze.

Usually IMA is a "just works" application. So far the only problems were incorrectly configured firewalls or virus checkers blocking access to the service...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Thanks Mario.  I followed up on your view that it seems to be a firewall problem.    There are two places in AVG to make exceptions.  I had created exceptions in the wrong one it appears.  Now that I have created them the other place, IMA is working.  I will now explore.  My object is to be able to view images on my tablet.

Is the normal method of opening IMA through the browser or the IMA icon?

Sorry to have taken up your time in solving this.

Mario

The IMatch WebService Controller (the dialog) is used to start and configure the service.
If you set the service to start automatically, you usually only need the controller application once, or when you need to make changes to the configuration.

Else you just fire up your browser and connect to IMatch WebViewer. Create a favorite / shortcut in your browser and then you can browse your database anytime from any device.

You may like the tutorial videos for IMatch Anywhere here:

https://www.photools.com/imatch-anywhere/imatch-anywhere-learning-center/

They explain all major features of the Web Viewer.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter


DigPeter

@Mario,

I thought that I had IMA running, but have a relapse.   When on-line and with AVG virus firewall on, withe exceptions set as shown in the attachment, it times out as before. 

When not on line, or with firewall switched off, IMA runs OK.

Before I contact AVG, can you say whether I have got the correct files for exceptions?

Mario

I have no idea about how AVG works, sorry.
And I don't recall a similar problem report. regarding IMWS.

If you have two competing firewalls (the built-in firewall in Windows (which is very good) and your AV, problems may occur.
AV programs hooking themselves into the TCP connections to do whatever what are known to cause problems.

The .exe files files listed on that page look correct. The ...services.exe is the service that hosts IMatch WebServices on your machine. It needs to be allows to access TCP/IP connections on the ports you have specified in the configuration (8011 and 443 for HTTPS by default).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

AVG support has sorted this.  For what it is worth, the customise settings for AVG firewall needed changing:  router and network to 'private';  system rules (in policies) all had to be enabled.  I can now open IMA from a bookmark in my browser.

Thanks for your help.

DigPeter

Some points arising from my trial of IMA:

1.  It takes about 1 minute to start IMWS - is this normal?

2.  If this is normal, I am reluctant to activate the option for IMWS to start at computer start-up and particularly in view of the next point.

3.  With IMWS running, IMatch 2017 will not open the database because it states that it is locked, even when IMA is not running.

4.  IMA is not working on my Nexus 7 2013 tablet which works on Android 4.4.

Mario

#17
1. Uncommon. How large is your database. The IMWS log file would be helpful.
On my computer, IMWS loads a 100,000 files database in ~ 6 seconds. Total startup time: < 10s.
Just checked. IMWS loads databases with the same routines as IMatch and is usually faster because it does not need to initialize a Windows user interface.
Show us the log file, then we'll know more.

3. When IMatch WebServices is active, it locks the database exclusively. This is required for various reasons, especially since IMatch WebServices will allow updates to the database from the browser in the future.
It cannot be allowed that the user has the same database open in IMatch desktop.
This is explained in the documentation in detail.
The documentation also explains a typical "publish" workflow. You work with one database in IMatch desktop, but publish another version of the database via IMWS.

4. What does "does not work" mean?

+ IMatch WebServices is a Windows application. It cannot run on Android.
+ Or do you mean you cannot connect to IMWS from your tablet?
+ Or do you mean that IMatch WebViewer does not work in the browser?
+ In that case: Android 4.4 is really old. Which browser do you use on that table? A modern browser is required. Try Chrome or Firefox. The built-in browser in Android 4.4 is oooold and buggy.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on September 22, 2017, 06:26:04 PM
1. Uncommon. How large is your database. The IMWS log file would be helpful.
On my computer, IMWS loads a 100,000 files database in ~ 6 seconds. Total startup time: < 10s.
Just checked. IMWS loads databases with the same routines as IMatch and is usually faster because it does not need to initialize a Windows user interface.
Show us the log file, then we'll know more.

3. When IMatch WebServices is active, it locks the database exclusively. This is required for various reasons, especially since IMatch WebServices will allow updates to the database from the browser in the future.
It cannot be allowed that the user has the same database open in IMatch desktop.
This is explained in the documentation in detail.
The documentation also explains a typical "publish" workflow. You work with one database in IMatch desktop, but publish another version of the database via IMWS.
OK - I understand that. 

Quote4. What does "does not work" mean?

+ IMatch WebServices is a Windows application. It cannot run on Android.
+ Or do you mean you cannot connect to IMWS from your tablet?
+ Or do you mean that IMatch WebViewer does not work in the browser?
+ In that case: Android 4.4 is really old. Which browser do you use on that table? A modern browser is required. Try Chrome or Firefox. The built-in browser in Android 4.4 is oooold and buggy.
Hmm...     4.4 might be old (4 years is old?), but Nexus 7 only implements up to 5.02, which sucks, so I stuck with 4.4.  I am not into changing hardware just to line manufacturers' pockets.   So far 4.4 has done what I want.

I cannot connect to IMWS from the tablet.   The browser is what comes in the box - it calls itself Google, so I imagine it is based on Chrome.  When I put in the IMWS url for my database, it is unobtainable.  This of course is because I cannot find how to include the Nexus on my Homegroup.  Unless I can manage to do this, I will not have a lot of use for IMA.

Mario

#19
If your tablet is not part of your WLAN, it cannot reach your computer running IMWS.

Or maybe it is just a DNS lookup problem?
If you are trying to connect via COMUTER-NAME:8081/.... your tablet may not be able to resolve the COMPUTER-NAME to the IP address.
In that case just configure IMWS to use the IP address instead of the computer name. IMatchWebViewer will then know how to find IMWS and will be able to connect.

See My browser cannot connect to IMatch WebServices in the IMatch Anywhere FAQ for more info.

Try to use the /info URL from your tablet via the IP address of the computer running IMatch WebServices. For example, if your Windows PC has the IP address 192.168.100.10 you can use this URL to test if your tablet can connect to it:

192.168.100.10:8081/info?prettyprint=true

This should return a page of information about IMWS. If this works, your tablet can connect but cannot resolve computer names to IP adresses.
Change the IMatch WebViewer config.json to use the IP address instead of the computer name in that case.

Disadvantage: If your Windows PC sometimes gets a different IP address from your router/DNS server, you will have to change the config.json again to match.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

@ Mario
Thanks for the last post - I will attempt what you suggest.

I am not not having a great time with IMA.  I just tried to start IMWS.  It ran for nearly 90 secs then displayed an error that it could not be loaded.  I triede again and the same error message appeared immediately, then the controller became operational without any further intervention.  The log file is attached.

Mario

IMatch Anywhere is usually a total no-problem software. I get maybe 10% of the support requests per user I get for IMatch desktop.


The load process starts at 16:18:16 and finishes at 16:18:35, after 17 seconds. Not too bad for a 60K files database.

What I find puzzling is that IMWS takes so long to pre-load the category caches. 105 (!) seconds for 10 caches. Your database only has 6000 categories.

Category caches allow IMWS to process all functions dealing with categories very quickly. It keeps track of which category caches were last used. When it shuts down, it remembers this in the storage.db database file. When it starts up again, it pre-loads the same caches to have them ready when they are needed. One of the many measures IMWS uses to be so fast.

This pre-loading is part of the database load operation but normally runs in the background, not interfering with the service startup processing...
But 105 seconds. Normal is 5 to 10 seconds...

Do you use many very complex categories? Formulas? Many data-driven categories?

Try this:

Make notes of your settings in IMWS Controller (databasem port, etc.). Just make a screen shot of the settings and paste it into your image editor.
While IMWS is not running, rename the file C:\ProgramData\photools.com\IMatchAnywhere\IMWS\storage.db to C:\ProgramData\photools.com\IMatchAnywhere\IMWS\storage.db.BAK. Then start the IMWS Controller again and re-do your settings.

On the Configuration > Advanced tab change the Log file setting to verbose.

Then start IMWS. Since it has no categories to pre-load it should start up in < 20 seconds.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on September 24, 2017, 08:08:41 AM
Do you use many very complex categories? Formulas? Many data-driven categories?
The only data-driven categories are the pre-loaded ones.  I have 7 formula based categories, each of 2 or 3 parameters.
QuoteTry this:

Make notes of your settings in IMWS Controller (databasem port, etc.). Just make a screen shot of the settings and paste it into your image editor.
While IMWS is not running, rename the file C:\ProgramData\photools.com\IMatchAnywhere\IMWS\storage.db to C:\ProgramData\photools.com\IMatchAnywhere\IMWS\storage.db.BAK. Then start the IMWS Controller again and re-do your settings.

On the Configuration > Advanced tab change the Log file setting to verbose.

Then start IMWS. Since it has no categories to pre-load it should start up in < 20 seconds.
Done that - it took about 20 secs to load.  Verbose log file is attached.

DigPeter

In the viewer the title is shortened.  See Attachment - the top line has omitted the characters on the end of the line:  "ernina, 4000m".  I cannot see a method of showing the whole title.

Mario

Quote from: DigPeter on September 24, 2017, 01:35:39 PM
In the viewer the title is shortened.  See Attachment - the top line has omitted the characters on the end of the line:  "ernina, 4000m".  I cannot see a method of showing the whole title.
You can control the information displayed in the Viewer via the IMatch WebViewer Settings, Advanced Settings.

The behavior you see is probably due to the large amount of text you try to display, screen resolution, font-scaling, the browser scaling.
It is hard to tell from this tiny screen shot if this is the whole screen or just a crop.
If this is the whole screen with, you are trying to squeeze in too much text. Try leaving the keywords out.
Or zoom out in your browser (usually <Ctrl>+<->)

If you still use the ancient Android 4.4 built-in browser, do yourself a favor and install Chrome or Firefox. Much better browsers, more secure and modern.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

#25
Quote from: DigPeter on September 24, 2017, 01:18:58 PM
Done that - it took about 20 secs to load.  Verbose log file is attached.

NOTE: Please don't mix unrelated topics in one thread. Now we're discussion

IMWS does not start at all
Cannot connect to IMWS
IMWS starts to slow

and

The text does not fit into the Viewer. This will get confusing soon.

Does the slow startup re-appear when you use IMWS for some time then shut-down the service and restart?
IMWS will then re-calc the last 10 categories again during the startup phase.

I will look into this, maybe I can detach the cache pre-load better from the server startup procedure.
To reduce the overall startup time for slow machines or large databases.
On my machine the pre-calc takes less than 2 seconds, even for a 100,000 files database.


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Renaming the db file seems to have done the trick.  The load time has been under 20 secs on the last two occasions, not including the first load after renaming.


Mario

That's better. Still not fast, but better. Startup time of course depends a lot on the hardware, SSD vs. normal disk, hard disk in PC vs. hard disk in Notebook etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

DigPeter

Quote from: Mario on September 23, 2017, 01:45:18 PM
If your tablet is not part of your WLAN, it cannot reach your computer running IMWS.

Or maybe it is just a DNS lookup problem?
If you are trying to connect via COMUTER-NAME:8081/.... your tablet may not be able to resolve the COMPUTER-NAME to the IP address.
In that case just configure IMWS to use the IP address instead of the computer name. IMatchWebViewer will then know how to find IMWS and will be able to connect.

See My browser cannot connect to IMatch WebServices in the IMatch Anywhere FAQ for more info.

Try to use the /info URL from your tablet via the IP address of the computer running IMatch WebServices. For example, if your Windows PC has the IP address 192.168.100.10 you can use this URL to test if your tablet can connect to it:

192.168.100.10:8081/info?prettyprint=true

This should return a page of information about IMWS. If this works, your tablet can connect but cannot resolve computer names to IP adresses.
Change the IMatch WebViewer config.json to use the IP address instead of the computer name in that case.

Disadvantage: If your Windows PC sometimes gets a different IP address from your router/DNS server, you will have to change the config.json again to match.
I cannot get the Nexus tablet to connect to my Homegroup network, so it will not talk to the main computer where IMWS resides.  Reading around on the web, it would appear that Windows 7 Homegroup will only operate with other Windows machines.   

As you suggest, I have tried the IP address without success.  But as you imply in your last sentence above it would be only a one-off solution needing special action each time I log onto the web.

I will open another thread to ask if any one has succeeded getting IMA to run on an Android tablet.

Mario

I use IMatch WebViewer on Android smart phones and TV appliances. No problem.

1. Your phone tablet must be in your Wi-Fi network.
If it is connected via a mobile phone, it cannot reach you IMWS unless you allow IMWS to accept connections from the Internet.

2. If you have no DNS server (usually your router) in your network, you need to use the IP address of your IMWS server in the IMatch WebViewer config.json.
If you have a DNS and a fairly modern phone/tablet, it will be able to receive the IP address for the computer name.

You can check by calling the YOUR-PC:Port/Info request with the computer name or the IP address. If this does not work, your tablet is not in your local network or a firewall blocks it.


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on September 24, 2017, 01:54:12 PM
Quote from: DigPeter on September 24, 2017, 01:18:58 PM
Done that - it took about 20 secs to load.  Verbose log file is attached.

NOTE: Please don't mix unrelated topics in one thread. Now we're discussion

IMWS does not start at all
Cannot connect to IMWS
IMWS starts to slow

and

The text does not fit into the Viewer. This will get confusing soon.

Does the slow startup re-appear when you use IMWS for some time then shut-down the service and restart?
IMWS will then re-calc the last 10 categories again during the startup phase.

I will look into this, maybe I can detach the cache pre-load better from the server startup procedure.
To reduce the overall startup time for slow machines or large databases.
On my machine the pre-calc takes less than 2 seconds, even for a 100,000 files database.

IMWS starts slow....

Just thought I'd weigh in here as well since this is being discussed.

I just realized my service was set to off since we had a power failure.. so I used the Webservice controller to start... took over a minute for the service to kick off.  My DB is stored on my local SSD drive while the images are all stored as jpg's on my NAS.  Does the IMWS service need to do something with the NAS to start the service?  Log attached if interested... thx! - Andy.

Mario

This is the log file created by the controller application.
The interesting data is in the IMatch WebServicde log in your c:\windows\TEMP folder. See documentation for file name and details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Hmm... file is too large for attachment.. it can downloaded from this link Mario: www.jingothecat.com/clients/IMATCH_WEBSERVICE_LOG.TXT


Mario

Tip: If you ZIP your log files before uploading, they reduce by 90%. Your 10MB log file reduced to 220 KB  ;)

I think the extra startup way caused by the fact that your database was not up-to-date and IMWS had to rescan a number of folders, bringing in new files into the database.
See your log file for info about which folders and files were added/updated.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Ah... thanks Mario.. yes... it had been awhile since I had launched the service... thx.. just toggled and it took a matter of seconds to start up again.