mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

Running Mosquitto in Windows container fails

Open rajeshanayaka opened this issue 7 years ago • 10 comments

Running Mosquitto 1.5 64 bit with Win64 Open SSL in Windows container , mosquitto.exe is not starting at all no error being displayed as well

rajeshanayaka avatar Dec 06 '18 05:12 rajeshanayaka

Which mosquitto, 1.5.4? Is is running old normal windows or in a windows container in docker? If is it normal windows then please post the output of mosquitto.exe -v (-v is for verbose) You migmt me missing the openssl installer, it is described in the readme.

Laro88 avatar Dec 06 '18 07:12 Laro88

Yes I am using Mosquitto 1.5.4 X64 in Windows 10 - 1803 with Docker for Windows version 18.09.0 stable Yes I am using with -v (verbose) switch and it works fine in Local computer.

However when I run it on Windows container (microsoft/windowsservercore) its not working.

Previous versions are also not working in container. I have ensured Win64 Open SSL 1.1.0 binaries and pthread (x64) binaries are copied to mosquitto directory.

rajeshanayaka avatar Dec 06 '18 08:12 rajeshanayaka

Have you tried to run a clean instance on docker? Just to check that docker is fine? I am running docker 18.09.0 and the eclipse-mosquitto behaves as expected.

https://hub.docker.com/_/eclipse-mosquitto/ "docker run -it -p 1883:1883 -p 9001:9001 -v eclipse-mosquitto"

Laro88 avatar Dec 06 '18 09:12 Laro88

linux support not enabled in my windows :

PS C:> docker run eclipse-mosquitto Unable to find image 'eclipse-mosquitto:latest' locally latest: Pulling from library/eclipse-mosquitto C:\Program Files\Docker\docker.exe: no matching manifest for unknown in the manifest list entries.

rajeshanayaka avatar Dec 06 '18 10:12 rajeshanayaka

I have never seen that one before, normally linux images works fine on windows boxes. Can you post your procedure for putting mosquitto on the windowsservercore, then i can try it out on my docker?

Laro88 avatar Dec 06 '18 11:12 Laro88

If got the same problem;

Buildfile;

FROM mcr.microsoft.com/windows/servercore:1809

COPY mosquitto\* /mosquitto

ENTRYPOINT CD c:/mosquitto && mosquitto -v

The folder mosquitto is the folder i copied from program files on the host computer.

desertspider avatar May 03 '19 07:05 desertspider

Fixen by adding;

ADD https://aka.ms/vs/15/release/VC_redist.x64.exe /download/vc_redist.x64.exe
RUN C:\download\vc_redist.x64.exe /quiet /install

desertspider avatar May 04 '19 10:05 desertspider

And for nanoserver;

FROM mcr.microsoft.com/windows/nanoserver:1809

COPY vcruntime140.dll /Windows/System32/vcruntime140.dll

COPY mosquitto\* /mosquitto

ENTRYPOINT CD c:/mosquitto && mosquitto -v

desertspider avatar May 04 '19 11:05 desertspider

Can this be closed now then?

ralight avatar May 22 '19 10:05 ralight

Just thought I'd post my error message as I can't run the docker image on windows either.

C:\>docker run --name mq -it -p 1883:1883 -p 9001:9001  eclipse-mosquitto
Unable to find image 'eclipse-mosquitto:latest' locally
latest: Pulling from library/eclipse-mosquitto
docker: no matching manifest for windows/amd64 10.0.17763 in the manifest list entries.
See 'docker run --help'.

Will try workarounds and see if they help me.

span avatar Mar 17 '22 14:03 span