netmaker icon indicating copy to clipboard operation
netmaker copied to clipboard

Unable to set it up

Open wneiner opened this issue 3 years ago • 12 comments

Contact Details

[email protected]

What happened?

I have been struggling to set this up. Keep getting errors on the MQ. Any ideas?

Any assistance is appreciated.

ERROR: for rnq Cannot start service rnq: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting (root/mosquitto.conf" to rootfs at "/mosquitto/config/mosquitto.conf": mount /root/mosquitto.conf:/mosquitto/config/mosquitto.conf (via /proc/self/fd/6), flags: Ox5000: not a directory: unknown Are you trying to munt a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.

Version

v0.14.1

What OS are you using?

No response

Relevant log output

No response

Contributing guidelines

  • [X] Yes, I did.

wneiner avatar May 24 '22 21:05 wneiner

Is mosquito conf file in root dir?

mattkasun avatar May 24 '22 22:05 mattkasun

Hello,

Thank you for the reply.

Well initially I did the quick install script that is offered on the git page. This didn't function and I didn't know where it was creating the environment. So I went with building from the docker-compose like I am used to.

No matter what files I bring into that directory, it still gives the same error.

wneiner avatar May 25 '22 13:05 wneiner

Are you trying to munt a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

This looks like mosquitto.conf is being created as a directory rather than a file. Start over (remove any containers and volumes that already exist) and make sure that mosquitto.conf is a file before you run the compose file for the first time. The contents of mosquitto.conf are here.

BOZG avatar May 28 '22 16:05 BOZG

Hello,

Thank you for the reply. Initially I wasn't moving anything over. Normally in the past with docker-compose it pulls the necessary files by itself. I did try manually placing the files but that resulted in the same error. I will see if I can reproduce the file/folder structure and run it again.

Thank you,

wneiner avatar May 31 '22 13:05 wneiner

Tried it again. Same error. Made sure that the mq file was in the root.

This is what the structure looks like:

  • /home/ubuntu/netmaker-docker-compose -Caddyfile -docker-compose.yml -Dockerfile -mosquitto.conf

wneiner avatar May 31 '22 15:05 wneiner

Judging by the error, you're trying to mount the mosquitto conf from /root while according to structure (unless something went weird in the formatting), your mosquitto conf is located at /home/ubuntu/netmaker-docker-compose/mosquitto.conf

So just to avoid any confusion, are you mounting mosquitto.conf in your compose file like this:

volumes:
   - /home/ubuntu/netmaker-docker-compose/mosquitto.conf:/mosquitto/config/mosquitto.conf

Or like this:

volumes:
  - /root/mosquitto.conf:/mosquitto/config/mosquitto.conf

BOZG avatar May 31 '22 15:05 BOZG

I left it as default in the docker-compose. I figured root would be were the docker-compose.yml file was located as that is the directory I am running it all from.

I will adjust those paths and see what happens.

Thank you,

wneiner avatar May 31 '22 15:05 wneiner

Great! that appeared to do it. Now it looks like an issue with a origin cert for cloudflare. SSL mismatch.

Thank you!

wneiner avatar May 31 '22 16:05 wneiner

Are you proxying the DNS for the broker? Mosquitto doesn't like that so try turning it off to see if that helps. Not sure if there's a way to get it to work with the proxy though.

BOZG avatar May 31 '22 16:05 BOZG

I do not think it is being proxied. Per the docker-compose file I left those entries at default. Didn't edit the proxy settings.

Thank you,

wneiner avatar May 31 '22 16:05 wneiner

I do not think it is being proxied. Per the docker-compose file I left those entries at default. Didn't edit the proxy settings.

Thank you,

Sorry, I meant in Cloudflare. Subdomains in Cloudflare are normally proxied by default which Mosquitto doesn't like. You'll need to open your DNS dashboard in Cloudflare and disable the proxy on the broker entry.

BOZG avatar May 31 '22 16:05 BOZG

Hello,

Returned from meetings and tested that out. Still seeing the same result.

This is just crazy I am having so many issues. Normally this docker stuff is just easy.

I appreciate your help though!

wneiner avatar May 31 '22 19:05 wneiner

Is this still an issue?

mattkasun avatar Sep 26 '22 15:09 mattkasun