[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-28 Thread Timothy Bish (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14518103#comment-14518103
 ] 

Timothy Bish commented on AMQ-5155:
---

The main problem here is that the StompSocket is not providing a valid received 
counter value for the inactivity monitor to track continuing read progress, and 
a few other nits that needs fixing.  I also looks like there might be a memory 
leak in play also but I'm still investigating that.

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff, 
> firefox_bug_example1.pcapng, patchfile.txt
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-21 Thread Chad Kelly (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14506059#comment-14506059
 ] 

Chad Kelly commented on AMQ-5155:
-

Please retest 5.12-SNAPSHOT in your environment using Firefox. I have developed 
a patch and want to confirm that the problem still persists in other 
environments under more extensive testing. The example fails under Fedora 
21/Firefox.

1) download the latest 5.12-SNAPSHOT at 
https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.12-SNAPSHOT/
2) bin/activemq start xbean:examples/conf/activemq-demo.xml
3) open three instances of Firefox (because it has greater time variation) to 
http://localhost:8161/demo/websocket/index.html and view for 20 minutes.

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff, 
> firefox_bug_example1.pcapng, patchfile.txt
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-20 Thread Chad Kelly (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14504267#comment-14504267
 ] 

Chad Kelly commented on AMQ-5155:
-

Hi Timothy,
The included patch will give the read check thread a 2nd chance (via 1 second) 
before exception and termination. It also designs the read check thread and 
write check thread to be nearly identical. I will implement other approaches 
should this one NOT be satisfactory. The attached patchfile.txt is for 
“/activemq-client/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java”.

I believe there is a fundamental design problem with AMQ heartbeats, because 
the timing of web browsers heartbeats has a cadence equal to the timing for AMQ 
to check heartbeats. Eventually, due to very small changes in time, the web 
browser heartbeat can eventually cross over AMQ checks for heartbeats. In the 
included example, the web browser client is sending at the rate of 10 seconds, 
and AMQ server is also checking at the rate of 10 seconds. Longer term testing, 
with a variety of websocket enabled browsers, show that the heartbeats can 
cross over. 

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff, 
> firefox_bug_example1.pcapng, patchfile.txt
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-17 Thread Chad Kelly (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501051#comment-14501051
 ] 

Chad Kelly commented on AMQ-5155:
-

Can someone confirm this bug occurs in their environment? If so, this bug 
relates to AMQ-5155 and AMQ-4674. I recommend that the ActiveMQ STOMP example 
should work as is, regardless of using parameters like 
transport.hbGracePeriodMultiplier.

Testing up to 12 continuous hours suggest that Fedora 21 with Chrome 
39.0.2171.95 (x64) and Chrome 41.0.2272.118 (x32) works correctly for all test 
cases. Wireshark (via linux on localhost) shows that WebSocket/ActiveMQ always 
sends its “\n” (PONG) followed by Chrome sending its “\n” (PING). Chrome's 10 
second timer tends to increase very slightly over time by ~+10.00453 per PING.

Fedora 21 with Firefox 34 (x64) and Firefox 37 (x32) ONLY works ~25% of the 
time. ~75% of the time Firefox FAILS after 50 to 500 PINGs. Firefox will 
transmit at ~10 second interval like WebSocket/ActiveMQ. Wireshark shows that 
WebSocket/ActiveMQ continuously works when it sends its “\n” (PONG) followed by 
Firefox sending its “\n” (PING). However, Wireshark show that when Firefox 
sends its “\n” (PING) before WebSocket/ActiveMQ sends it “\n” (PONG), the 
InactivityIOException exception will occur. For example, in the attached PCAP 
file titled “firefox_bug_example1.pcapng, frame number 97 has Firefox's 
“\n”(PING) first followed by frame number 99 with WebSocket/ActiveMQ “\n” 
(PONG), and then within 10 seconds, an InactivityIOException exception occurs.

Opening Web Socket...
Web Socket Opened...
>>> CONNECT
accept-version:1.1,1.0
heart-beat:1,1
login:guesttgg
passcode:guest

<<< CONNECTED
server:ActiveMQ/5.12-SNAPSHOT
heart-beat:1,1
session:ID:c1-39862-1429234022608-4:2
version:1.1

connected to server ActiveMQ/5.12-SNAPSHOT
send PING every 1ms
check PONG every 1ms
connected to Stomp
>>> SUBSCRIBE
id:sub-0
destination:/queue/test (same behavor for /topic/test)

