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

2.0.12 Error: Invalid persistence value (true #2297

Closed
xbmcnut opened this issue Sep 3, 2021 · 20 comments
Closed

2.0.12 Error: Invalid persistence value (true #2297

xbmcnut opened this issue Sep 3, 2021 · 20 comments
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@xbmcnut
Copy link

xbmcnut commented Sep 3, 2021

I was running 2.0.10 as a Docker container on a Synology NAS and then 8hrs ago, Watchtower updated automatically to 2.0.12 and the container now boot loops with the following error:
Error: Invalid persistence value (true

For reference, here is my working config that was functional under .10 and also under .11 that I've now rolled back to.

persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
# password_file /mosquitto/config/pwfile
# include_dir /mosquitto/config/conf.d
allow_anonymous true 
listener 1883 <myserveripaddress>
@khaeljy
Copy link

khaeljy commented Sep 3, 2021

Hi,

I have the same issue.

persistence true
persistence_file mosquitto.db
persistence_location /mosquitto/data/

@takthetank
Copy link

Me too, after watchtower updated to latest version:

Error: Invalid allow_anonymous value (true).
Error found at /mosquitto/config/mosquitto.conf:1.

The mosquitto.conf:

allow_anonymous true
listener <port> <ip>

@rikardronnkvist
Copy link

Same here...

).30657904: Error: Invalid log_type value (debug
1630657904: Error found at /mosquitto/config/mosquitto.conf:1.
).30657906: Error: Invalid log_type value (debug
1630657906: Error found at /mosquitto/config/mosquitto.conf:1.

And the minimalistic config:

log_type debug

Pulling latest to a Photon OS VM with Docker version 19.03.15, build 99e3ed8

@Bewo
Copy link

Bewo commented Sep 3, 2021

Hi!
I had a similar problem in my environment. The error message was the same. But i've not allowed anonymus login.

In the docs is written:

If you are using the per_listener_settings true option to have separate security settings per listener, you must place the password file option after the listener it is for.

So my old conf was:

per_listener_settings true
allow_anonymous false
password_file /etc/mosquitto/conf.d/credentials

And add the listener explicitly (instead of default) solves it for me:

per_listener_settings true
allow_anonymous false
listener 1883
password_file /etc/mosquitto/conf.d/credentials

Maybe this information is helpful for somebody. :-)

@mwilky
Copy link

mwilky commented Sep 3, 2021

Same for me

The first entry I had in mosquitto.conf was:

allow_anonymous true which it gave the error for.

I then removed this and the next line was persistence true which it then errored for.

Not sure which other config entries are affected yet

@wegotourselvesareader
Copy link

wegotourselvesareader commented Sep 3, 2021

Add me to the list, too.

Mine is currently tripping out on "Error: Invalid allow_anonymous value (true", according to the Docker container's log.

@pesor
Copy link

pesor commented Sep 3, 2021

Same issue here, reverted to version 2.0.11, and wait for fix before next upgrade.

@powersra
Copy link

powersra commented Sep 3, 2021

Same here, fell back to 2.0.11.

@lexitus
Copy link

lexitus commented Sep 3, 2021

Upgraded to 2.0.12 and encountered this error. For me changing the config file to LF line endings instead of CRLF fixed the issue.

@wegotourselvesareader
Copy link

Upgraded to 2.0.12 and encountered this error. For me changing the config file to LF line endings instead of CRLF fixed the issue.

That's fantastic. I just did the same on mine, and now the 2.0.12 container loads successfully.

@powersra
Copy link

powersra commented Sep 3, 2021

Upgraded to 2.0.12 and encountered this error. For me changing the config file to LF line endings instead of CRLF fixed the issue.

Great tip, thanks for sharing. I too converted the config file EOL to Unix LF and am now up and running on 2.0.12.

@NMe84
Copy link

NMe84 commented Sep 3, 2021

When I saw that the line ending was included in the logs I messed around with it a bit. It looks like you don't have change the line endings as a workaround, you can also add # (space + pound sign) after every line with actual configuration in the config file. That way the line ending is never interpreted as part of the value.

Also, I only had LF line endings to begin with and it's still broken for me unless I use my workaround.

Something's definitely messed up here.

@AliMickey
Copy link

AliMickey commented Sep 4, 2021

Same issue here, although removing

persistence true
persistence_location /mosquitto/data/

lets it continue normally with the following only:

password_file /mosquitto/config/mosquitto.passwd
listener 1883 192.168.0.2

Edit: Also fixed with changing to LF endings.

@to4ko
Copy link

to4ko commented Sep 4, 2021

Same issue here, although removing

persistence true
persistence_location /mosquitto/data/

lets it continue normally with the following only:

password_file /mosquitto/config/mosquitto.passwd
listener 1883 192.168.0.2

Edit: Also fixed with changing to LF endings.

hi! Could you please advise easy way to do that change?

@wegotourselvesareader
Copy link

Edit: Also fixed with changing to LF endings.

hi! Could you please advise easy way to do that change?

https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf-in-a-bash-script

@lexitus
Copy link

lexitus commented Sep 4, 2021

I guess it may be related to the changes in this commit : 4e146b7

I don't read c well enough to understand exactly what the problem is.

@to4ko
Copy link

to4ko commented Sep 4, 2021

Edit: Also fixed with changing to LF endings.

hi! Could you please advise easy way to do that change?

https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf-in-a-bash-script

thanks! in my case issu was solved by siply removing incorrect link to pid_file on one machine. on the second one - updated from 2.0.11 to 2.0.12 without any issues

@khaeljy
Copy link

khaeljy commented Sep 6, 2021

Edit: Also fixed with changing to LF endings.

hi! Could you please advise easy way to do that change?

https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf-in-a-bash-script

Thanks, convert DOS to Unix new line solve the issue.

@T81
Copy link

T81 commented Sep 21, 2021

Upgraded to 2.0.12 and encountered this error. For me changing the config file to LF line endings instead of CRLF fixed the issue.

Did not work for me
Indeed this was the problem. Solved

@ralight
Copy link
Contributor

ralight commented Sep 23, 2021

Thanks for the comments everyone and sorry for the delay in responding (blame covid). This is now fixed in the fixes branch and will be part of the next release before the end of the month.

In the meantime, using frodos <your config file> should fix the problem.

@ralight ralight added Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug labels Sep 23, 2021
@ralight ralight added this to the 2.0.13 milestone Sep 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests