`
san_yun
  • 浏览: 2662690 次
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

dboss问题记录

 
阅读更多

问题记录:
1. param乱码问题
DbossError: com.duitang.dboss.client.exception.DbossClientException: dboss invoke ERROR: url=dboss2://blogQueryService/queryBlogDetail?q=%5B%22%5B%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221574088%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91933745%2C+%5C%22ts%5C%22%3A+1376868436000%7D%2C+%7B%5C%22blogid%5C%22%3A+91930973%2C+%5C%22userid%5C%22%3A+%5C%221308238%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91931749%2C+%5C%22ts%5C%22%3A+1376863967000%7D%2C+%7B%5C%22blogid%5C%22%3A+91924730%2C+%5C%22userid%5C%22%3A+%5C%22870602%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91930973%2C+%5C%22ts%5C%22%3A+1376861338000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221012227%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91930707%2C+%5C%22ts%5C%22%3A+1376859948000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221714508%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_LIKE%5C%22%2C+%5C%22id%5C%22%3A+5572156%2C+%5C%22ts%5C%22%3A+1376848388000%7D%2C+%7B%5C%22blogid%5C%22%3A+91869612%2C+%5C%22userid%5C%22%3A+%5C%22229946%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91924730%2C+%5C%22ts%5C%22%3A+1376847565000%7D%2C+%7B%5C%22blogid%5C%22%3A+91010958%2C+%5C%22userid%5C%22%3A+%5C%22974501%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91923550%2C+%5C%22ts%5C%22%3A+1376846531000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221715131%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_LIKE%5C%22%2C+%5C%22id%5C%22%3A+5568882%2C+%5C%22ts%5C%22%3A+1376836168000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%22651082%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91869612%2C+%5C%22ts%5C%22%3A+1376827065000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221252169%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91859454%2C+%5C%22ts%5C%22%3A+1376823271000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221252169%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91859484%2C+%5C%22ts%5C%22%3A+1376823260000%7D%2C+%7B%5C%22blogid%5C%22%3A+91058362%2C+%5C%22userid%5C%22%3A+%5C%221379858%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91854765%2C+%5C%22ts%5C%22%3A+1376821438000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%22616461%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91840826%2C+%5C%22ts%5C%22%3A+1376816139000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%22616461%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_LIKE%5C%22%2C+%5C%22id%5C%22%3A+5562127%2C+%5C%22ts%5C%22%3A+1376816127000%7D%2C+%7B%5C%22blogid%5C%22%3A+91805987%2C+%5C%22userid%5C%22%3A+%5C%22587281%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91839368%2C+%5C%22ts%5C%22%3A+1376815741000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221684341%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91805987%2C+%5C%22ts%5C%22%3A+1376803953000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%221441001%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91802007%2C+%5C%22ts%5C%22%3A+1376802457000%7D%2C+%7B%5C%22blogid%5C%22%3A+91792146%2C+%5C%22userid%5C%22%3A+%5C%221614329%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91798584%2C+%5C%22ts%5C%22%3A+1376800900000%7D%2C+%7B%5C%22blogid%5C%22%3A+90041121%2C+%5C%22userid%5C%22%3A+%5C%22809181%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_LIKE%5C%22%2C+%5C%22id%5C%22%3A+5557284%2C+%5C%22ts%5C%22%3A+1376798195000%7D%2C+%7B%5C%22blogid%5C%22%3A+91772870%2C+%5C%22userid%5C%22%3A+%5C%22809181%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_LIKE%5C%22%2C+%5C%22id%5C%22%3A+5557283%2C+%5C%22ts%5C%22%3A+1376798195000%7D%2C+%7B%5C%22blogid%5C%22%3A+91772870%2C+%5C%22userid%5C%22%3A+%5C%22809181%5C%22%2C+%5C%22type%5C%22%3A+%5C%22EVENT_BLOG_FORWARD%5C%22%2C+%5C%22id%5C%22%3A+91792146%2C+%5C%22ts%5C%22%3A+1376798184000%7D%5D%22%5D ,message=
500com.duitang.dboss.remote.oio.DbossException: java.lang.NumberFormatException: For input string: "{id=91933745, ts=1376868436000, userid=1574088, blogid=90041121, type=EVENT_BLOG_FORWARD}"
    at com.duitang.dboss.service.ServiceInvoker.doaccept2(ServiceInvoker.java:119)
    at com.duitang.dboss.service.ServiceInvoker.accept(ServiceInvoker.java:46)
    at com.duitang.dboss.remote.nio.DbossServerHandler.messageReceived(DbossServerHandler.java:40)
    at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:98)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:796)
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
    at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:307)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NumberFormatException: For input string: "{id=91933745, ts=1376868436000, userid=1574088, blogid=90041121, type=EVENT_BLOG_FORWARD}"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Long.parseLong(Long.java:410)
    at java.lang.Long.valueOf(Long.java:525)
    at com.duitang.dboss.resolve.resolvers.SimpleDataResolver.resolve(SimpleDataResolver.java:35)
    at com.duitang.dboss.resolve.resolvers.CollectionDataResolver.resolve(CollectionDataResolver.java:59)
    at com.duitang.dboss.service.ServiceInvoker.doaccept2(ServiceInvoker.java:104)
    ... 10 more

3. 字符乱码(错误数据,userid:74710)
DbossError: java.lang.RuntimeException: org.codehaus.jackson.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 0)): has to be escaped using backslash to be included in string value
 at [Source: java.io.StringReader@65b8b5cd; line: 1, column: 279184]
   


server socket close时client可能存在的状态
1. get connection。
Exception in thread "main" com.duitang.dboss.client.util.DbossConnectionException: java.net.ConnectException: Connection refused
    at com.duitang.dboss.client.net.Connection.connect(Connection.java:97)
    at com.duitang.dboss.client.net.ServerCenter.getConnection(ServerCenter.java:44)
    at com.duitang.dboss.client.net.ServerCenter.invoke(ServerCenter.java:51)
    at com.duitang.dboss.client.SimpleServiceProxy.invoke(SimpleServiceProxy.java:57)
    at com.duitang.dboss.client.SimpleServiceProxy.doExecute(SimpleServiceProxy.java:83)
    at com.duitang.dboss.client.SimpleServiceProxy.execute(SimpleServiceProxy.java:43)
    at com.duitang.dboss.client.test.DbossClientTester.main(DbossClientTester.java:37)
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at com.duitang.dboss.client.net.Connection.connect(Connection.java:93)

2. sendData

591 connect......true
591 SocketException Broken pipe, isConnected:true
591 markDead......true
591 release......false
2013-08-15 18:11:27.382:WARN::/blogs/tag/%E7%94%B5%E5%BD%B1/
com.duitang.dboss.client.exception.DbossClientException: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
    at com.duitang.dboss.client.net.Connection.sendData(Connection.java:46)
    at com.duitang.dboss.client.net.ServerCenter.invoke(ServerCenter.java:57)

3. readLine 1
server socket断掉之后有可能client的socket也不会断掉,但这时input.read()返回-1,参考Connection.readLine()的处理。
int b = input.read(); // 此操作会阻塞,直到有数据被读到
if (b < 0) {
    throw new IOException(
                          " end of the socket input stream has been reached,may be server socket is closed!");
}

4. readLine 2
2013-09-12 18:47:13 [ERROR] com.duitang.dboss.client.net.ServerCenter  - invoke ERROR ,serverAddress=192.168.172.2
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.net.SocketInputStream.read(SocketInputStream.java:182)
    at java.io.FilterInputStream.read(FilterInputStream.java:66)
    at java.io.PushbackInputStream.read(PushbackInputStream.java:122)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics