"Invalid arugment passed" on 'mainflux-cli provision test'

50 views
Skip to first unread message

Oliver Layer

unread,
May 12, 2020, 6:43:44 AM5/12/20
to Mainflux
Hello guys,

I set up my environment as described in https://mainflux.readthedocs.io/en/latest/getting-started/. I checked out the commit tagged with 0.10.0, but also tried latest.

After running 'make run' the docker composition starts, without showing any error at first glance. After a while,
mainflux-mqtt   | {"level":"error","message":"Failed to create MQTT publisher: failed to connect to MQTT broker","ts":"2020-05-12T10:34:36.043693355Z"}
mainflux
-mqtt exited with code 1

repeatedly spams the log. (Full log in attachments)

The main problem is now that I can't set up test povisioning.
Using the CLI previously built with 'make cli', then using './build/mainflux-cli provision test' leads to "invalid argument passed" in the terminal.
Nevertheless, running './build/mainflux-cli version' shows the correct output "0.10.0".

Environment:
docker --version shows Docker version 18.09.9, build 039a7df9ba
docker-compose --version shows docker-compose version 1.24.1, build 4667896b

Would be great if you guys can help me!

Best regards,
Oliver
mainflux.log

Nikola Marcetic

unread,
May 12, 2020, 7:24:15 AM5/12/20
to Mainflux
Hi Oliver,

Thanks for reporting this. We had some changes regarding to MQTT adapter, let us check and test internally. Will get back to you ASAP.

Dušan Borovčanin

unread,
May 12, 2020, 11:21:06 AM5/12/20
to Mainflux
Hi Oliver,

It is probably caused by VerneMQ not being able to accept connections. MQTT adapter depends on VerneMQ (`depends_on` in our docker-compose file), but compose waits only for service to get running, not for service to be able to accept connections (https://docs.docker.com/compose/startup-order/). After a couple of restarts, the MQTT adapter should be fine (when VerneMQ gets into a healthy state).

Best regards,
Dusan

Oliver Layer

unread,
May 12, 2020, 11:50:50 AM5/12/20
to Mainflux
Hi,

thanks for the quick responses. I think I am having two seperate issues:
- My main problem is that I can't use the CLI to execute 'mainflux-cli provision test', as I always get back 'invalid argument passed'. (I can't provide a more detailed error message, as I get back exactly that)
- One thing that I noticed was the mainflux-mqtt docker-compose issue, which is probably not related to the first issue. Nevertheless, it still keeps exiting with code 1 every 30 secs, even if I leave it open for more than 5 mins. So it tries to connect to the broker, but never seems to succeed.

My main problem is that I can't seem to get the server provisioned using the CLI, which makes it hard to try anything else.
Do you have any idea on how to get it provisioned using the CLI? I tried the self built CLI aswell as the 0.10.0 release CLI, both always return 'invalid argument passed' upon test provisioning.

Best regards,
Oliver

Drasko DRASKOVIC

unread,
May 12, 2020, 12:05:38 PM5/12/20
to Oliver Layer, Mainflux
On Tue, May 12, 2020 at 5:50 PM Oliver Layer <oliv...@gmail.com> wrote:
>
> Hi,
>
> thanks for the quick responses. I think I am having two seperate issues:
> - My main problem is that I can't use the CLI to execute 'mainflux-cli provision test', as I always get back 'invalid argument passed'. (I can't provide a more detailed error message, as I get back exactly that)

I think there was a limitation on password length of minimum 6 or 8 chars.

> - One thing that I noticed was the mainflux-mqtt docker-compose issue, which is probably not related to the first issue. Nevertheless, it still keeps exiting with code 1 every 30 secs, even if I leave it open for more than 5 mins. So it tries to connect to the broker, but never seems to succeed.

We changed protobuf structs recently, probably need to purge old
docker images and fetch new ones.

BR,
Drasko

Oliver Layer

unread,
May 13, 2020, 9:48:56 AM5/13/20
to Mainflux
Hi Drasko,

mainflux-cli provision test doesn't allow for setting a manual password (at least thats whats stated in --help, as it doesn't take any further parameter), and as far as I understood, the password should be generated by the CLI then.
Correct me if I'm wrong, but shouldn't mainflux-cli provision test just work out of the box?

Best regards
Reply all
Reply to author
Forward
0 new messages