Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence not work !!! #661

Closed
sxyandapp opened this issue Jul 20, 2021 · 4 comments
Closed

Persistence not work !!! #661

sxyandapp opened this issue Jul 20, 2021 · 4 comments

Comments

@sxyandapp
Copy link

Environment

  • OS: centos 7
  • docker version: 19.03.5
  • emqx docker image version: emqx/emqx:4.3.5

Description

When I try to persist, it report an error
my docker-compose:

    image: emqx/emqx:4.3.5
    environment:
      - EMQX_HOST=127.0.0.1
    ports:
      - 1883:1883
      - 18083:18083
    volumes:
      - /path/to/mqtt/data:/opt/emqx/data
      - /path/to/mqtt/log:/opt/emqx/log
      - /path/to/mqtt/etc:/opt/emqx/etc

error message:

2021-07-20T07:49:35.951093+00:00 [error] Could not open file (/opt/emqx/etc/emqx.conf) for Reason enoent
@k32
Copy link

k32 commented Jul 20, 2021

Hello,
The broker doesn't start, because it can't find its configuration file /opt/emqx/etc/emqx.conf. Could you please check if there is emqx.conf file in /path/to/mqtt/etc directory?

@sxyandapp
Copy link
Author

Hello,
The broker doesn't start, because it can't find its configuration file /opt/emqx/etc/emqx.conf. Could you please check if there is emqx.conf file in /path/to/mqtt/etc directory?

you mean that i have to create the emqx.conf manual ?

@k32
Copy link

k32 commented Jul 20, 2021

Yes, this file is edited by the user. You can extract the default /opt/emqx/etc/emqx.conf from the container.
But our docker image actually supports getting configuration from the environment variables: https://docs.emqx.io/en/broker/v4.3/configuration/environment-variable.html
Instead of creating /path/to/mqtt/etc:/opt/emqx/etc volume, you can just set the environment variables.

@sxyandapp
Copy link
Author

Yes, this file is edited by the user. You can extract the default /opt/emqx/etc/emqx.conf from the container.
But our docker image actually supports getting configuration from the environment variables: https://docs.emqx.io/en/broker/v4.3/configuration/environment-variable.html
Instead of creating /path/to/mqtt/etc:/opt/emqx/etc volume, you can just set the environment variables.

got it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants