digidotcom / idigi-java-monitor-api Goto Github PK
View Code? Open in Web Editor NEWExample Push Monitor API for iDigi Device Cloud platform; get device information updates as they happen
License: Apache License 2.0
Example Push Monitor API for iDigi Device Cloud platform; get device information updates as they happen
License: Apache License 2.0
Using the Override annotation breaks backwards compatibility with the 1.5 compiler. Removing them is all it will take to support this. Nice since some IDEs use 1.5 compliance level.
After the code runs for a day or two, it stops working. The log shows the following error before the connection is closed:
"javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?"
We've got two monitor ID's setup for this process, and while the monitoring code hasn't been changed, we've added a function call inside MessageListener.messageReceived to push new readings into our database server.
You may see the log below:
17:19:22.684 [New I/O client worker #2-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x******1, /106.187.46.198:57706 => developer.idigi.com/50.56.41.153:3201] RECEIVED: BigEndianHeapChannelBuffer(ridx=0, widx=600, cap=600) - (HEXDUMP: ...)
17:19:22.684 [New I/O client worker #2-1] DEBUG c.i.a.m.n.MessageDataBlockDecoder - Decoding PublishMesssage
17:19:22.685 [New I/O client worker #2-1] DEBUG c.i.a.m.n.PublishMessageResponder - Sending publish message response.
17:19:22.685 [New I/O client worker #2-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x**_1, /106.187.46.198:57706 => developer.idigi.com/50.56.41.153:3201] WRITE: ByteBufferBackedChannelBuffer(ridx=0, widx=10, cap=10) - (HEXDUMP: 0004000000045ae900c8)
17:19:22.685 [New I/O client worker #2-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x__1, /106.187.46.198:57706 => developer.idigi.com/50.56.41.153:3201] WRITTEN_AMOUNT: 35
17:19:25.812 [New I/O client worker #1-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x*_2, /106.187.46.198:57704 => developer.idigi.com/50.56.41.153:3201] RECEIVED: BigEndianHeapChannelBuffer(ridx=0, widx=598, cap=598) - (HEXDUMP:...)
17:19:25.812 [New I/O client worker #1-1] DEBUG c.i.a.m.n.MessageDataBlockDecoder - Decoding PublishMesssage
17:19:25.813 [New I/O client worker #1-1] DEBUG c.i.a.m.n.PublishMessageResponder - Sending publish message response.
17:19:25.813 [New I/O client worker #1-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x_2, /106.187.46.198:57704 => developer.idigi.com/50.56.41.153:3201] WRITE: ByteBufferBackedChannelBuffer(ridx=0, widx=10, cap=10) - (HEXDUMP: 000400000004768700c8)
17:19:25.814 [New I/O client worker #1-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x__2, /106.187.46.198:57704 => developer.idigi.com/50.56.41.153:3201] WRITTEN_AMOUNT: 35
17:19:29.918 [New I/O client worker #2-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x*_1, /106.187.46.198:57706 :> developer.idigi.com/50.56.41.153:3201] DISCONNECTED
17:19:29.919 [New I/O client worker #2-1] DEBUG c.i.a.m.n.MessageDataBlockDecoder - Decoding PublishMesssage
17:19:30.074 [New I/O client worker #2-1] DEBUG o.jboss.netty.handler.ssl.SslHandler - Failed to clean up SSLEngine.
javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.7.0_04]
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639) ~[na:1.7.0_04]
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1607) ~[na:1.7.0_04]
at sun.security.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:1537) ~[na:1.7.0_04]
at org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:512) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:354) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:589) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:350) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:274) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:194) ~[netty-3.3.1.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_04]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_04]
17:19:30.074 [New I/O client worker #2-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x_1, /106.187.46.198:57706 :> developer.idigi.com/50.56.41.153:3201] UNBOUND
17:19:30.075 [New I/O client worker #2-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x__1, /106.187.46.198:57706 :> developer.idigi.com/50.56.41.153:3201] CLOSED
17:21:33.487 [New I/O client worker #1-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x*_2, /106.187.46.198:57704 :> developer.idigi.com/50.56.41.153:3201] DISCONNECTED
17:21:33.487 [New I/O client worker #1-1] DEBUG c.i.a.m.n.MessageDataBlockDecoder - Decoding PublishMesssage
17:21:33.489 [New I/O client worker #1-1] DEBUG o.jboss.netty.handler.ssl.SslHandler - Failed to clean up SSLEngine.
javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.7.0_04]
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1639) ~[na:1.7.0_04]
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1607) ~[na:1.7.0_04]
at sun.security.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:1537) ~[na:1.7.0_04]
at org.jboss.netty.handler.ssl.SslHandler.channelDisconnected(SslHandler.java:512) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:354) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:589) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:350) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:274) ~[netty-3.3.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:194) ~[netty-3.3.1.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_04]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_04]
17:21:33.489 [New I/O client worker #1-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x*_2, /106.187.46.198:57704 :> developer.idigi.com/50.56.41.153:3201] UNBOUND
17:21:33.489 [New I/O client worker #1-1] DEBUG com.idigi.api.monitor.netty.Logging - [id: 0x_****2, /106.187.46.198:57704 :> developer.idigi.com/50.56.41.153:3201] CLOSED
Maybe you deleted this line in MonitorPipelineFactory.java
(line 49)
ChannelPipeline pipeline = Channels.pipeline();
this causes error.
The line was written in below-commit.
It would be convenient if the library could be uploaded to the maven central repository for dependency management with existing projects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.