<<< PONG
>>> PING
... 395 times this case, but 50-500 times in general
<<< PONG
>>> PING
<<< PONG
>>> PING
>>> PING
>>> PING
did not receive server activity for the last 20003ms
Whoops! Lost connection to ws://localhost:61614/stomp


In data/activemq.log
2015-04-17 15:49:12,750 | WARN  | Transport Connection to: 
StompSocket_919027643 failed: 
org.apache.activemq.transport.InactivityIOException: Channel was inactive for 
too (>1) long: StompSocket_919027643 | 
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ 
InactivityMonitor Worker


> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff, 
> firefox_bug_example1.pcapng
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> F

[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-09 Thread Timothy Bish (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487732#comment-14487732
 ] 

Timothy Bish commented on AMQ-5155:
---

Keep testing it and report back if you find any other gremlins.  

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-09 Thread Chad Kelly (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487704#comment-14487704
 ] 

Chad Kelly commented on AMQ-5155:
-

You are correct, using /topic/test works as expected. I performed various tests 
and no issues to report.
Thank you very much for solving this bug. This is the one feature I needed in 
order to use ActiveMQ. I appreciate everyone's contribution in resolving this 
problem and look forward to the release of 5.12. 

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-09 Thread Timothy Bish (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487682#comment-14487682
 ] 

Timothy Bish commented on AMQ-5155:
---

This is not a bug, the default address  string in that example is: /queue/test 
which means that the messages are load balanced across connections, try it with 
/topic/test and it should work as expected. 

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-09 Thread Chad Kelly (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487669#comment-14487669
 ] 

Chad Kelly commented on AMQ-5155:
-

Even though the above bug was fixed, a related bug now occurs. This may deserve 
a new ticket? Can someone confirm the following:
1) Download a recent 5.12 SNOPSHOT that works and contains the patch above. I 
used 
https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.12-SNAPSHOT/apache-activemq-5.12-20150407.48-96-bin.tar.gz
2) bin/activemq console xbean:examples/conf/activemq-demo.xml
3) open two browsers (firefox/chrome) to 
http://localhost:8161/demo/websocket/index.html
4) In a single browser window, type 1, 2, 3, ... 9 with a return/enter after 
each number 
5) Half of the chat ends up in one browser, and half in the other. 

This bug causes the receiving browser to only get 1/2 the chats. Could this bug 
relate to the new added code that uses "/n"?

Can someone confirm this?

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-07 Thread Peter Pfort (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482775#comment-14482775
 ] 

Peter Pfort commented on AMQ-5155:
--

It's works now.

Thanks

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-02 Thread Timothy Bish (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392674#comment-14392674
 ] 

Timothy Bish commented on AMQ-5155:
---

Added a fix, let me know if it works for you.

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-04-02 Thread Peter Pfort (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392271#comment-14392271
 ] 

Peter Pfort commented on AMQ-5155:
--

Hi Timothy,
your change in version 5.12 isn't complete. You forget the "else" before the 
"onStompCommand ...", like in the snippet from Claudio.

The "(StompFrame)wireFormat.unmarshal" throw an EOFException, because the 
KeepAlive command isn't handled in it. Then the session is marked as failed.

Please complete the code.

Peter

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Timothy Bish
>Priority: Minor
> Fix For: 5.12.0
>
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-03-24 Thread Ariel Monaco (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379347#comment-14379347
 ] 

Ariel Monaco commented on AMQ-5155:
---

I've tried every version >= 5.9.1 until 5.12-SNAPSHOT and I can reproduce the 
reported issue. I guess for now some people will have to stick to 5.8 for 
production. This is a bug that affects everyone using Websockets and it's been 
open for almost a year :|

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Dejan Bosanac
>Priority: Minor
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-03-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352888#comment-14352888
 ] 

Sebastian Sjödin commented on AMQ-5155:
---

Hi Claudio,

I tried your code with ActiveMQ 5.11.1 and it seems to work fine now, at least 
with the stomp.js example chat test.
Made some diffs for the 5.11.1 version that I'll attach to this ticket.

Thanks!

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Dejan Bosanac
>Priority: Minor
> Attachments: AMQ-5155-jetty8.diff, AMQ-5155-jetty9.diff
>
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-03-05 Thread Claudio Parodi (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348653#comment-14348653
 ] 

Claudio Parodi commented on AMQ-5155:
-

Hi, 
I have created a patch for activemq 5.9.1 version that seems to work.

These are my changes for org.apache.activemq.transport.ws.StompSocket:

1. in doStart() I set transportListener to remove NPE:
{code}
@Override
protected void doStart() throws Exception {
socketTransportStarted.countDown();

stompInactivityMonitor.setTransportListener(this.getTransportListener());
}
{code}

2. in onMessage(String data) I managed keepalive frame:
{code}
if (!transportStartedAtLeastOnce()) {
LOG.debug("Waiting for StompSocket to be properly started...");
try {
socketTransportStarted.await();
} catch (InterruptedException e) {
LOG.warn("While waiting for StompSocket to be properly started, 
we got interrupted!! Should be okay, but you could see race conditions...");
}
}
try {
  if (data!=null && data.equals("\n"))
{
sendToActiveMQ(new KeepAliveInfo());
}
  else {
   
protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new 
ByteSequence(data.getBytes("UTF-8";
}
} catch (Exception e) {
onException(IOExceptionSupport.create(e));
}
{code}

Can I share with you my code in a better way?
Thanks
Claudio Parodi

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Dejan Bosanac
>Priority: Minor
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2015-01-04 Thread ZhaiYun (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264112#comment-14264112
 ] 

ZhaiYun commented on AMQ-5155:
--

Can we pull up the Priority
-> we all think so.

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Dejan Bosanac
>Priority: Minor
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2014-12-31 Thread Charlie Mordant (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262395#comment-14262395
 ] 

Charlie Mordant commented on AMQ-5155:
--

Hi,
Can we pull up the Priority, as it is a real blocker for websocket users? I 
really hope that it will be corrected in 5.10.1: our enterprise stack is stuck 
with 5.8 because of it.
@Timothy, I'm sorry, I tried but the AMQ internals are not so easy to 
understand, I'm sure that it'll not be so difficult for an expert like you, but 
it's really red hairing for noobs like me...

Regards,

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Assignee: Dejan Bosanac
>Priority: Minor
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2014-06-10 Thread Timothy Bish (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14027304#comment-14027304
 ] 

Timothy Bish commented on AMQ-5155:
---

Why not try and create a unit test and submit a patch that fixes it?

> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Priority: Minor
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (AMQ-5155) Heartbeat fails in STOMP over WebSockets

2014-06-10 Thread Chad Kelly (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14027280#comment-14027280
 ] 

Chad Kelly commented on AMQ-5155:
-

Someone please help resolve this ticket. The bug described above is still 
present in 5.9.1. I tried both cases, heartbeat set to 0,0 and 1,1. 
Slightly different buggy behaviors, but it still does not work. Please:
1) download 5.9.1
2) bin/activemq console xbean:examples/conf/activemq-demo.xml
3) open two browsers (firefox/chrome) to 
http://localhost:8161/demo/websocket/index.html
4) type a few messages over a 5 minute period

WARN | Transport Connection to: StompSocket_1998606381 failed: 
java.io.IOException
WARN | Transport Connection to: StompSocket_178709817 failed: 
java.io.IOException
Exception in thread "ActiveMQ InactivityMonitor Worker" 
java.lang.NullPointerException
at 
org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
at 
org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "ActiveMQ InactivityMonitor Worker" 
java.lang.NullPointerException
at 
org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
at 
org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


> Heartbeat fails in STOMP over WebSockets
> 
>
> Key: AMQ-5155
> URL: https://issues.apache.org/jira/browse/AMQ-5155
> Project: ActiveMQ
>  Issue Type: Bug
>Affects Versions: 5.9.1, 5.10.0
>Reporter: Arjan van den Berg
>Priority: Minor
>
> From AMQ-4740:
> I receive the following error after establishing a connection and heartbeat 
> through stomp.js. This seems to occur after the 'PING' is sent.
> -- stomp.js output
> <<< CONNECTED
> heart-beat:1,1
> session:ID:localhost.localdomain-45596-1396530920609-2:2
> server:ActiveMQ/5.10-SNAPSHOT
> version:1.1
> send PING every 1ms 
> check PONG every 1ms 
> <<< PONG 
> >>> PING 
> did not receive server activity for the last 20005ms 
> Whoops! Lost connection to ws://172.16.99.73:61614/stomp
> - activemq console ---
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> WARN | Transport Connection to: StompSocket_19548821 failed: 
> java.io.IOException
> Exception in thread "ActiveMQ InactivityMonitor Worker" 
> java.lang.NullPointerException
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor.onException(AbstractInactivityMonitor.java:314)
> at 
> org.apache.activemq.transport.AbstractInactivityMonitor$4.run(AbstractInactivityMonitor.java:215)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> For me it looks as if the StompInactivityMonitor is delivering its events to 
> the wrong Transport, i.e. it needs a "narrow()" when setting it up.



--
This message was sent by Atlassian JIRA
(v6.2#6252)