JPush本地调试的时候可以推送出去,上传到测试服务器就推送不出去了

jpush
标签: #<Tag:0x00007fb82fd36668>

(yyd_fla) #1

[0511 09:55:54] INFO Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS (NativeHttpClient.java:55)
[0511 09:55:55] INFO Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS (NativeHttpClient.java:55)
[0511 09:55:55] INFO Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS (NativeHttpClient.java:55)
[0511 09:55:55] INFO Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS (NativeHttpClient.java:55)


#2

1、请检查服务器的访问限制,开通443、80端口
2、


(yyd_fla) #3

我防火墙都关了,也没用啊


#4

那么请问这个报错的最后是否有成功?

是一直报错没有成功,还是最终有成功?


(yyd_fla) #5

没有成功,

0511 11:04:50] INFO  Created instance with connectionTimeout 10,000, readTimeout 30,000, maxRetryTimes 5, SSL Version TLSv1.1 (NativeHttpClient.java:55) 
[0511 11:04:50] INFO  Created instance with connectionTimeout 10,000, readTimeout 30,000, maxRetryTimes 5, SSL Version TLSv1.1 (NativeHttpClient.java:55) 
[0511 11:04:50] INFO  Created instance with connectionTimeout 10,000, readTimeout 30,000, maxRetryTimes 5, SSL Version TLSv1.1 (NativeHttpClient.java:55) 
[0511 11:04:50] INFO  Created instance with connectionTimeout 10,000, readTimeout 30,000, maxRetryTimes 5, SSL Version TLSv1.1 (NativeHttpClient.java:55) 
[0511 11:04:50] ERROR  (SocketCmdMediaPush.java:36) 
java.lang.NoClassDefFoundError: io/netty/handler/codec/http/HttpRequest
	at service.push.JPush.push(JPush.java:56)
	at service.media_agora.SocketCmdMediaInvite.execute(SocketCmdMediaInvite.java:124)
	at service.media.SocketCmdMediaPush.execute(SocketCmdMediaPush.java:31)
	at frame.Command.start(Command.java:32)
	at frame.socket.SocketCmd.start(SocketCmd.java:39)
	at frame.socket.SocketHandler$1.run(SocketHandler.java:121)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	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)
Caused by: java.lang.ClassNotFoundException: io.netty.handler.codec.http.HttpRequest
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 13 more

(KenChoi) #6

有没有引入 Netty 相关的依赖:

<dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.6.Final</version>
            <scope>compile</scope>
        </dependency>

(yyd_fla) #7

我们测试服务器用的open jdk 是不是不支持啊


(yyd_fla) #8

因为暂时换不了 有没有解决办法


#9

你用的阿里云服务器?如果是使用open jdk,建议替换sun jdk尝试。


(KenChoi) #10

要不这样,我把 netty 相关类去掉 给你打包一个 jiguang-common 包。


(yyd_fla) #11

这个包我有加到项目中 , 暂时换不了jdk,有没其他解决办法


(KenChoi) #12

jiguang-common-1.0.5-SNAPSHOT.jar.zip (39.4 KB)

换成这个试试。


(yyd_fla) #13

现在还是一样
刚才是 java.lang.RuntimeException: java.security.KeyException
现在现在是
Created instance with connectionTimeout 10,000, readTimeout 30,000, maxRetryTimes 5, SSL Version TLSv1.1 (NativeHttpClient.java:55)


(KenChoi) #14

这个是正常的打印,你看看请求有没有成功吧 :)


(yyd_fla) #15

没有推送成功!


#16

请给完整的报错,完整的信息。


(yyd_fla) #17

没有报错!就是收不到。


#18

:sweat:我们先确认下,你推送是不是成功了,再来看推送成功了但手机收不到的问题。

你调用API推送后,给你返回的信息有哪些?是否有msgid?

参考example,捕获一下


(KenChoi) #19

没有打印什么信息吗?肯定有返回信息啊


(yyd_fla) #20

没有返回消息,没有打印result=====》这几话,阻塞在那里了