本地调试推送,走到这一步就不执行了


(沙砾) #1
Connected to the target VM, address: '127.0.0.1:58316', transport: 'socket'
2018-03-15 15:14:51.870 [main] INFO  com.commonrail.app.utils.JPushUtil - 极光推送13165ffa4e3e493387c,title:测试111
2018-03-15 15:14:51.914 [main] INFO  cn.jiguang.common.connection.NativeHttpClient - Created instance with connectionTimeout 2,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
2018-03-15 15:14:52.051 [main] INFO  cn.jiguang.common.connection.NativeHttpClient - Created instance with connectionTimeout 2,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
2018-03-15 15:14:52.057 [main] INFO  cn.jiguang.common.connection.NativeHttpClient - Created instance with connectionTimeout 2,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
2018-03-15 15:14:52.060 [main] INFO  cn.jiguang.common.connection.NativeHttpClient - Created instance with connectionTimeout 2,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
2018-03-15 15:14:52.076 [main] INFO  cn.jiguang.common.connection.NettyHttpClient - Created instance with connectionTimeout 2,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
2018-03-15 15:14:52.105 [main] DEBUG i.n.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
2018-03-15 15:14:52.151 [main] DEBUG io.netty.handler.ssl.OpenSsl - netty-tcnative not in the classpath; OpenSslEngine will be unavailable.
2018-03-15 15:14:52.628 [main] DEBUG io.netty.handler.ssl.JdkSslContext - Default protocols (JDK): [TLSv1.2, TLSv1.1, TLSv1] 
2018-03-15 15:14:52.629 [main] DEBUG io.netty.handler.ssl.JdkSslContext - Default cipher suites (JDK): [TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA]
2018-03-15 15:14:52.699 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
2018-03-15 15:14:52.701 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
2018-03-15 15:14:52.704 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
2018-03-15 15:14:52.707 [main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: available
2018-03-15 15:14:52.709 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
2018-03-15 15:14:52.710 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
2018-03-15 15:14:52.712 [main] DEBUG io.netty.util.internal.Cleaner0 - java.nio.ByteBuffer.cleaner(): available
2018-03-15 15:14:52.717 [main] DEBUG io.netty.util.internal.PlatformDependent - Platform: Windows
2018-03-15 15:14:52.720 [main] DEBUG io.netty.util.internal.PlatformDependent - Java version: 7
2018-03-15 15:14:52.720 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
2018-03-15 15:14:52.720 [main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
2018-03-15 15:14:52.721 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
2018-03-15 15:14:52.724 [main] DEBUG io.netty.util.internal.PlatformDependent - Javassist: unavailable
2018-03-15 15:14:52.725 [main] DEBUG io.netty.util.internal.PlatformDependent - You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes.  Please check the configuration for better performance.
2018-03-15 15:14:52.726 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\ADMINI~1.WIN\AppData\Local\Temp (java.io.tmpdir)
2018-03-15 15:14:52.726 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
2018-03-15 15:14:52.726 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
2018-03-15 15:14:52.726 [main] DEBUG io.netty.util.internal.PlatformDependent - io.netty.maxDirectMemory: 1845493760 bytes
2018-03-15 15:14:52.751 [main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
2018-03-15 15:14:52.857 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
2018-03-15 15:14:52.858 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
2018-03-15 15:14:52.878 [main] DEBUG io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
2018-03-15 15:14:53.201 [main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 2640 (auto-detected)
2018-03-15 15:14:53.205 [main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
2018-03-15 15:14:53.205 [main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
2018-03-15 15:14:53.403 [main] DEBUG io.netty.util.NetUtil - Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
2018-03-15 15:14:53.405 [main] DEBUG io.netty.util.NetUtil - \proc\sys\net\core\somaxconn: 200 (non-existent)
2018-03-15 15:14:53.619 [main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: 60:67:20:ff:fe:01:23:a2 (auto-detected)
2018-03-15 15:14:53.620 [main] DEBUG io.netty.util.internal.ThreadLocalRandom - -Dio.netty.initialSeedUniquifier: 0x61177413f4a6f907
2018-03-15 15:14:53.655 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
2018-03-15 15:14:53.655 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.maxRecords: 4
2018-03-15 15:14:53.719 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 8
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 8
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
2018-03-15 15:14:53.720 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
2018-03-15 15:14:53.721 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
2018-03-15 15:14:53.721 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
2018-03-15 15:14:53.743 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
2018-03-15 15:14:53.744 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
2018-03-15 15:14:53.745 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
2018-03-15 15:14:53.857 [nioEventLoopGroup-2-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.bytebuf.checkAccessible: true
2018-03-15 15:14:53.863 [nioEventLoopGroup-2-1] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@3305173f
2018-03-15 15:14:53.917 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 32768
2018-03-15 15:14:53.917 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2
2018-03-15 15:14:53.918 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16
2018-03-15 15:14:53.918 [nioEventLoopGroup-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
2018-03-15 15:14:53.941 [main] INFO  cn.jiguang.common.connection.NettyHttpClient - Sending request. DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: UnpooledHeapByteBuf(ridx: 0, widx: 562, cap: 562/562))
POST /v3/push HTTP/1.1
content-length: 562
host: api.jpush.cn
authorization: Basic ZjMzMjlhZTQ2M2I1YWRiZmM2Njk0OTk0OjIyMDFjMTNiYmRmYTgwMjFlNjUyMjc0Mw==
Content-Type: application/json;charset=utf-8
2018-03-15 15:14:53.941 [main] INFO  cn.jiguang.common.connection.NettyHttpClient - Send body: {"platform":["android","ios"],"audience":{"registration_id":["13165ffa4e3e493387c"]},"notification":{"android":{"alert":"测试111","extras":{"title":"这是聊天室标题","module":"1","workOrderId":"98","objId":"98","targetId":"work_order_98","messageId":"100000001","url":""},"title":"测试111"},"ios":{"alert":"测试111","extras":{"title":"这是聊天室标题","module":"1","workOrderId":"98","objId":"98","targetId":"work_order_98","messageId":"100000001","url":""},"badge":"+1","sound":"happy"}},"options":{"sendno":1770640466,"apns_production":true}}
2018-03-15 15:14:53.974 [nioEventLoopGroup-2-1] DEBUG i.n.handler.ssl.util.InsecureTrustManagerFactory - Accepting a server certificate: CN=*.jpush.cn, O=Shenzhen HeXunHuaGu Information Technologies Co.Ltd, L=Shenzhen, ST=GuangDong, C=CN
2018-03-15 15:14:54.045 [nioEventLoopGroup-2-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0xcaa9e949, L:/192.168.91.138:58427 - R:api.jpush.cn/103.40.232.116:443] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
2018-03-15 15:14:54.345 [nioEventLoopGroup-2-1] INFO  cn.jiguang.common.connection.HttpResponseHandler - PooledSlicedByteBuf(ridx: 0, widx: 51, cap: 51/51, unwrapped: PooledUnsafeDirectByteBuf(ridx: 338, widx: 338, cap: 389))
2018-03-15 15:14:54.346 [nioEventLoopGroup-2-1] INFO  cn.jiguang.common.connection.HttpResponseHandler - closing connection

(沙砾) #2

加了超时时间也没用


#3

看看网络设置上有没有什么问题


(沙砾) #4

1.并不是每次请求都会卡住,有时候可以,有时候不行
2.如果用NativeHttpClient方式请求,没任何问题


#5

如果你有高并发需求,可以使用ApacheHttpClient

如果使用 NettyHttpClient,需要手动调用 close 方法退出进程,不建议使用他,如果创建大量线程,是可能导致堵塞的