分批次推送tag值 只推送了前20条,后面的没推送成功


(hoan) #1

你好,咨询个问题。 我进行操作后台推了54个tag值 我这边只推了前20个 后面的没有推。

上面成功后, 紧接着报下面的错误
image

我如何把54个tag值可以推出去呢?


#2

#3

调一次 API 推送,仅允许传 20 个 tag,多余的需要多次调 API 分开推送,凡是报错了 1011 的说明你的 tag 下没有目标存在


(hoan) #4

是的,那这个调用是客户端去循环每20个调用一次,还是说他把54个tag值发来我来循环,我java服务端来去调用?还是说2者都可以?


#5

推送消息的操作应放在服务端进行,客户端怎么循环调用?


(hoan) #6

^_^,好的,谢谢了,大拿


(hoan) #7

image
这个是接收的参数 54个tag 之后写了个工具类


这个是我分批次传 tag 但是只能发送前20个

哪里写的不妥吗?


(hoan) #8


这是我判断推送成功的判断


这个是我打印出来的日志。比方说 我推20个tag到极光服务器,只要有一个找不到就报错,19个成功。会走到catch (APIRequestException e) {}这里面来 导致返回的是 0 失败。

我这边如何判断此次推送 是成功还是失败 ?


#9

1、调一次 API 推送,在 Audience 里面传多个 tag,只要有一个 tag 下有目标,则本次推送是成功的,不会报错,只有当所有的 tag 下都没有目标的时候才会报错

2、控制台应该会打印你完整的请求参数,查看你实际上本次请求传了多少个 tag。


(hoan) #10

消息接收的param–>MessageParam [id=18092613132000030000, type=CustomerService, title=一般报事:KF20180926131332598, content=您有新的待接单1的客服工单, tag=13537639063,admin,chensq,demo10,liming,tangxc,test1,test10,test100,test101,test106,test110,test111,test118,test119,test12,test120,test121,test123,test125,test126,test13,test15,test17,test18,test195,test197,test2,test20,test22,test23,test24,test25,test26,test27,test28,test3,test30,test31,test32,test33,test34,test35,test4,test40,test5,test50,test6,test60,test8,test88,test9,test95,XiePingPing, status=Accepting, url=null, fromTag=null, projId=null, memberId=null, orderState=null, orderType=null]

{“platform”:[“android”,“ios”],“audience”:{“tag”:[“test12”,“demo10”,“test10”,“test110”,“test121”,“admin”,“test100”,“test111”,“test120”,“tangxc”,“test1”,“test118”,“test119”,“test106”,“chensq”,“liming”,“test125”,“test101”,“test123”,“13537639063”]},“notification”:{“alert”:“您有新的待接单1的客服工单”,“android”:{“alert”:“您有新的待接单1的客服工单”,“extras”:{“notice”:"{“id”:“18092613132000030000”,“type”:“CustomerService”,“status”:“Accepting”}"},“title”:“一般报事:KF20180926131332598”},“ios”:{“alert”:{“title”:“一般报事:KF20180926131332598”,“subtitle”:“您有新的待接单1的客服工单”},“extras”:{“notice”:"{“id”:“18092613132000030000”,“type”:“CustomerService”,“status”:“Accepting”}"},“badge”:"+1",“sound”:“happy”}},“options”:{“sendno”:619334069,“apns_production”:false}}

这是前20个 之后就报这个错误


#11

请提供完整的客户端日志,不要节选,你这个报错的错误具体针对的是哪一个请求,请求里面包含什么参数

前 20 个之后报错,也就是 前 20 个没报错,那说明日志里面对这次请求也会返回成功的信息,提供完整的日志


(hoan) #12

客户端日志?
只有这个

消息接收的param–>MessageParam [id=18092613132000030000, type=CustomerService, title=一般报事:KF20180926131332598, content=您有新的待接单1的客服工单, tag=13537639063,admin,chensq,demo10,liming,tangxc,test1,test10,test100,test101,test106,test110,test111,test118,test119,test12,test120,test121,test123,test125,test126,test13,test15,test17,test18,test195,test197,test2,test20,test22,test23,test24,test25,test26,test27,test28,test3,test30,test31,test32,test33,test34,test35,test4,test40,test5,test50,test6,test60,test8,test88,test9,test95,XiePingPing, status=Accepting, url=null, fromTag=null, projId=null, memberId=null, orderState=null, orderType=null]

这个是那边传递过来的

之后我把tag进行拆分 20个一组进行推送 推20个后紧接着报上面那个错误。后续的34个tag继续分2次发送,都也是报错


#13

说错了,你服务端请求推送的 日志,服务端请求后控制台打印的,完整的


(hoan) #14
[{
"Syswin":[{"status":1,"msg":"工单提交成功!"}]
}]
}

</string>
18-09-26 13:53:12.633 INFO       c.s.p.s.e.c.TableController - ---------------------------请求参数---------------------------
p0:UserCS_GetNoticeList,p1:null,p2:null,p3:null,p4:null,p5:null,p6:null,p7:null,
-----------------------------------------------------------
返回的状态文本-->OK
18-09-26 13:53:12.734 INFO          c.s.p.s.h.HttpClientUtil - 
执行POST请求http://172.31.118.205:8066/NetApp/CstService.asmx/GetService
返回参数:
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">{
"UserCS_GetNoticeList":
[{
"Table":[{"Names":"\u4f01\u4e1a\u6982\u51b5","ShowLink":"https://mp.weixin.qq.com/s?__biz=MzIxMjc5NTk2Mw==&amp;mid=100000063&amp;idx=1&amp;sn=8df87511fe02690eefebbba8b2cfdf4e&amp;chksm=1741d66b20365f7d025f1673d21ac9e8263f794a8dd79db223bcf95e848a5c998026198f9c74&amp;mpshare=1&amp;scene=23&amp;srcid=09159hk2RUCEMmyTGsjvzUVo#rd"}]
}]
}

</string>
消息接收的param-->MessageParam [id=18092613492500040000, type=CustomerService, title=一般报事:KF20180926134937454, content=您有新的待接单1的客服工单, tag=13537639063,admin,chensq,demo10,liming,tangxc,test1,test10,test100,test101,test106,test110,test111,test118,test119,test12,test120,test121,test123,test125,test126,test13,test15,test17,test18,test195,test197,test2,test20,test22,test23,test24,test25,test26,test27,test28,test3,test30,test31,test32,test33,test34,test35,test4,test40,test5,test50,test6,test60,test8,test88,test9,test95,XiePingPing, status=Accepting, url=null, fromTag=null, projId=null, memberId=null, orderState=null, orderType=null]
13537639063
admin
chensq
demo10
liming
tangxc
test1
test10
test100
test101
test106
test110
test111
test118
test119
test12
test120
test121
test123
test125
18-09-26 13:53:12.932 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
18-09-26 13:53:12.942 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
18-09-26 13:53:12.944 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
18-09-26 13:53:12.946 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
pushPayload----------->{"platform":["android","ios"],"audience":{"tag":["test12","demo10","test10","test110","test121","admin","test100","test111","test120","tangxc","test1","test118","test119","test106","chensq","liming","test125","test101","test123","13537639063"]},"notification":{"alert":"您有新的待接单1的客服工单","android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"},"ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"}},"options":{"sendno":285051879,"apns_production":false}}
18-09-26 13:53:12.969 DEBUG         c.j.c.c.NativeHttpClient - Send request - POST https://api.jpush.cn/v3/push
18-09-26 13:53:12.969 DEBUG         c.j.c.c.NativeHttpClient - Request Content - {"platform":["android","ios"],"audience":{"tag":["test12","demo10","test10","test110","test121","admin","test100","test111","test120","tangxc","test1","test118","test119","test106","chensq","liming","test125","test101","test123","13537639063"]},"notification":{"alert":"您有新的待接单1的客服工单","android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"},"ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"}},"options":{"sendno":285051879,"apns_production":false}}
18-09-26 13:53:13.689 DEBUG  c.j.common.resp.ResponseWrapper - JPush API Rate Limiting params - quota:600, remaining:599, reset:60
18-09-26 13:53:13.689 WARN          c.j.c.c.NativeHttpClient - Got error response - responseCode:400, responseContent:{"msg_id":"58546796402071682","error":{"code":1011,"message":"cannot find user by this audience"}}
18-09-26 13:53:13.689 ERROR         c.j.c.c.NativeHttpClient - Your request params is invalid. Please check them according to error message.
request error
Error response from JPush server. Should review and fix it. {}
HTTP Status: 400
Error Code: 1011
Error Message: cannot find user by this audience
{}
	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:193)
	at com.syswin.property.service.utils.JPushUtil.sendToAndroid_and_ios(JPushUtil.java:45)
	at com.syswin.property.service.etsapp.controller.MessageController.getMessage(MessageController.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	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:218)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	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)
list-----1------>20
test126
test13
test15
test17
test18
test195
test197
test2
test20
test22
test23
test24
test25
test26
test27
test28
test3
test30
test31
test32
pushPayload----------->{"platform":["android","ios"],"audience":{"tag":["test27","test15","test26","test25","test13","test24","test23","test22","test32","test20","test31","test197","test195","test18","test17","test28","test2","test3","test126","test30"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":975684216,"apns_production":false}}
18-09-26 13:53:13.709 DEBUG         c.j.c.c.NativeHttpClient - Send request - POST https://api.jpush.cn/v3/push
18-09-26 13:53:13.710 DEBUG         c.j.c.c.NativeHttpClient - Request Content - {"platform":["android","ios"],"audience":{"tag":["test27","test15","test26","test25","test13","test24","test23","test22","test32","test20","test31","test197","test195","test18","test17","test28","test2","test3","test126","test30"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":975684216,"apns_production":false}}
18-09-26 13:53:13.930 DEBUG  c.j.common.resp.ResponseWrapper - JPush API Rate Limiting params - quota:600, remaining:598, reset:60
18-09-26 13:53:13.931 DEBUG         c.j.c.c.NativeHttpClient - Succeed to get response OK - responseCode:200
18-09-26 13:53:13.931 DEBUG         c.j.c.c.NativeHttpClient - Response Content - {"sendno":"975684216","msg_id":"38280598078370161"}
list----------->20
list-----1------>20
test33
test34
test35
test4
test40
test5
test50
test6
test60
test8
test88
test9
test95
XiePingPing
pushPayload----------->{"platform":["android","ios"],"audience":{"tag":["test35","test34","test33","test88","test4","test5","test8","test9","test6","XiePingPing","test40","test95","test50","test60"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":807190386,"apns_production":false}}
18-09-26 13:53:13.938 DEBUG         c.j.c.c.NativeHttpClient - Send request - POST https://api.jpush.cn/v3/push
18-09-26 13:53:13.938 DEBUG         c.j.c.c.NativeHttpClient - Request Content - {"platform":["android","ios"],"audience":{"tag":["test35","test34","test33","test88","test4","test5","test8","test9","test6","XiePingPing","test40","test95","test50","test60"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":807190386,"apns_production":false}}
18-09-26 13:53:14.095 DEBUG  c.j.common.resp.ResponseWrapper - JPush API Rate Limiting params - quota:600, remaining:597, reset:60
{}
	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:193)
	at com.syswin.property.service.utils.JPushUtil.sendToAndroid_and_ios(JPushUtil.java:45)
	at com.syswin.property.service.etsapp.controller.MessageController.getMessage(MessageController.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)18-09-26 13:53:14.097 WARN          c.j.c.c.NativeHttpClient - Got error response - responseCode:400, responseContent:{"msg_id":"36028799699491744","error":{"code":1011,"message":"cannot find user by this audience"}}
18-09-26 13:53:14.097 ERROR         c.j.c.c.NativeHttpClient - Your request params is invalid. Please check them according to error message.
request error
Error response from JPush server. Should review and fix it. {}
HTTP Status: 400
Error Code: 1011
Error Message: cannot find user by this audience

	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	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:218)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	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)
list-----1------>14
list-----2------>14
推送失败

(hoan) #15

看这个

[{
"Syswin":[{"status":1,"msg":"工单提交成功!"}]
}]
}


消息接收的param-->MessageParam [id=18092613492500040000, type=CustomerService, title=一般报事:KF20180926134937454, content=您有新的待接单1的客服工单, tag=13537639063,admin,chensq,demo10,liming,tangxc,test1,test10,test100,test101,test106,test110,test111,test118,test119,test12,test120,test121,test123,test125,test126,test13,test15,test17,test18,test195,test197,test2,test20,test22,test23,test24,test25,test26,test27,test28,test3,test30,test31,test32,test33,test34,test35,test4,test40,test5,test50,test6,test60,test8,test88,test9,test95,XiePingPing, status=Accepting, url=null, fromTag=null, projId=null, memberId=null, orderState=null, orderType=null]
13537639063
admin
chensq
demo10
liming
tangxc
test1
test10
test100
test101
test106
test110
test111
test118
test119
test12
test120
test121
test123
test125



18-09-26 13:53:12.932 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
18-09-26 13:53:12.942 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
18-09-26 13:53:12.944 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
18-09-26 13:53:12.946 INFO          c.j.c.c.NativeHttpClient - Created instance with connectionTimeout 5,000, readTimeout 30,000, maxRetryTimes 3, SSL Version TLS
pushPayload----------->{"platform":["android","ios"],"audience":{"tag":["test12","demo10","test10","test110","test121","admin","test100","test111","test120","tangxc","test1","test118","test119","test106","chensq","liming","test125","test101","test123","13537639063"]},"notification":{"alert":"您有新的待接单1的客服工单","android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"},"ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"}},"options":{"sendno":285051879,"apns_production":false}}
18-09-26 13:53:12.969 DEBUG         c.j.c.c.NativeHttpClient - Send request - POST https://api.jpush.cn/v3/push
18-09-26 13:53:12.969 DEBUG         c.j.c.c.NativeHttpClient - Request Content - {"platform":["android","ios"],"audience":{"tag":["test12","demo10","test10","test110","test121","admin","test100","test111","test120","tangxc","test1","test118","test119","test106","chensq","liming","test125","test101","test123","13537639063"]},"notification":{"alert":"您有新的待接单1的客服工单","android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"},"ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"}},"options":{"sendno":285051879,"apns_production":false}}
18-09-26 13:53:13.689 DEBUG  c.j.common.resp.ResponseWrapper - JPush API Rate Limiting params - quota:600, remaining:599, reset:60
18-09-26 13:53:13.689 WARN          c.j.c.c.NativeHttpClient - Got error response - responseCode:400, responseContent:{"msg_id":"58546796402071682","error":{"code":1011,"message":"cannot find user by this audience"}}
18-09-26 13:53:13.689 ERROR         c.j.c.c.NativeHttpClient - Your request params is invalid. Please check them according to error message.
request error
Error response from JPush server. Should review and fix it. {}
HTTP Status: 400
Error Code: 1011
Error Message: cannot find user by this audience
{}
	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:193)
	at com.syswin.property.service.utils.JPushUtil.sendToAndroid_and_ios(JPushUtil.java:45)
	at com.syswin.property.service.etsapp.controller.MessageController.getMessage(MessageController.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	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:218)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	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)
	
	
list-----1------>20

test126
test13
test15
test17
test18
test195
test197
test2
test20
test22
test23
test24
test25
test26
test27
test28
test3
test30
test31
test32
pushPayload----------->{"platform":["android","ios"],"audience":{"tag":["test27","test15","test26","test25","test13","test24","test23","test22","test32","test20","test31","test197","test195","test18","test17","test28","test2","test3","test126","test30"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":975684216,"apns_production":false}}
18-09-26 13:53:13.709 DEBUG         c.j.c.c.NativeHttpClient - Send request - POST https://api.jpush.cn/v3/push
18-09-26 13:53:13.710 DEBUG         c.j.c.c.NativeHttpClient - Request Content - {"platform":["android","ios"],"audience":{"tag":["test27","test15","test26","test25","test13","test24","test23","test22","test32","test20","test31","test197","test195","test18","test17","test28","test2","test3","test126","test30"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":975684216,"apns_production":false}}
18-09-26 13:53:13.930 DEBUG  c.j.common.resp.ResponseWrapper - JPush API Rate Limiting params - quota:600, remaining:598, reset:60
18-09-26 13:53:13.931 DEBUG         c.j.c.c.NativeHttpClient - Succeed to get response OK - responseCode:200
18-09-26 13:53:13.931 DEBUG         c.j.c.c.NativeHttpClient - Response Content - {"sendno":"975684216","msg_id":"38280598078370161"}
list----------->20
list-----1------>20


test33
test34
test35
test4
test40
test5
test50
test6
test60
test8
test88
test9
test95
XiePingPing


pushPayload----------->{"platform":["android","ios"],"audience":{"tag":["test35","test34","test33","test88","test4","test5","test8","test9","test6","XiePingPing","test40","test95","test50","test60"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":807190386,"apns_production":false}}
18-09-26 13:53:13.938 DEBUG         c.j.c.c.NativeHttpClient - Send request - POST https://api.jpush.cn/v3/push
18-09-26 13:53:13.938 DEBUG         c.j.c.c.NativeHttpClient - Request Content - {"platform":["android","ios"],"audience":{"tag":["test35","test34","test33","test88","test4","test5","test8","test9","test6","XiePingPing","test40","test95","test50","test60"]},"notification":{"alert":"您有新的待接单1的客服工单","ios":{"alert":{"title":"一般报事:KF20180926134937454","subtitle":"您有新的待接单1的客服工单"},"extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"badge":"+1","sound":"happy"},"android":{"alert":"您有新的待接单1的客服工单","extras":{"notice":"{\"id\":\"18092613492500040000\",\"type\":\"CustomerService\",\"status\":\"Accepting\"}"},"title":"一般报事:KF20180926134937454"}},"options":{"sendno":807190386,"apns_production":false}}
18-09-26 13:53:14.095 DEBUG  c.j.common.resp.ResponseWrapper - JPush API Rate Limiting params - quota:600, remaining:597, reset:60
{}
	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:193)
	at com.syswin.property.service.utils.JPushUtil.sendToAndroid_and_ios(JPushUtil.java:45)
	at com.syswin.property.service.etsapp.controller.MessageController.getMessage(MessageController.java:64)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)18-09-26 13:53:14.097 WARN          c.j.c.c.NativeHttpClient - Got error response - responseCode:400, responseContent:{"msg_id":"36028799699491744","error":{"code":1011,"message":"cannot find user by this audience"}}

	

18-09-26 13:53:14.097 ERROR         c.j.c.c.NativeHttpClient - Your request params is invalid. Please check them according to error message.
request error
Error response from JPush server. Should review and fix it. {}
HTTP Status: 400
Error Code: 1011
Error Message: cannot find user by this audience

	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	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:218)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	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)
list-----1------>14
list-----2------>14
推送失败

#16

根据日志看,上述这些 tag 下都没有目标存在,所以整体报错了 1011.

这些 tag 里面是有目标的,所以没报错,推送成功。


(hoan) #17

好的 谢谢 那我等会找几个手机注册下


(hoan) #18

image

指定tag test002 没有收到 tag001收到了


#19

1、根据日志看,给 test002 发送没报错

2、在客户端或服务端调 API查询你这个设备是否有成功设置了 test002 这个 tag

别名/标签推送失败,请检查「推送消息的当时」该App是否有设置别名/标签成功

客户端需要看callback回调:code为0且返回别名/标签值
服务端查询别名绑定关系: https://docs.jiguang.cn/jpush/server/push/rest_api_v3_device/

新版本SDK提供的新接口已支持在客户端进行增删改查,可调 get 方法进行查询
https://docs.jiguang.cn/jpush/client/Android/android_api/#aliastag
https://docs.jiguang.cn/jpush/client/iOS/ios_api/#api-ios


(hoan) #20

晚上的时候是不是 服务器不稳定 延时好久