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

port out of range:-1 #4

Closed
avana9 opened this issue Feb 23, 2017 · 19 comments
Closed

port out of range:-1 #4

avana9 opened this issue Feb 23, 2017 · 19 comments
Assignees
Labels

Comments

@avana9
Copy link

avana9 commented Feb 23, 2017

i am trying to publish a massage to IOT on port 8883 but detect an exception (in attach the configuration
issue
):

  1. if i use this Server Name: SIT-IOT....... the error is:
    2017/02/23 11:30:11 ERROR - net.xmeter.samplers.PubSampler: Peer disconnected java.io.EOFException: Peer disconnected
    at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.read(AbstractProtocolCodec.java:331)
    at org.fusesource.hawtdispatch.transport.TcpTransport.drainInbound(TcpTransport.java:657)
    at org.fusesource.hawtdispatch.transport.SslTransport.drainInbound(SslTransport.java:244)
    at org.fusesource.hawtdispatch.transport.TcpTransport$6.run(TcpTransport.java:538)
    at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:226)
    at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:96)
    at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)

  2. if i use this Server Name: ssl://SIT-IOT....... the error is:
    2017/02/23 11:37:08 ERROR - jmeter.JMeter: Uncaught exception: java.lang.IllegalArgumentException: port out of range:-1
    at java.net.InetSocketAddress.checkPort(Unknown Source)
    at java.net.InetSocketAddress.(Unknown Source)
    at org.fusesource.hawtdispatch.transport.TcpTransport$2.run(TcpTransport.java:416)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

@jinfahua
Copy link
Member

jinfahua commented Mar 7, 2017

Not necessary to add "ssl://" in 'Server name or IP", the protocol is set in the 'Protocols' dropdown box. Please make sure that the user name & password are correct.

@avana9
Copy link
Author

avana9 commented Mar 10, 2017

username and password are correct. I've followed these instructions: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support (section: Using the MQTT protocol directly) but the error is the same:
ERROR - net.xmeter.samplers.PubSampler: Peer disconnected java.io.EOFException: Peer disconnected

Moreover, where can i set "ClientId"? in MQTT Pub Sampler i see only the tag "ClientId prefix". If i set this filed with my deviceId, i detect another error.

@jinfahua
Copy link
Member

Possibly it's caused by not specifying a correct clientID. Currently, only "ClientId prefix" is supported, the fullname of clientID will be generated automatically with "ClientId_prefix" + random string. Please verify if you can use mosquitto client tools pub/sub messages (such as specify a not correct clientId will cause the same problem or not).

@god-pane
Copy link

where can i set "ClientId"? in MQTT Pub Sampler i see only the tag "ClientId prefix". If i set this filed with my deviceId, i detect another error.
Do you want to update later? the ClientId

@rende2005
Copy link
Contributor

Right now as mentioned in earlier comment, "ClientId" = "ClientId_prefix" + random string.

Maybe I missed something.. are you expecting the exact ClientId field that can be specified on this Pub Sampler UI? If so, can you elaborate how ClientId is being used in your application, should it be the same as your deviceId?

We can consider an option for ClientId without random string any way.

@god-pane
Copy link

yes, in my application the same as deviceId。
image

@jinfahua
Copy link
Member

Please try https://github.com/emqtt/mqtt-jmeter/releases/tag/v0.92_beta.

As in below screen, please uncheck 'add random client id suffix', and then the value of 'ClientId' will be used as client ID.

2017-04-24 11 01 37

@god-pane
Copy link

It's all right now, thank you

@jinfahua
Copy link
Member

OK, so close the issue and it will be released in 0.92 stable version.

@devendrajha
Copy link

Hi i have all proper username and password but using tcp i am not able to connect please help me out

@devendrajha
Copy link

image

@jinfahua
Copy link
Member

jinfahua commented Oct 8, 2017

Maybe it's caused by MQTT version, which was discussed in the thread - #21

Could you have a try for the temp fix attached in the thread?

@devendrajha
Copy link

In Jmeter testing for IOT-HUB this is TCP protocol or SSL if SSL then how i will manage certificate because i don't have any certificate

@jinfahua
Copy link
Member

Maybe you should consult Azure.

@devendrajha
Copy link

Here i have notice Jmeter doesn't supprot IOT-HUB because while sending multiple message using multiple thread with delay and without delay i am getting connection error as per Azure support they were saying it is try to connect with every thread science using iot hub we can connect once

IoT Hub only supports one active MQTT connection per device. Any new MQTT connection on behalf of the same device ID causes IoT Hub to drop the existing connection.

https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support

@jinfahua please reply with you value-able feedback

@devendrajha
Copy link

@jinfahua Here one thread working properly

@jinfahua
Copy link
Member

The current design is that all iterations for the same virtual user shares one same connection. But if you have multiple virtual users, then corresponding multiple connections will be created. But different pub & sub samplers in one thread-group DO NOT share the same connections, different samplers in same thread-group will created a separated connection.

Now we have an ongoing release that support share connection for pub/sub samplers in the same thread-group. In real user scenario is that one client can be either pub or sub (with the same connection).

@devendrajha
Copy link

Thanks jinfahua when can we aspect this new release ??

@jinfahua
Copy link
Member

The code is already in branch conn_share https://github.com/emqtt/mqtt-jmeter/tree/share_conn , you can check it out and build a binary by yourself. The new release will still take some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants