小编Sta*_*bax的帖子

APNS ssl://gateway.sandbox.push.apple.com:2195连接失败

我尝试制作推送通知服务器.我通过telnet连接到ssl://gateway.sandbox.push.apple.com:2195.

telnet gateway.sandbox.push.apple.com 2195
Trying 17.172.232.229...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.
Run Code Online (Sandbox Code Playgroud)

我的*.pem还可以(我在另一台服务器上使用它).我在另一台服务器上使用SAME项目,它在那里工作,但其他服务器上的克隆没有.

我得到这些错误:

Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: error:14094415:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate expired in /var/www/try.php on line 69

Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in /var/www/try.php on line 69

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /var/www/try.php on line 69
Run Code Online (Sandbox Code Playgroud)

证书未过期,它适用于其他服务器,日期相同.

有人知道错误是什么吗?

我继续努力

Apache/2.2.9 (Debian) PHP/5.2.17-0.dotdeb.0 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g
Run Code Online (Sandbox Code Playgroud)

编辑:似乎,在不同的服务器上使用相同的证书不起作用.也许这被Apples服务器阻止了.

ssl push apple-push-notifications

15
推荐指数
2
解决办法
8万
查看次数

不允许在Web线程上进行多次锁定!请提交一个错误.现在崩溃了

我做了一个url-Request并等待答案

我启动请求,然后等待,直到synchronousOperationComplete = TRUE

NSRunLoop *theRL = [NSRunLoop currentRunLoop];

while (!synchronousOperationComplete && [theRL runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]);
Run Code Online (Sandbox Code Playgroud)

然后我回复了

一切似乎都没问题,我得到了回应,一切正常,但当我关闭应用程序时,我得到:

bool _WebTryThreadLock(bool), 0x227f40: Multiple locks on web thread not allowed! Please file a bug. Crashing now...

1   _ZL17_WebTryThreadLockb
2   _ZL14WebRunLoopLockP19__CFRunLoopObservermPv
3   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
4   __CFRunLoopDoObservers
5   __CFRunLoopRun
6   CFRunLoopRunSpecific
7   CFRunLoopRunInMode
8   _ZL12RunWebThreadPv
9   _pthread_start
10  thread_start
Run Code Online (Sandbox Code Playgroud)

它似乎是NSRunLoop导致错误的原因,当我推荐它时,错误没有出现.

我使用IOS 5.0确实有人知道我可以做些什么来避免这个错误?

我在IOS 4.3和IOS5 Beta中使用它,它工作正常.

但我把我的tomcat6移动到另一台服务器,也许这是服务器的错误

THX mBax

objective-c nsurlconnection nsrunloop

6
推荐指数
1
解决办法
9208
查看次数

变量具有不完整类型'struct sockaddr_in'

我试着用

 struct sockaddr_in sin;
Run Code Online (Sandbox Code Playgroud)

但是,如果我使用它,我得到

Variable has incomplete type 'struct sockaddr_in' 
Run Code Online (Sandbox Code Playgroud)

Forward declaration of 'struct sockaddr_in'
Run Code Online (Sandbox Code Playgroud)

作为错误.我使用Xcode4时出错.在Xcode3.2中它可以工作.有人知道如何解决这个错误吗?我的进口是

#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#include <netdb.h>
#import <SystemConfiguration/SCNetworkReachability.h>
Run Code Online (Sandbox Code Playgroud)

iphone compiler-errors objective-c ios ios5

5
推荐指数
1
解决办法
1万
查看次数

fileNotFoundException但文件存在

在我的FileInputStream中我得到一个FileNotFoundException,但我知道他的文件存在,我可以用webbrowser下载它.

如果我将链接从异常复制到webbrowser,它也可以工作.对于每个人来说,RWX都有权利进行测试,但这没有用.

文件名中没有特殊标志......我不知道为什么会失败..

thx 4帮助!

编辑:

KeyStore ts = KeyStore.getInstance("PKCS12");
ts.load(new FileInputStream("http://192.168.1.1/ordner/myFile.p12"), passwKey);
KeyManagerFactory tmf = KeyManagerFactory.getInstance("SunX509");
tmf.init(ts, passwKey);
Run Code Online (Sandbox Code Playgroud)

出于安全原因,我更改了链接

java file filenotfoundexception

3
推荐指数
1
解决办法
2003
查看次数