Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] paho-dev Digest, Vol 64, Issue 5

IS this Environment variable set on  the main context of the program itself?

On Mon, Apr 10, 2017 at 4:17 PM, <paho-dev-request@xxxxxxxxxxx> wrote:
Send paho-dev mailing list submissions to
        paho-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://dev.eclipse.org/mailman/listinfo/paho-dev
or, via email, send a message with subject or body 'help' to
        paho-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
        paho-dev-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of paho-dev digest..."


Today's Topics:

   1. (no subject) (manish kumar)
   2. Re: Debug message for packet transmission from paho client c
      (Ian Craggs)
   3. Re: (no subject) (James Sutton1)


----------------------------------------------------------------------

Message: 1
Date: Mon, 10 Apr 2017 14:19:49 +0530
From: manish kumar <mkj.online@xxxxxxxxx>
To: General development discussions for paho project
        <paho-dev@xxxxxxxxxxx>
Subject: [paho-dev] (no subject)
Message-ID:
        <CALaYTT+X0ZqV8-C9DXQwKd9+W+YftTq+m_w4_7G67U76xZi79w@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Is there some issue with java client when connecting with username &
password ???

paho JS client it works but from java client it doesn't.
I have this code

    MqttConnectOptions conOpt = new MqttConnectOptions();
    conOpt.setCleanSession(false);
    conOpt.setUserName("test5");
    conOpt.setPassword("123".toCharArray());
    MqttDefaultFilePersistence filePersistence = new
MqttDefaultFilePersistence("/home/manish/Downloads/mqttPersist");
    client = new MqttAsyncClient(appProps.getProperty("mqtt.broker"),
            appProps.getProperty("mqtt.clientId"), filePersistence);
    client.setCallback(this);
    client.connect(conOpt, new IMqttActionListener() {
        @Override
        public void onSuccess(IMqttToken imt) {
            try {
                client.subscribe(Constants.INTERNAL_TOPICS,
Constants.INTERNAL_TOPIC_QOS);
            } catch (MqttException ex) {
                ex.printStackTrace();
            }
        }

        @Override
        public void onFailure(IMqttToken imt, Throwable thrwbl) {
            thrwbl.printStackTrace();
        }
    });

i am getting this exception

Bad user name or password (4)
at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.
createMqttException(ExceptionHelper.java:28)
at org.eclipse.paho.client.mqttv3.internal.ClientState.
notifyReceivedAck(ClientState.java:885)
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.
run(CommsReceiver.java:118)
at java.lang.Thread.run(Thread.java:745)

emqt console

06:47:36.456 [error] Client(notification_subs_bot@127.0.0.1:50741):
Username 'undefined' login failed for username_or_password_undefined
06:47:36.463 [error] Client(notification_subs_bot@127.0.0.1:50742):
Username 'undefined' login failed for username_or_password_undefined

According paho documentation public void setPassword(char[] password) So
here i am passing char[] as paasword
--
*Thanks,*
*Manish Kumar*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/paho-dev/attachments/20170410/6344b401/attachment.html>

------------------------------

Message: 2
Date: Mon, 10 Apr 2017 11:31:27 +0100
From: Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxx.uk>
To: paho-dev@xxxxxxxxxxx
Subject: Re: [paho-dev] Debug message for packet transmission from
        paho client c
Message-ID:
        <1bf784fd-4a6d-f3ae-855d-0b4ec132866d@modelbasedtesting.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed

There are environment variables:

MQTT_C_CLIENT_TRACE=ON, or a filename (ON goes to stdout)

MQTT_C_CLIENT_TRACE_LEVEL=PROTOCOL (other options include ERROR, MINIMUM)

MQTT_CLIENT_TRACE_MAX_LINES=1000 (the max no of lines in a trace file)

On 09/04/17 09:26, kus wrote:
> Hii,
> Is there any debug flag or any config client in paho c client which i
> can enable in order to see whether the packet  details which are
> transmitted and would also show any message for those packets which
> cannot be sent somehow to the broker and log it in a file .
> Thanks
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/paho-dev

--
Ian Craggs
icraggs@xxxxxxxxxx
Eclipse Paho Project Lead; Committer on Eclipse Mosquitto
Tech Lead in IBM Watson IoT Platform



------------------------------

Message: 3
Date: Mon, 10 Apr 2017 10:46:51 +0000
From: "James Sutton1" <james.sutton@xxxxxxxxxx>
To: paho-dev@xxxxxxxxxxx
Subject: Re: [paho-dev] (no subject)
Message-ID:
        <OF488356DA.485B8251-ON002580FE.003B03B0-002580FE.003B38D0@xxxxxxxx.collabserv.com>

Content-Type: text/plain; charset="us-ascii"

An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/paho-dev/attachments/20170410/b62bd17a/attachment.html>

------------------------------

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

End of paho-dev Digest, Vol 64, Issue 5
***************************************


Back to the top