windows server2008R2 推送出现错误

sdk_csharp
jpush
标签: #<Tag:0x00007fb83f49fa80> #<Tag:0x00007fb83f49f940>

#1

C#程序集成。在本地调试可以正常推送放到服务器上就出现推送错误
异常消息:The underlying connection was closed: An unexpected error occurred on a send.
堆栈错误提示:

    [APIConnectionException: The underlying connection was closed: An unexpected error occurred on a send.]
       cn.jpush.api.common.BaseHttpClient.sendRequest(String method, String url, String auth, String reqParams) +3747
       cn.jpush.api.common.BaseHttpClient.sendPost(String url, String auth, String reqParams) +55
       cn.jpush.api.push.PushClient.sendPush(String payloadString) +215
       cn.jpush.api.push.PushClient.sendPush(PushPayload payload) +129
       cn.jpush.api.JPushClient.SendPush(PushPayload payload) +70
       BarterWeb.Common.UtilsToJiGuang.PushObject_All_All_Alert(String Alert) +427
       BarterWeb.Admin.Main.Unnamed1_Click(Object sender, EventArgs e) +92
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

#2

推送json
{“platform”:“all”,“audience”:“all”,“notification”:{“ios”:{“sound”:“happy”,“badge”:“0”,“alert”:“测试推送11–EEE部落”,“extras”:{“from”:“Jpush”}},“android”:{“alert”:“测试推送”,“extras”:{“from”:“Jpush”}}},“options”:{“apns_production”:false}}

推送地址https://api.jpush.cn/v3/push

文本打印出来的异常:

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.TlsStream.CallProcessAuthentication(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at cn.jpush.api.common.BaseHttpClient.sendRequest(String method, String url, String auth, String reqParams)

#3

极光SDK版本号多少

网上搜索一下报错呢?
http://bbs.csdn.net/topics/70228448

极光这边就是要求443端口


#4

版本号我也不清楚,我是下载的Github上的Demo,本地编译然后引用到项目中的。我在本地测试就可以发送成功,放到服务器上就不行了


#5

怎么检查443端口是否开了?


#6

telnet api.jpush.cn 443
ping api.jpush.cn


#7

telnet 和 ping 都能通



#8

你网上搜索一下类似的报错参考解决一下,这个与极光的服务没有什么关系


(程序员) #9

你好 你这个问题解决了吗,现在碰到跟你一模一样的问题,本地调试怎么都可以到服务器上就不行了 报错
“message”: “The underlying connection was closed: An unexpected error occurred on a send.”


#10

我从官网上重新下载了1.0.11版本的Demo,然后就成功了


#11