unige-geohealth / accessmod

accessmod 5 : anisotropic accessibility analysis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation of AM Docker latest version in Windows

carlosrochoa opened this issue · comments

I have two Windows 10 laptop computers, one for work (W) and one personal (P).

System config for W:
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19045 N/A Build 19045
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
Registered Organization:
Product ID: 00330-50205-43116-AAOEM
Original Install Date: 2020-08-15, 09:59:17
System Boot Time: 2022-11-09, 23:03:15
System Manufacturer: LENOVO
System Model: 20KGS0X600
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 142 Stepping 10 GenuineIntel ~1910 Mhz
BIOS Version: LENOVO N23ET81W (1.56 ), 2022-05-25
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: de-ch;German (Switzerland)
Time Zone: (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Total Physical Memory: 16,223 MB
Available Physical Memory: 5,387 MB
Virtual Memory: Max Size: 21,295 MB
Virtual Memory: Available: 4,143 MB
Virtual Memory: In Use: 17,152 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP

System config for P:
OS Name: Microsoft Windows 10 Home
OS Version: 10.0.19044 N/A Build 19044
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: N/A
Registered Organization: N/A
Product ID: 00325-80000-00000-AAOEM
Original Install Date: 14/06/2020, 18:50:44
System Boot Time: 03/12/2021, 12:17:11
System Manufacturer: HP
System Model: HP Pavilion Notebook
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 9 GenuineIntel ~2808 Mhz
BIOS Version: Insyde F.53, 12/12/2019
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Boot Device: \Device\HarddiskVolume3
System Locale: en-gb;English (United Kingdom)
Input Locale: fr-ch;French (Switzerland)
Time Zone: (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Total Physical Memory: 16.269 MB
Available Physical Memory: 12.045 MB
Virtual Memory: Max Size: 17.293 MB
Virtual Memory: Available: 12.048 MB
Virtual Memory: In Use: 5.245 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP

Current Behavior

In P (older machine):

  1. I started by uninstalling AM launcher and remove all images from Docker.
  2. I installed the latest version of AM with the .exe file.
  3. After the launcher starts and begins to load the image, it came the first error:

App fail to load

  1. Trying version 5.7.17 worked wright away.
  2. Trying to load the latest version again brings the same error, and it cannot be opened.

Tried Solution

  1. I uninstalled Docker and AM from the Windows settings.
  2. Then, I re-installed Docker from a fresh downloaded copy. It never asked for installation of WSL2 elements or restart of Windows after installation, as it has done in other occasion (probably only happens once for the really first install).
  3. Then, installed the second compilation that @fxi released of AM.
  • At some point during this installation came the error message: Error Invalid Version: null.
    First message by installing AM 5 8
    That was dismissed as you suggested.
  • Then came again the message: Error App failed to load, try another version.
  1. The launcher stays in ‘Ready!’, but nothing happens.
  2. I tried view > Reload, or view > Force Reload, and nothing happens.

Surprising Behavior

Having the latest version already locally installed in P, but not managing in any way to run it from the launcher, I set to run the Docker container and in the internet browser opened localhost:62499 (as port in the container) and it opened right away.

Container 5 8 not running in Launcher but in localhost62499

Running from Docker into localhost


Current Behavior

In W (somehow newer machine):

  1. I updated from the launcher.
  2. Then I got the same error as above 3: Error App failed to load, try another version.
  3. Changed to other preinstalled version, which opened, and then back to 5.8 that that time it opened as well.

Surprising Behavior

I closed the latest version, but in Docker, the container status of that image still appears as running even if the launcher does not seem to be running at all (checked in task manager).

Docker container still running after AM closed

And it is the same with the images, that seem to keep running even when the launcher is closed.
Images in Docker AM closed

Is this a normal behavior? I thought that closing the launcher would stop the image running.

Expected Behavior

When installing the latest version from a .exe file the launcher is installed and opens that image/container version.

If the latest version is pulled from the launcher, it opens up after installation.

Ok. I tried on Windows 10 and Windows 11, it's working fine ( after the first relaunch following the install step ).

As mentioned by email, it could be an issue with the Windows firewall, blocking AccessMod Desktop to access/be accessed on the local network.

Depending on your configuration, when installing the app, we have an message saying :

Windows Defender Firewall has blocked some features of accessmod on all public and private
networks.
Name:
accessm
Publisher:
Path:
Fred Moser
C: users \gridadmin lappdata Vocal (accessmod lapp-
5.8.0 laccessmod.exe
Allow accessmod to communicate on these networks:
@ Private networks, such as my home or work network
(Public networks, such as those in airports and cafés (not recommended
because these networks often have little or no security)

Screenshot 2022-11-17 111320

If you refuse, AccessMod will not work.

That's the main lead for now, but if I have another idea, I add more info.

Congrats @fxi ! It worked indeed!
I had allowed only for connection through private networks. I went into the firewall settings in Windows and allowed AccessMod and Docker in both types of connections and in both computers the latest version opened flawlessly without errors. I also moved between versions without any problem.
I will add this clarification to the tutorial.
Closing the issue as solved unless you require further testing

Thanks for the update and clarification on where to change this.
The only remaining part mentioned here, is the "Invalid version : null" after the install. It Could be part of another issue, that could be fixed for the next release.

Hi Fred,

The same error as before came again in my older laptop, mentioned above as 'P'.
App fail to load

I think you mentioned that there might be another option to deal with this in addition to the one of the Firewall.
In this case, the Firewall settings are as described, all allowing connection (private and public).

I don't know if this is related, but I launched the container of v5.8.0 to run with the run button in the actions column in Docker and in the protocol that runs came this at some point:

....
2022-11-30 10:19:12 Error in curl::curl_fetch_memory(url, handle()) : 
2022-11-30 10:19:12   Couldn't connect to server
2022-11-30 10:19:12 Calls: source ... http_client_api_version -> ping_version -> ping -> <Anonymous>
2022-11-30 10:19:12 Execution halted
....

It is also happening that as mentioned before the images of 5.8.0 and 5.8.1-alpha seem to be blocked IN USE
Images IN USE after fresh restart
even if docker is quit completely and the computer restarted.

In between, v5.7.18, which as you see does not appear as running, loads instantly without problem.

Any suggestions?

I continue to think that there could be an issue with your firewall or antivirus.

If not, probable cause : multiple launch of AccessMod on the same ports.

AccessMod Desktop takes care of checking ports. If you load it manually, it's up to you.

Can you confirm that ports are ok ?

I will check if I can allow something in the Antivirus, because the firewall has all permissions for AM and Docker desktop.

Regarding: "AccessMod Desktop takes care of checking ports. If you load it manually, it's up to you."
I loaded AM from the launcher with 5.8.0, as usual, the error above came up. Then, tried to load 5.8.1-alpha and the same error came up. Then closing AM, quitting Docker, re-starting Docker, and the images were IN USE and blocked to be deleted even with AM closed

Do you have a suggested method to check the ports?
Otherwise, if you don't know for being Windows, I can search online.

Thanks

Hi Fred,

For now I have not found any setting in the Antivirus that allows further permissions for an App. The only thing would be deactivating it. I am using Windows Defender, which should be (hopefully) less aggressive and more compatible with other Windows processes.

Just a question in all this issue, what is the connectivity(?) difference between v5.7.18 and 5.8.0? Because the former works well with the current PC configuration and the later does not.

Cheers.

Hi Fred,

Some more input on this issue:

  • Regarding the antivirus, the only option I could find was to add 'exclusions', where I added all the folders containing Docker Desktop and Fred Moser (AccessMod?) in C:/Windows/Program Files.
  • In the details of the images appearing IN USE, there is a summary of parameters that mention the ports. For both v5.8.0 and 5.8.1-alpha the ports were the same: ENV_PORT_HTTP=5000 and PUBLIC_PORT_HTTP=5080.
  • Regarding the images that stay IN USE no matter what. Something I noticed is that after running the Docker compose, its image remains always IN USE as well, at least in my old PC (not in the newer one: W). I removed that container, named AM5-1 with image accessmod:latest. That stopped the IN USE status of the images 5.8.0 and latest, and allowed me to delete the container of 5.8.1-alpha, whose image also became 'Unused'

Images Unused after removing several containers

I started AM as usual from the launcher and the last version I tried to load before, 5.8.0, opened immediately, then I asked through the launcher to change to 5.8.1-alpha and it also worked.

So you will know better, but it seems that there is some weird entanglement between the version obtained with Docker compose that stays always IN USE, and the redundant status of 'latest' that have some versions. And that probably occupy the ports as you said.

Well.

Containers launched by AccessMod Desktop (electron/launcher) should have port in the 50k range.
Something like : 57461

CONTAINER ID   IMAGE                                 COMMAND                  CREATED         STATUS                        PORTS                                                                                            NAMES
1456fc7a0f20   fredmoser/accessmod:5.8.1-alpha       "Rscript --vanilla r…"   7 minutes ago   Up 7 minutes (healthy)     0.0.0.0:57461->3000/tcp, 0.0.0.0:57462->5000/tcp 

It's not possible - to my knowledge – to launch docker compose on the same (public) ports as the one launched using AccessMod Desktop.

I would not recommend to use Docker Dashboard (as per your screenshot). It seems to be very, very minimalist and confusing. Try to keep using and reporting using the command line. E.g.

Try to run

docker ps
# or
docker ps -a

..and check that the ports are not overlapping.

If that's the case, it's a major issue and I will have to redo a lot of things...

That makes sense and here is the current status in my new computer:

Running simultaneously v5.8.1-alpha in the launcher and the browser version of Docker compose:

CONTAINER ID   IMAGE                             COMMAND                  CREATED         STATUS                     PORTS                                              NAMES
f4aa1f9ed09b   fredmoser/accessmod:5.8.1-alpha   "Rscript --vanilla r…"   4 minutes ago   Up 4 minutes (healthy)     0.0.0.0:64124->3000/tcp, 0.0.0.0:64125->5000/tcp   accessmod_worker
ddb9997b7fc6   fredmoser/accessmod:latest        "/bin/sh -c 'Rscript…"   11 days ago     Exited (137) 11 days ago                                                      recursing_bartik
ebe3e61b9ec9   fredmoser/accessmod:latest        "Rscript --vanilla r…"   11 days ago     Up 40 seconds              0.0.0.0:3180->3100/tcp                             carlos-am5-1
69a7e85e5fd2   fredmoser/accessmod:latest        "/bin/sh -c 'Rscript…"   13 days ago     Exited (255) 12 days ago                                                      stupefied_burnell

And the equivalent info, provided by Docker:
WSL2 info docker ps -a DockerContainers

So it seems that there is no problem with the ports, at least in my newer computer. However, in this PC that problem does not appear, and the docker compose container can be stopped I will re-install the docker compose version in the old computer and see what happens.
Could that be linked to the Windows infrastructure? Like Pro Vs Home? Even though I checked that the current OS build is inside the minimal requirements of Docker WSL2 requirements.

Both computers should work : that the purpose of containers :)

Especially a recent Lenovo with Windows Pro.

I'm not a windows expert : last windows I was familiar with was Windows 95.

It could be great to report the non-screenshot version of docker ps ( text/ports searchable, image, not (yet) ) from the
Windows that does not work. To check the hypothesis.

New tests with the older PC:

  1. I re-run docker compose up and created the image I had deleted in the previous comments.
  2. I opened AM in the browser, and worked well as expected. The docker ps -a command gave this:
CONTAINER ID   IMAGE                        COMMAND                  CREATED              STATUS              PORTS                    NAMES
ab4a06f317e1   fredmoser/accessmod:latest   "Rscript --vanilla r…"   About a minute ago   Up About a minute   0.0.0.0:3180->3100/tcp   downloads-am5-1
  1. I started AM from the launcher (last version installed and ran v5.8.1-alpha). It fail to open and showed the error of App fail to load. However, having both open as in done previously in the newer PC the docker ps -a command gave this:
CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS                    PORTS                                              NAMES
b8a7523467b1   fredmoser/accessmod:5.8.1-alpha   "Rscript --vanilla r…"   53 seconds ago   Up 52 seconds (healthy)   0.0.0.0:53344->3000/tcp, 0.0.0.0:53345->5000/tcp   accessmod_worker
ab4a06f317e1   fredmoser/accessmod:latest        "Rscript --vanilla r…"   3 minutes ago    Up 3 minutes              0.0.0.0:3180->3100/tcp                             downloads-am5-1

So, indeed both ports are independent. However, even if I closed the browser and stopped the container running the Docker compose version, in the images, the 'latest' version that is also v5.8.0 is now permanently IN USE (image)

Images in Docker AM closed 2

And the docker ps -a command gives this:

CONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS                        PORTS     NAMES
ab4a06f317e1   fredmoser/accessmod:latest   "Rscript --vanilla r…"   29 minutes ago   Exited (137) 22 minutes ago             downloads-am5-1

So it is indeed still running! And that seems to interfere with the launcher 'latest' version 5.8.x to open.
How would otherwise be the right way to stop this image?

Cheers,

Complementary info:

  1. I deleted again the container created with the docker compose
  2. In the docker-compose.yml file I changed accessmod:latest for accessmod:5.7.17, and ran it
  3. Opened AM in the browser (v5.7.17)
  4. Opened AM in launcher (last version opened v5.8.1-alpha) and it worked
CONTAINER ID   IMAGE                             COMMAND                  CREATED              STATUS                        PORTS                                              NAMES
21f22acac423   fredmoser/accessmod:5.8.1-alpha   "Rscript --vanilla r…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:53556->3000/tcp, 0.0.0.0:53557->5000/tcp   accessmod_worker
0b2e3a51e453   fredmoser/accessmod:5.7.17        "Rscript --vanilla r…"   3 minutes ago        Up 3 minutes                  0.0.0.0:3180->3100/tcp                             downloads-am5-1

The v5.7.17 image stays IN USE as before (something weird in this PC), but then the now latest version is 5.8.0, so they are not connected by that tag, and both work simultaneously without problem.
All in all, it is weird that this only happens in the old machine and not the newer one.

Cheers

For docker compose, which command did you use ?

docker compose up
#or
docker compose up -d

When it's detached mode, the status stays up. Until you do a docker compose down. docker compose stop don't remove containers.

I don't know what's IN USE mean in that case.

I used docker compose up
I tried the other two functions now , as:

PS C:\Users\Carlos> docker compose stop
[+] Running 1/0
 - Container carlos-am5-1  Stopped                                                                                 0.0s
PS C:\Users\Carlos> docker compose down
[+] Running 2/2
 - Container carlos-am5-1  Removed                                                                                 0.1s
 - Network carlos_default  Removed                                                                                 0.2s

And the container stopped, but the image appears to be IN USE. I don't really know either what it means

I will close this issue because it's stale and I haven't encountered any other cases. The issue can be reopened if necessary, and all relevant information can be found using the issue search.