Connect for a single user/pass combo only works first time
In my mosquitto.conf file, I have set "allow_anonymous" to false and set "password_file" to the appropriate file path. Using mosquitto_passwd utility I add the username "myuser" with password "mypass". The first time a client connects using this combination, it is able to connect successfully (CONNACK with return code 0). After disconnecting, in subsequent connect attempts, the CONNACK returns code 5 ("Connection refused: not authorized"). If I create a new user/pass combo and use this it also works the first time. If the client tries to use an invalid user/pass combo CONNACK returns code 4 ("Bad username or password") which indicates that it is performing the password check.
Does anyone have any suggestion of why CONNACK always returns code 5 after the first successful connection?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- mosquitto Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Tony DiCamillo
- Solved:
- Last query:
- Last reply: