jmeter UDP plugin

391 views
Skip to first unread message

Janet Hong

unread,
Dec 7, 2016, 4:34:31 PM12/7/16
to jmeter-plugins
Hello,

This plugin used to send data with no issues to UDP.  But for some reason, it stopped working.  Below is the error.  Any ideas please?  Nothing on my laptop where this is running from is using the port specified.:

2016/12/07 16:31:28 ERROR - kg.apc.jmeter.samplers.UDPSampler: Cannot open channel java.net.SocketException: Already bound
at sun.nio.ch.Net.translateToSocketException(Unknown Source)
at sun.nio.ch.DatagramSocketAdaptor.bind(Unknown Source)
at kg.apc.jmeter.samplers.UDPSampler.connect(UDPSampler.java:155)
at kg.apc.jmeter.samplers.UDPSampler.processIO(UDPSampler.java:102)
at kg.apc.jmeter.samplers.AbstractIPSampler.sample(AbstractIPSampler.java:112)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.AlreadyBoundException
at sun.nio.ch.DatagramChannelImpl.bind(Unknown Source)
... 8 more

Thank you!
JH

Coltrey

unread,
Jan 4, 2017, 3:02:17 PM1/4/17
to jmeter-plugins
Use wireshark/tcpdump to validate whether or not the request is actually hitting the network.  In my case, I get the error, but the request is still sent.

tlisi...@gmail.com

unread,
Jan 13, 2017, 9:36:30 AM1/13/17
to jmeter-plugins

There is an issue in UDPSampler code. It should first bind local address/port before do .connect() on DatagramChannel class object.

Check 2 function getChannel() and connect() in UDPSampler.java class in https://github.com/undera/jmeter-plugins.git

Regards
TL

 

Andrey Pokhilko

unread,
Jan 13, 2017, 10:40:09 AM1/13/17
to jmeter-...@googlegroups.com

Hi,

Can you provide Pull Request that fixes this?

Andrey Pokhilko

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hakki...@gmail.com

unread,
Jun 30, 2017, 1:40:48 PM6/30/17
to jmeter-plugins
Hi,

I am getting the same error. Any plans to fix it?

Hakki Bagci
Reply all
Reply to author
Forward
0 new messages