← Back to team overview

mosquitto-users team mailing list archive

Re: Windows Service: Can't find password file

 

Hi Steve,

I can't look at this until later, but I'd suggest using a complete
path rather than using %APPDATA% for now. I'll see about fixing it so
that the path can contain an environment variable for version 1.2,
which should be available any day now.

Cheers,

Roger


On Wed, Jul 31, 2013 at 7:34 PM, Steven Luke <stevejluke@xxxxxxxxx> wrote:
> I am trying to set up user authentication on my mosquitto server, so I
> figured I would start with using the already provided password file.
>
> *** in the conf file ***
> allow_anonymous false
> password_file pwfile.example
>
>
> This works when I run mosquitto from the command line:
>
> C:\Program Files\mosquitto>mosquitto -c mosquitto.conf
>
> When I launch mosquitto this way, I mosquitto starts and I need to log in to
> subscribe or publish messages.  But when I try to start the Windows service
> I get an error in the logs saying it can't find the password file.  The path
> to the service points to the same directory as above.  I have tried changing
> the path to %APPDATA%\mosquitto\pwfile.example and putting the file in
> <User>\AppData\Roaming\mosquitto\ or <User>\AppData\Local\mosquitto\ but to
> no avail.
>
> So, anyone know where I should put the password file to allow the Windows
> Service to run?
>
> OS: Windows 7, and Windows Vista.  32 bit.  Mosquitto version 1.1.2.
>
> Thanks for any help,
> Steve
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References