emqx-docker
emqx-docker copied to clipboard
errors mounting /opt/emqx/etc/
- [x] BUG REPORT
- [ ] FEATURE REQUEST
BUG REPORT
Expected behavior
should allow bind mount of /opt/emqx/etc/
Actual behavior
emqx fails to launch because it can't find the /etc directory
I would like to set and persist /etc on my host machine
running 3.2.beta2 with
docker run -dit --restart always --name emqx-mqtt-broker -v /mnt/data/emqx:/opt/emqx/etc -p 18083:18083 -p 1883:1883 emqx/emqx:latest
but if I do a
docker logs --tail 50 --follow --timestamps emqx-mqtt-broker
I see multiple errors where emqx can't find the etc files. Looks like creating that external bindmount volume keeps emqx from finding opt/emqx/etc folder. emqx runs fine without the volume bindmount
https://github.com/emqx/emqx-docker/issues/115 Don't know if this is still a bug or simply your dockerfile doesn't support making this bind mount volume. Either way it should otherwise how can one customize emqx.
2019-07-02T17:39:01.728970232Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.729067356Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:01.775977380Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.793393603Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:01.823762400Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.840449168Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:01.875609446Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.887957689Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:01.923439675Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.927536700Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:01.954070387Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.957073376Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:01.993578232Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:01.997092802Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.046112150Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.060369344Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.132589227Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.152711522Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.185413352Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.193695778Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.223887826Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.238670018Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.277986530Z sed: /opt/emqx/etc/emqx.conf: No such file or directory
2019-07-02T17:39:02.337122880Z sed: /opt/emqx/etc/emqx.conf: No such file or directory
2019-07-02T17:39:02.365872059Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.375367521Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.400284215Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.407528603Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.461008393Z cat: can't open '/opt/emqx/etc/emqx.conf': No such file or directory
2019-07-02T17:39:02.470264398Z cat: can't open '/opt/emqx/etc/plugins/*': No such file or directory
2019-07-02T17:39:02.534529687Z vm.args needs to have a -name parameter.
2019-07-02T17:39:02.534593270Z -sname is not supported.
2019-07-02T17:39:02.534606395Z tail: can't open '/opt/emqx/log/erlang.log.1': No such file or directory
2019-07-02T17:39:02.534618353Z tail: no files
2019-07-02T17:39:02.559967295Z /opt/emqx/bin/emqx_ctl: line 40: echoerr: not found
2019-07-02T17:39:03.590881447Z ['2019-07-02T17:39:03Z']:waiting emqx
2019-07-02T17:39:03.630113792Z /opt/emqx/bin/emqx_ctl: line 40: echoerr: not found
2019-07-02T17:39:04.641066314Z ['2019-07-02T17:39:04Z']:waiting emqx
2019-07-02T17:39:04.675385429Z /opt/emqx/bin/emqx_ctl: line 40: echoerr: not found
2019-07-02T17:39:05.689052648Z ['2019-07-02T17:39:05Z']:waiting emqx
2019-07-02T17:39:05.725605630Z /opt/emqx/bin/emqx_ctl: line 40: echoerr: not found
2019-07-02T17:39:06.752372506Z ['2019-07-02T17:39:06Z']:waiting emqx
2019-07-02T17:39:06.792804930Z /opt/emqx/bin/emqx_ctl: line 40: echoerr: not found
2019-07-02T17:39:07.809350263Z ['2019-07-02T17:39:07Z']:waiting emqx
2019-07-02T17:39:07.847082031Z /opt/emqx/bin/emqx_ctl: line 40: echoerr: not found
2019-07-02T17:39:08.852578908Z ['2019-07-02T17:39:08Z']:waiting emqx
2019-07-02T17:39:08.858218677Z ['2019-07-02T17:39:08Z']:timeout error
When the host directory is mounted into the container, the contents of the host directory override the contents of the container directory, so if the host's /mnt/data/emqx
directory is empty, an error is reported.
what if I just want to persistent my configurations in case of container restarting? but don't want to prepare those files myself (want to use container default ones)