Cannot connect to docker version via browser

Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
kalle42
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: Mon Sep 23, 2019 3:20 pm

Cannot connect to docker version via browser

Post by kalle42 »

Hello,

This morning I was litte bit more lucky with running the docker version of openkm/openkm-ce under Docker Desktop on my win10 system. From time to time the yesterday postet problem occurred but mostly it startet without severe error messages ...

But my second problem, that I had already mentioned yesterday is still there: I cannot connect to openkm on the virtual machine via a browser. I' m confused a litte. The openkm docker example says connect to http://container-ip:8080/ The first IP-Address I found was the Internal Virtual Switch of Docker Desktop which per default on 10.0.75.0. But connecting to 10.0.75.1:8080 did not work.

Inspecting the docker container brought me to the container-ip 172.17.0.2 and gateway 172.17.0.1. But also 172.17.0.2:8080 does not work. That did not change even if changed the Internal Virtual Switch of Docker Desktop to 172.17.0.0 what leads to in Windows to an Ethernet-Adapter vEthernet (DockerNAT) with IP-Adress 172.17.0.1 instead of 10.0.75.0.
Now I successfully can ping 172.17.0.1 but calling 172.17.0.1:8080 and 172.17.0.2:8080 does still not work and ends with this error message
This website could not be found.
Error Code: INET_E_RESOURCE_NOT_FOUND

I tried Microsoft Edge and also Mozilla FireFox.

Something does not seem to fit right. I would be glad, if someone knew a solution,
Kalle

bieli
Senior Boarder
Senior Boarder
Posts: 42
Joined: Thu Jan 22, 2015 9:03 am
Location: Zaragoza, Spain

Re: Cannot connect to docker version via browser

Post by bieli »

Hello,

I also have running openkm-ce in a Docker container and it's working well.

If you use NAT in the container, then you can call http://docker-ip:8080 (not container-ip!)
But maybe the port is already used in your docker host. So maybe it's better to use another port like 8888.
Starting the container you can change it.

Regards,
Bieli

kalle42
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: Mon Sep 23, 2019 3:20 pm

Re: Cannot connect to docker version via browser

Post by kalle42 »

Hello bieli,

thank you for your help. I tried a lot in the last week and I learned a lot in the last week.

But the main problem, that prevented the access to openKm in the docker container was the missing port assigning in the docker-hub example

Code: Select all

    $ docker run openkm/openkm-ce
does definitely not run under Windows PowerShell. it has to be

Code: Select all

    $ docker run -p 8080:8080 openkm/openkm-ce
to connect the hosts 8080 port to the exposed 8080 port of the container. It took me some hours over the detour of some less complex containers and comparing and trying to find out why they worked and the openkm container did not.

Finally I was astonished that not it complexity was what made problems.
Anyway, thank you!

bieli
Senior Boarder
Senior Boarder
Posts: 42
Joined: Thu Jan 22, 2015 9:03 am
Location: Zaragoza, Spain

Re: Cannot connect to docker version via browser

Post by bieli »

Please try to add:

--network=host
Or
--net=host

to your docker run command (depends on your docker version)

Regards,
Stefan

Post Reply