发送消息失败,报错信息如下,帮助排查下


(Honor) #1

给ddd发送了一条消息

{}
	at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:235)
	at cn.jiguang.common.connection.NativeHttpClient.doRequest(NativeHttpClient.java:99)
	at cn.jiguang.common.connection.NativeHttpClient.sendPost(NativeHttpClient.java:86)
	at cn.jpush.api.push.PushClient.sendPush(PushClient.java:163)
	at cn.jpush.api.JPushClient.sendPush(JPushClient.java:195)
	at utils.JpushUtils.sendMessage(JpushUtils.java:53)
	at utils.JpushUtils.sendAliasPushMessage(JpushUtils.java:42)
	at tz.com.tony.JpushServlet.doPost(JpushServlet.java:48)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Demo 推送失败,求各位大牛指教
(Honor) #2

大佬,帮我看一下这个呗 ! 发愁1天了


(Honor) #3
登陆成功!
log4j:WARN No appenders could be found for logger (cn.jiguang.common.connection.NativeHttpClient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
给ddd发送了一条消息
{}
	at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:235)
	at cn.jiguang.common.connection.NativeHttpClient.doRequest(NativeHttpClient.java:99)
	at cn.jiguang.common.connection.NativeHttpClient.sendPost(NativeHttpClient.java:86)
	at cn.jpush.api.push.PushClient.sendPush(PushClient.java:163)
	at cn.jpush.api.JPushClient.sendPush(JPushClient.java:195)
	at utils.JpushUtils.sendMessage(JpushUtils.java:53)
	at utils.JpushUtils.sendAliasPushMessage(JpushUtils.java:42)
	at tz.com.tony.JpushServlet.doPost(JpushServlet.java:48)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

#4

1、请提供完整的报错信息,应该有Caused by:的内容
2、请说明你用的是什么服务端的SDK?Java?版本号是多少?
3、请说明你的具体操作步骤


(Honor) #5

我从本地推送一条消息到客户端
服务器SDK jpush-client-3.3.0.jar java jdk 1.8


#6

1、提供下完整的报错
2、检查网络,检查防火墙
3、开通端口443
4、参考example进行推送,try catch 具体的错误码


(Honor) #7

信息: Starting ProtocolHandler [“ajp-bio-8009”]
八月 04, 2017 3:35:04 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 10329 ms
登陆成功!
log4j:WARN No appenders could be found for logger (cn.jiguang.common.connection.NativeHttpClient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
给ddd发送了一条消息
{}
at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:235)
at cn.jiguang.common.connection.NativeHttpClient.doRequest(NativeHttpClient.java:99)
at cn.jiguang.common.connection.NativeHttpClient.sendPost(NativeHttpClient.java:86)
at cn.jpush.api.push.PushClient.sendPush(PushClient.java:163)
at cn.jpush.api.JPushClient.sendPush(JPushClient.java:195)
at utils.JpushUtils.sendMessage(JpushUtils.java:53)
at utils.JpushUtils.sendAliasPushMessage(JpushUtils.java:42)
at tz.com.tony.JpushServlet.doPost(JpushServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
登陆成功!


(Honor) #8

这就是完整的 报错信息 可以登录成功,说明本地的网络是没问题的, 就是推送的时候 推不出去


#9

你这里所谓的登录成功,是你自己的,我要你检查的是 你能否连上我们的服务器,推送是要推到我们服务器这边的


(大爷) #10

请问这个问题解决了吗?
我这边也遇到这个问题
环境:
1.jdk1.8
2.jpush-client 3.3.2
发送通知给部分人正常,部分人异常,异常和你的一模一样,没有更详细的信息
{}
at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:235)
at cn.jiguang.common.connection.NativeHttpClient.doRequest(NativeHttpClient.java:99)
at cn.jiguang.common.connection.NativeHttpClient.sendPost(NativeHttpClient.java:86)
at cn.jpush.api.push.PushClient.sendPush(PushClient.java:163)

返回的PushResult 为null


(大爷) #11

请问这个问题解决了吗?
我这边也遇到这个问题
环境:
1.jdk1.8
2.jpush-client 3.3.2
发送通知给部分人正常,部分人异常,异常和这个一模一样,没有更详细的信息
{}
at cn.jiguang.common.connection.NativeHttpClient._doRequest(NativeHttpClient.java:235)
at cn.jiguang.common.connection.NativeHttpClient.doRequest(NativeHttpClient.java:99)
at cn.jiguang.common.connection.NativeHttpClient.sendPost(NativeHttpClient.java:86)
at cn.jpush.api.push.PushClient.sendPush(PushClient.java:163)

返回的PushResult 为null


#12

信息过少,无法分析