Axis2 Rampart Internal Server Error - axis2

I am struggling with Axis2 1.6.2 with rampart 1.6.2 ,jdk 1.5 and tomcat 5.0. I am using eclipse and generated All classes from WSDL. After installing rampart module I am getting some weird error. I am not able to figure out what is the problem. Any help would be appreciated. Thanks in Advance.
The DEBUG LOG is as follows:
[DEBUG] Call Stack = DEBUG_FRAME = org.apache.axis2.util.JavaUtils.callStackToString(JavaUtils.java:564)
DEBUG_FRAME = org.apache.axis2.description.ParameterIncludeImpl.debugParameterAdd(ParameterIncludeImpl.java:352)
DEBUG_FRAME = org.apache.axis2.description.ParameterIncludeImpl.addParameter(ParameterIncludeImpl.java:134)
DEBUG_FRAME = org.apache.axis2.description.AxisDescription.addParameter(AxisDescription.java:108)
DEBUG_FRAME = org.apache.axis2.deployment.WarBasedAxisConfigurator.setConfigContext(WarBasedAxisConfigurator.java:345)
DEBUG_FRAME = org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:89)
DEBUG_FRAME = org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
DEBUG_FRAME = org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
DEBUG_FRAME = org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
DEBUG_FRAME = org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:701)
DEBUG_FRAME = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
DEBUG_FRAME = org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
DEBUG_FRAME = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
DEBUG_FRAME = org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
DEBUG_FRAME = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
DEBUG_FRAME = org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
DEBUG_FRAME = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
DEBUG_FRAME = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
DEBUG_FRAME = org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
DEBUG_FRAME = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
DEBUG_FRAME = org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
DEBUG_FRAME = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
DEBUG_FRAME = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
DEBUG_FRAME = org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
DEBUG_FRAME = org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
DEBUG_FRAME = org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
DEBUG_FRAME = org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
DEBUG_FRAME = org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
DEBUG_FRAME = org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
DEBUG_FRAME = org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
DEBUG_FRAME = org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
DEBUG_FRAME = java.lang.Thread.run(Thread.java:595)
[DEBUG] ==================
[DEBUG] Initializing Velocity template engine
[DEBUG] servletPath=/axis2-web/Error/error500.jsp, pathInfo=null, queryString=null, name=null
[DEBUG] Path Based Forward
[DEBUG] Returning non-STM instance
[DEBUG] JspEngine --> /axis2-web/Error/error500.jsp
[DEBUG] ServletPath: /axis2-web/Error/error500.jsp
[DEBUG] PathInfo: null
[DEBUG] RealPath: /home/praveen/eclipse_workspace_highr/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PaymentsWebService/axis2-web/Error/error500.jsp
[DEBUG] RequestURI: /PaymentsWebService/axis2-web/Error/error500.jsp
[DEBUG] QueryString: null
[DEBUG] Request Params:
[DEBUG] servletPath=/axis2-web/include/httpbase.jsp, pathInfo=null, queryString=null, name=null
[DEBUG] Path Based Include
[DEBUG] Returning non-STM instance
[DEBUG] JspEngine --> /axis2-web/include/httpbase.jsp
[DEBUG] ServletPath: /axis2-web/Error/error500.jsp
[DEBUG] PathInfo: null
[DEBUG] RealPath: /home/praveen/eclipse_workspace_high/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PaymentsWebService/axis2-web/include/httpbase.jsp
[DEBUG] RequestURI: /PaymentsWebService/axis2-web/Error/error500.jsp
[DEBUG] QueryString: null
[DEBUG] Request Params:
[DEBUG] Disabling the response for futher output

Related

nginx stream_ssl_preread module unable to read ssl_preread_server_name

I am trying to set up nginx to map TLS connections to different backends based on the SNI server name. From what I can tell, my client is sending the server name, but the preread module is only reading a hyphen.
Here is my nginx congif:
stream {
map_hash_bucket_size 64;
############################################################
### logging
log_format log_stream '$remote_addr [$time_local] $protocol [$ssl_preread_server_name] [$ssl_preread_alpn_protocols] [$instanceport] '
'$status $bytes_sent $bytes_received $session_time';
error_log /usr/home/glance/Logs/pservernginx.error.log info;
access_log /usr/home/glance/Logs/pservernginx.access.log log_stream;
############################################################
### ssl configuration
ssl_certificate /usr/home/glance/GlanceReleases/star.myglance.org.pem;
ssl_certificate_key /usr/home/glance/GlanceReleases/star.myglance.org.pem;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
limit_conn_zone $binary_remote_addr zone=ip_addr:10m;
########################################################################
### Raw TLS PServer Connections
### Listen for TLS on 5501 and forward to TCP sock 6500 (socket port)
### https://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html
map $ssl_preread_server_name $instanceport {
presence.myglance.org 6500;
presence-1.myglance.org 6501;
presence-2.myglance.org 6502;
default glance-no-upstream-instance-configured;
}
server {
listen 5501 ssl;
ssl_preread on;
proxy_connect_timeout 20s; # max time to connect to pserver
proxy_timeout 30s; # max time between successive reads or writes
proxy_pass 127.0.0.1:$instanceport;
}
}
wireshark shows the Server Name header:
The nginx access log shows only hyphens for the preread variables:
108.49.96.66 [12/Apr/2019:11:50:58 +0000] TCP [-] [-] [glance-no-upstream-instance-configured] 500 0 0 0.066
I'm running nginx 1.14.2 on FreeBSD. How can I debug what is happening in the preread module?
================ UPDATE ===============
Turned on debug logging. Maybe "ssl preread: not a handshake" is a clue.
2019/04/12 14:49:50 [info] 61420#0: *9 client 108.49.96.66:54740 connected to 0.0.0.0:5501
2019/04/12 14:49:50 [debug] 61420#0: *9 posix_memalign: 0000000801C35000:256 #16
2019/04/12 14:49:50 [debug] 61419#0: accept on 0.0.0.0:5501, ready: 1
2019/04/12 14:49:50 [debug] 61419#0: accept() not ready (35: Resource temporarily unavailable)
2019/04/12 14:49:50 [debug] 61420#0: *9 posix_memalign: 0000000801C35600:256 #16
2019/04/12 14:49:50 [debug] 61420#0: *9 generic phase: 0
2019/04/12 14:49:50 [debug] 61420#0: *9 generic phase: 1
2019/04/12 14:49:50 [debug] 61420#0: *9 generic phase: 2
2019/04/12 14:49:50 [debug] 61420#0: *9 tcp_nodelay
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_do_handshake: -1
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_get_error: 2
2019/04/12 14:49:50 [debug] 61420#0: *9 kevent set event: 5: ft:-1 fl:0025
2019/04/12 14:49:50 [debug] 61420#0: *9 event timer add: 5: 60000:29203481224
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL handshake handler: 0
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_do_handshake: 1
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL: TLSv1.2, cipher: "ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD"
2019/04/12 14:49:50 [debug] 61420#0: *9 event timer del: 5: 29203481224
2019/04/12 14:49:50 [debug] 61420#0: *9 generic phase: 2
2019/04/12 14:49:50 [debug] 61420#0: *9 ssl preread handler
2019/04/12 14:49:50 [debug] 61420#0: *9 malloc: 0000000801CFF000:16384
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_read: -1
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_get_error: 2
2019/04/12 14:49:50 [debug] 61420#0: *9 ssl preread handler
2019/04/12 14:49:50 [debug] 61420#0: *9 posix_memalign: 0000000801C35900:256 #16
2019/04/12 14:49:50 [debug] 61420#0: *9 event timer add: 5: 30000:29203451252
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_read: 81
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_read: -1
2019/04/12 14:49:50 [debug] 61420#0: *9 SSL_get_error: 2
2019/04/12 14:49:50 [debug] 61420#0: *9 ssl preread handler
2019/04/12 14:49:50 [debug] 61420#0: *9 ssl preread: not a handshake
2019/04/12 14:49:50 [debug] 61420#0: *9 event timer del: 5: 29203451252
2019/04/12 14:49:50 [debug] 61420#0: *9 proxy connection handler
2019/04/12 14:49:50 [debug] 61420#0: *9 malloc: 0000000801DF7000:400
2019/04/12 14:49:50 [debug] 61420#0: *9 malloc: 0000000801CD9000:16384
2019/04/12 14:49:50 [debug] 61420#0: *9 stream map started
2019/04/12 14:49:50 [debug] 61420#0: *9 stream map: "" "glance-no-upstream-instance-configured"
================= UPDATE 2 ======================
I tested using
openssl s_client -connect ... -servername ...
instead of my client. Now it appears that the preread module is blocked waiting for data for 30 seconds (error code 2 is WANT_READ):
2019/04/23 13:04:30 [debug] 61419#0: *12844 SSL: TLSv1.2, cipher: "ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD"
2019/04/23 13:04:30 [debug] 61419#0: *12844 event timer del: 3: 30147561850
2019/04/23 13:04:30 [debug] 61419#0: *12844 generic phase: 2
2019/04/23 13:04:30 [debug] 61419#0: *12844 ssl preread handler
2019/04/23 13:04:30 [debug] 61419#0: *12844 malloc: 0000000801CA6140:16384
2019/04/23 13:04:30 [debug] 61419#0: *12844 SSL_read: -1
2019/04/23 13:04:30 [debug] 61419#0: *12844 SSL_get_error: 2
2019/04/23 13:04:30 [debug] 61419#0: *12844 ssl preread handler
2019/04/23 13:04:30 [debug] 61419#0: *12844 posix_memalign: 0000000801DB3400:256 #16
2019/04/23 13:04:30 [debug] 61419#0: *12844 event timer add: 3: 30000:30147531898
2019/04/23 13:05:00 [debug] 61419#0: *12844 event timer del: 3: 30147531898
2019/04/23 13:05:00 [debug] 61419#0: *12844 finalize stream session: 200
2019/04/23 13:05:00 [debug] 61419#0: *12844 stream log handler
2019/04/23 13:05:00 [debug] 61419#0: *12844 stream map started
2019/04/23 13:05:00 [debug] 61419#0: *12844 stream script var: ""
I found the problem:
listen 5501 **ssl**;
ssl_preread on;
ssl in the listen directive caused that nginx server to do the ssl handshake. By the time the preread module was notified, the handshake bytes had already been consumed, which is all consistent with the behavior I was seeing. In my case, I still want nginx to offload the encryption. So I created a set of nginx server directives to terminate the ssl connection before passing to my back end.
This is the relevant portion of my nginx config after fixing it. Note that the last server directive (the one that uses ssl_preread) does not terminate the SSL connection.
########################################################################
### TLS Connections
### Listen for TLS on 5501 and forward to TCP sock 6500 (socket port)
### https://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html
map $ssl_preread_server_name $instanceport {
presence.myglance.org 5502;
presence-1.myglance.org 5503;
presence-2.myglance.org 5504;
default glance-no-upstream-instance-configured;
}
server {
listen 5502 ssl;
ssl_preread off;
proxy_pass 127.0.0.1:6502;
}
server {
listen 5503 ssl;
ssl_preread off;
proxy_pass 127.0.0.1:6503;
}
server {
listen 5504 ssl;
ssl_preread off;
proxy_pass 127.0.0.1:6504;
}
server {
listen 5501;
ssl_preread on;
proxy_connect_timeout 20s; # max time to connect to pserver
proxy_timeout 30s; # max time between successive reads or writes
proxy_pass 127.0.0.1:$instanceport;
}
In case you need to use ssl in listen directive, you can simply use $ssl_server_name in the map block instead of $ssl_preread_server_name

How to find nested element in Android Appium testing?

I am new to Appium. I searched the web and tried several ways, but nothing worked. Please find the code below:
driver.findElementByXPath("//android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[#resource-id=\"in.dmart:id/linear_guide_view_skip\"]/android.widget.android.widget.TextView").click();
And
driver.findElementByXPath("//android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.android.widget.TextView[1]").click();
And
driver.findElementByAndroidUIAutomator("text(\"GOT IT\")").click();
And
List<WebElement>textView=driver.findElements(By.className("android.widget.android.widget.TextView"));
for(i=0;i<textView.size();i++){
if(textView.get(i).getText().equals("GOT IT"))
textView.get(i).click()
}
Please find UIAutomator Viewer screenshot attached:
Server logs :
[debug] [W3C] Calling AppiumDriver.findElements() with args: ["class name","android.widget.android.widget.TextView","e75769f1-53cb-44f7-9094-988b73fbc7be"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"class name","selector":"android.widget.android.widget.TextView","context":"","multiple":true}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"class name","selector":"android.widget.android.widget.TextView","context":"","multiple":true}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'android.widget.android.widget.TextView' using 'CLASS_NAME' with the contextId: '' multiple: true
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[CLASS=android.widget.android.widget.TextView]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[CLASS=android.widget.android.widget.TextView]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[CLASS=android.widget.android.widget.TextView, INSTANCE=0]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding 'android.widget.android.widget.TextView' using 'CLASS_NAME' with the contextId: '' multiple: true
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[CLASS=android.widget.android.widget.TextView]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[CLASS=android.widget.android.widget.TextView]
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[CLASS=android.widget.android.widget.TextView, INSTANCE=0]
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":[]}
[debug] [W3C] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/e75769f1-53cb-44f7-9094-988b73fbc7be/elements 200 13691 ms - 12
You can try like this. Please edit className value if it is different as per your app.
get all elements of class name
Click where text is "GOT IT"
List<WebElement>textView =
driver.findElements(By.className("android.widget.TextView"));
for(i=0;i<textView.size();i++){
if(textView.get(i).getText().equals("GOT IT"))
textView.get(i).click()
}
By looking at the view hierarchy, to locate the TextView you don't need to worry about nested views.
You can try with UiSelector() from UIAutomator as an example below. Refer to UiSelector documentation here.
driver.findElementByAndroidUIAutomator("new UiSelector().text(\""+GOT IT+"\")").click();
Update:
Try casting driver with AndroidDriver.
((AndroidDriver<MobileElement>)driver).findElementByAndroidUIAutomator("new UiSelector().text(\"GOT IT\")");

geckodriver connection refused

I try to get my selenium tests running on a debian server, but I keep getting connection refused error from my geckodriver. On my local machine it works perfectly which is running Ubuntu. Does any of you have an idea what is wrong? I wasn't able to find anything helpful.
OS: Debian Jessie
Build Tool: Gradle
Java-Version: 8
Setup Method
public static void setUp() {
//System.setProperty("webdriver.gecko.driver", "geckodriver.exe"); //For debugging in windows
System.setProperty("webdriver.gecko.driver", "geckodriver"); //for execution on linux
//Bypass System.err while loading Webdriver
PrintStream err = System.err;
System.setErr(new PrintStream(new NullOutputStream()));
driver = new FirefoxDriver();
System.setErr(err);
webDriverWait = new WebDriverWait(driver, 1000);
}
Error Message
org.openqa.selenium.WebDriverException: connection refused
14:44:04.899 [DEBUG] [TestEventLogger] Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
14:44:04.899 [DEBUG] [TestEventLogger] System info: host: 'security', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-4-amd64', java.version: '1.8.0_131'
14:44:04.899 [DEBUG] [TestEventLogger] Driver info: driver.version: FirefoxDriver
14:44:04.899 [DEBUG] [TestEventLogger] remote stacktrace: stack backtrace:
14:44:04.899 [DEBUG] [TestEventLogger] 0: 0x4fa94d - backtrace::backtrace::trace::h45ace4059cd74233
14:44:04.899 [DEBUG] [TestEventLogger] 1: 0x4fae32 - backtrace::capture::Backtrace::new::hb5a725a088a2a2fc
14:44:04.900 [DEBUG] [TestEventLogger] 2: 0x4349d9 - webdriver::error::WebDriverError::new::h449345a591a119fd
14:44:04.900 [DEBUG] [TestEventLogger] 3: 0x43f6b0 - geckodriver::marionette::MarionetteHandler::create_connection::h53f581202e4008b4
14:44:04.900 [DEBUG] [TestEventLogger] 4: 0x442839 - >::handle_command::hd89c5efbeb4c7cd5
14:44:04.900 [DEBUG] [TestEventLogger] 5: 0x434e94 - webdriver::server::start::{{closure}}::h5e71183f67357de6
14:44:04.900 [DEBUG] [TestEventLogger] 6: 0x408627 - std::panicking::try::do_call::h8c30e6af4c7f85af
14:44:04.904 [DEBUG] [TestEventLogger] 7: 0x5b77fa - panic_unwind::__rust_maybe_catch_panic
14:44:04.904 [DEBUG] [TestEventLogger] at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/src/libpanic_unwind/lib.rs:98
14:44:04.907 [DEBUG] [TestEventLogger] 8: 0x416e57 - >::call_box::h3f273b2445d78deb
14:44:04.907 [DEBUG] [TestEventLogger] 9: 0x5b0014 - alloc::boxed::{{impl}}::call_once<(),()>
14:44:04.907 [DEBUG] [TestEventLogger] at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/src/liballoc/boxed.rs:624
14:44:04.907 [DEBUG] [TestEventLogger] - std::sys_common::thread::start_thread
14:44:04.907 [DEBUG] [TestEventLogger] at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/src/libstd/sys_common/thread.rs:21
14:44:04.907 [DEBUG] [TestEventLogger] - std::sys::imp::thread::{{impl}}::new::thread_start
14:44:04.908 [DEBUG] [TestEventLogger] at /buildslave/rust-buildbot/slave/stable-dist-rustc-musl-linux/build/src/libstd/sys/unix/thread.rs:84
14:44:04.908 [DEBUG] [TestEventLogger] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
14:44:04.908 [DEBUG] [TestEventLogger] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
14:44:04.908 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
14:44:04.908 [DEBUG] [TestEventLogger] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
14:44:04.908 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
14:44:04.908 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
14:44:04.908 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$22(ProtocolHandshake.java:365)
14:44:04.908 [DEBUG] [TestEventLogger] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
14:44:04.908 [DEBUG] [TestEventLogger] at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
14:44:04.909 [DEBUG] [TestEventLogger] at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
14:44:04.909 [DEBUG] [TestEventLogger] at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
14:44:04.909 [DEBUG] [TestEventLogger] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
14:44:04.909 [DEBUG] [TestEventLogger] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
14:44:04.910 [DEBUG] [TestEventLogger] at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
14:44:04.910 [DEBUG] [TestEventLogger] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
14:44:04.911 [DEBUG] [TestEventLogger] at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
14:44:04.911 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:368)
14:44:04.911 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159)
14:44:04.911 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
14:44:04.911 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
14:44:04.912 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
14:44:04.914 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250)
14:44:04.914 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
14:44:04.798 [DEBUG] [org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor] Executing test class ch.siroop.security.test.a2.Cookies_Session
14:44:04.922 [DEBUG] [TestEventLogger] at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:137)
14:44:04.922 [DEBUG] [TestEventLogger] at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:191)
14:44:04.922 [DEBUG] [TestEventLogger] at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108)
14:44:04.923 [DEBUG] [TestEventLogger] at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:104)
14:44:04.923 [DEBUG] [TestEventLogger] at ch.siroop.security.test.a2.Login.setUp(Login.java:40)
14:44:04.923 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:44:04.923 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:44:04.923 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:44:04.923 [DEBUG] [TestEventLogger] at java.lang.reflect.Method.invoke(Method.java:498)
14:44:04.923 [DEBUG] [TestEventLogger] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
14:44:04.924 [DEBUG] [TestEventLogger] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
14:44:04.924 [DEBUG] [TestEventLogger] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
14:44:04.926 [DEBUG] [TestEventLogger] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
14:44:04.926 [DEBUG] [TestEventLogger] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
14:44:04.927 [DEBUG] [TestEventLogger] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
14:44:04.927 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)
14:44:04.927 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)
14:44:04.927 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)
14:44:04.927 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
14:44:04.927 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:44:04.927 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:44:04.927 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:44:04.927 [DEBUG] [TestEventLogger] at java.lang.reflect.Method.invoke(Method.java:498)
14:44:04.927 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
14:44:04.927 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
14:44:04.930 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
14:44:04.930 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
14:44:04.934 [DEBUG] [TestEventLogger] at com.sun.proxy.$Proxy3.processTestClass(Unknown Source)
14:44:04.934 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)
14:44:04.936 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:44:04.937 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:44:04.937 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:44:04.937 [DEBUG] [TestEventLogger] at java.lang.reflect.Method.invoke(Method.java:498)
14:44:04.937 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
14:44:04.937 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
14:44:04.937 [DEBUG] [TestEventLogger] at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
14:44:04.937 [DEBUG] [TestEventLogger] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
14:44:04.937 [DEBUG] [TestEventLogger] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
14:44:04.937 [DEBUG] [TestEventLogger] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
14:44:04.937 [DEBUG] [TestEventLogger] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
14:44:04.937 [DEBUG] [TestEventLogger] at java.lang.Thread.run(Thread.java:748)
I could finally figure out what caused the issue, I started the tests through ssh therefore the geckodriver didn't work. You have to add export DISPLAY=:0 to make it work. This tells Firefox how to use the display server.
Make sure that your version of gecko driver and Firefox is same i.e. both should be either 32 bit or 64 bit.

Adapter call fails after enabling Application Authenticity

I've tried to enable Basic Application Authenticity for the sample "OfflineAuthentication" hybrid iOS app. However, the adapter call fails, any ideas?
Here's the code:
authenticationConfig.xml:
<customSecurityTest name="myCustomSecurityTest">
<test realm="wl_authenticityRealm" step="1"/>
<test isInternalUserID="true" realm="myCustomRealm"/>
<test isInternalDeviceID="true" realm="wl_deviceNoProvisioningRealm" step="2"/>
</customSecurityTest>
<!--DO i need to include wl_authenticityRealm here as well?-->
<customSecurityTest name="SubscribeServlet">
<test isInternalUserID="true" realm="SubscribeServlet"/>
</customSecurityTest>
application-descriptor.xml:
<iphone bundleId="com.OfflineAuthSample" applicationId="OfflineAuthSample" version="1.0" securityTest="myCustomSecurityTest">
MobileFirst Console shows basic app authenticity is enabled
Here's the log:
2016-10-01 18:20:34.518875 OfflineAuthSample[3807:1252807] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/7F4A0DF9-95B0-4C21-AC73-9A758BAD1DE9/Library/Cookies/Cookies.binarycookies 2016-10-01 18:20:34.647379 OfflineAuthSample[3807:1252807] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-736h 2016-10-01 18:20:34.681607 OfflineAuthSample[3807:1252807] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-736h 2016-10-01 18:20:34.683230 OfflineAuthSample[3807:1252807] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x10090d0c0>. 2016-10-01 18:20:34.701919 OfflineAuthSample[3807:1252879] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:71 :: {
"application id" = OfflineAuthSample;
"application version" = "1.0";
authenticitySharedData = "${authenticitySharedData}";
buildtime = 1475317232;
environment = iphone;
host = "52.77.249.78";
ignoredFileExtensions = "";
platformVersion = "7.1.0.0";
port = 9080;
protocol = http;
testWebResourcesChecksum = false;
wlAppFamily = "";
wlMainFile = "index.html";
wlSecureDirectUpdatePublicKey = "";
wlServerContext = "/testssl/";
wlShareCookies = "";
wlShareUserCert = false;
wlUid = "dB6EhEirkRwkU04A5lgiRw=="; } 2016-10-01 18:20:34.703147 OfflineAuthSample[3807:1252879] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:127 :: At first launch 2016-10-01 18:20:34.706276 OfflineAuthSample[3807:1252879] [DEBUG] [WL_INIT] -[WLImpl initWL] in WLImpl.m:153 :: Web resources should not be extracted. 2016-10-01 18:20:34.902355 OfflineAuthSample[3807:1252807] Apache Cordova native platform version 3.7.0 is starting. 2016-10-01 18:20:34.902559 OfflineAuthSample[3807:1252807] Multi-tasking -> Device: YES, App: YES 2016-10-01 18:20:34.908168 OfflineAuthSample[3807:1252807] Unlimited access to network resources 2016-10-01 18:20:34.910140 OfflineAuthSample[3807:1252807]
Started backup to iCloud! Please be careful. Your application might be rejected by Apple if you store too much data. For more information please read "iOS Data Storage Guidelines" at: https://developer.apple.com/icloud/documentation/data-storage/ To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2016-10-01 18:20:34.916050 OfflineAuthSample[3807:1252807] [CDVTimer][wlapp] 0.979006ms 2016-10-01 18:20:34.916196 OfflineAuthSample[3807:1252807] [CDVTimer][push] 0.092983ms 2016-10-01 18:20:34.916226 OfflineAuthSample[3807:1252807] [CDVTimer][TotalPluginStartup] 1.177967ms 2016-10-01 18:20:35.073631 OfflineAuthSample[3807:1252807] Resetting plugins due to page load. 2016-10-01 18:20:35.123413 OfflineAuthSample[3807:1252807] Finished load of: file:///var/containers/Bundle/Application/A7F58C8C-D71F-4178-A912-3138602AF24A/OfflineAuthSample.app/www/skinLoader.html 2016-10-01 18:20:35.239499 OfflineAuthSample[3807:1252807] Resetting plugins due to page load. 2016-10-01 18:20:35.332761 OfflineAuthSample[3807:1252807] Finished load of: file:///var/containers/Bundle/Application/A7F58C8C-D71F-4178-A912-3138602AF24A/OfflineAuthSample.app/www/default/index.html 2016-10-01 18:20:35.366708 OfflineAuthSample[3807:1252807] log1 2016-10-01 18:20:35.383488 OfflineAuthSample[3807:1252854] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:35.805118 OfflineAuthSample[3807:1252880] [DEBUG] [NONE] wlclient init started 2016-10-01 18:20:35.806879 OfflineAuthSample[3807:1252852] [DEBUG] [NONE] ondeviceready event dispatched 2016-10-01 18:20:35.808544 OfflineAuthSample[3807:1252854] [DEBUG] [NONE] Read cookies: null 2016-10-01 18:20:35.810495 OfflineAuthSample[3807:1252860] [DEBUG] [NONE] CookieMgr read cookies: {} 2016-10-01 18:20:35.812504 OfflineAuthSample[3807:1252855] [DEBUG] [NONE] before: initOptions.onSuccess 2016-10-01 18:20:35.814665 OfflineAuthSample[3807:1252853] [DEBUG] [NONE] after: initOptions.onSuccess 2016-10-01 18:20:35.816615 OfflineAuthSample[3807:1252880] [DEBUG] [NONE] added onPause and onResume event handlers 2016-10-01 18:20:35.818603 OfflineAuthSample[3807:1252934] [DEBUG] [NONE] wlclient init success 2016-10-01 18:20:37.650366 OfflineAuthSample[3807:1252807] WLReachability Flag Status: WR t------ networkStatusForFlags 2016-10-01 18:20:37.664856 OfflineAuthSample[3807:1252807] THREAD WARNING: ['NetworkDetector'] took '15.065186' ms. Plugin should use a background thread. 2016-10-01 18:20:37.666274 OfflineAuthSample[3807:1252852] [ERROR] [NONE] Unknown realm [myCustomRealm]. null returned for key: isUserAuthenticated 2016-10-01 18:20:37.667460 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT]
+[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:37.669136 OfflineAuthSample[3807:1252880] [DEBUG] [NONE] Request [/apps/services/api/OfflineAuthSample/iphone/login] 2016-10-01 18:20:37.675317 OfflineAuthSample[3807:1252807] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeCertificate:] in WLCertManager.m:243 :: Certificate successfully removed. 2016-10-01 18:20:37.686451 OfflineAuthSample[3807:1252807] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed. 2016-10-01 18:20:37.691977 OfflineAuthSample[3807:1252807] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager removeKey:] in WLCertManager.m:262 :: Key was successfully removed. 2016-10-01 18:20:37.708057 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT]
+[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:37.709332 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AUTH] -[WLAuthorizationManager invokeInstanceRegistrationRequestWithCompletionHandler:] in WLAuthorizationManager.m:548 :: Call instance registration endpoint 2016-10-01 18:20:37.750096 OfflineAuthSample[3807:1252807] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] in WLCertManager.m:225 :: generateKeyPair generating keypair --> Success 2016-10-01 18:20:37.756561 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:37.757615 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/authorization/v1/clients/instance 2016-10-01 18:20:37.759117 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000 2016-10-01 18:20:37.760509 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST]
-[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://52.77.249.78:9080/testssl/authorization/v1/clients/instance) with headers: {
"Accept-Language" = "en-US";
"User-Agent" = "OfflineAuthSample/1.0 (iPhone; iOS 10.0.1; Scale/3.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "A886EC57-DA81-4CF0-8F2D-9A2378124BCB";
"x-wl-platform-version" = "7.1.0.0"; } You can see the request body in the Analytics platform logs. 2016-10-01 18:20:37.765230 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://52.77.249.78:9080/testssl/authorization/v1/clients/instance 2016-10-01 18:20:37.766217 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x174073a00>{number = 1, name = main}) 2016-10-01 18:20:37.767243 OfflineAuthSample[3807:1252807] THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '101.814941' ms. Plugin should use a background thread. 2016-10-01 18:20:38.649720 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:352 :: Request Failed 2016-10-01 18:20:38.651924 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:353 :: Response Status Code : 401 2016-10-01 18:20:38.653315 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:354 :: Response Error : Request failed: unauthorized (401) 2016-10-01 18:20:38.656197 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:38.663312 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/authorization/v1/clients/instance 2016-10-01 18:20:38.665685 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000 2016-10-01 18:20:38.667459 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST]
-[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://52.77.249.78:9080/testssl/authorization/v1/clients/instance) with headers: {
"Accept-Language" = "en-US";
Authorization = "{\"wl_authenticityRealm\":\"1cmUeOcbV/wyYuPi6FRi7/cndEWc8Jg/umF6tuIiUTo=\"}";
"User-Agent" = "OfflineAuthSample/1.0 (iPhone; iOS 10.0.1; Scale/3.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-device-id" = "A886EC57-DA81-4CF0-8F2D-9A2378124BCB";
"x-wl-platform-version" = "7.1.0.0"; } You can see the request body in the Analytics platform logs. 2016-10-01 18:20:38.670973 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://52.77.249.78:9080/testssl/authorization/v1/clients/instance 2016-10-01 18:20:38.672750 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x174073a00>{number = 1, name = main}) 2016-10-01 18:20:38.850841 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:333 :: Request Success 2016-10-01 18:20:38.852492 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:334 :: Response Status Code : 200 2016-10-01 18:20:38.856083 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:335 :: Response Content : {"certificate":"MIICeDCCAWCgAwIBAgIJANfoTRSlEd4vMA0GCSqGSIb3DQEBCwUAMGAxCzAJBgNVBAYTAklMMQswCQYDVQQIEwJJTDERMA8GA1UEBxMIU2hlZmF5aW0xDDAKBgNVBAoTA0lCTTESMBAGA1UECxMJV29ya2xpZ2h0MQ8wDQYDVQQDEwZXTCBEZXYwIBcNMTYxMDAxMTAyMDI5WhgPMjA2NjEwMDExMDIwMjlaMF0xITAfBgoJkiaJk\/IsZAEZFhFPZmZsaW5lQXV0aFNhbXBsZTE4MDYGCgmSJomT8ixkAQETKDdmM2U1ZTc3NmY3OTczMDA1YTFiYTU4MWQ5ZTRmYzIwZDZiMjA2N2IwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAjspPlIymI497gJwvz8wN5kz5elteLzpNgR\/CMWFIZ3fESDPqa+pyOoUq27MzlhCeF5qCsOQRirOpxCTEiFQwfwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCtyM9ayMRlrefJ\/\/9TpGg33Gez\/WiAnOsRLSzCmQGL36Sycny4WrTMKITNSIC9Lgu92PL6lIgqzRUVsepq2\/AXizsZwrjkpFAC4gqzjcgs2C9w+FTRHROayP7xdk532ohL8Q9MyFZjKCkiEJCbLjbWsfywsntmLUHBeg0SehZM\/F5Zv7OD5xTI1mmmjV+\/E12WKwKskXkkJdIAEv+cw1EHYPkr7zzG51jisoK7f+DhMNDAeKJWCxksJycOba0f\/TCHQY\/ssrSwELJs9wD2PGOR030HCXS3xFGVwMDHGXR+t8OKM3Vp45w8sTmE6IQCB7fLL\/G\/0SouTIyAQA9xDI7y"} 2016-10-01 18:20:38.858704 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:38.862329 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:365 :: Response Header: {
"Content-Length" = 878;
"Content-Type" = "application/json;charset=UTF-8";
Date = "Sat, 01 Oct 2016 10:20:29 GMT";
"X-Powered-By" = "Servlet/3.0"; } Response Data: {"certificate":"MIICeDCCAWCgAwIBAgIJANfoTRSlEd4vMA0GCSqGSIb3DQEBCwUAMGAxCzAJBgNVBAYTAklMMQswCQYDVQQIEwJJTDERMA8GA1UEBxMIU2hlZmF5aW0xDDAKBgNVBAoTA0lCTTESMBAGA1UECxMJV29ya2xpZ2h0MQ8wDQYDVQQDEwZXTCBEZXYwIBcNMTYxMDAxMTAyMDI5WhgPMjA2NjEwMDExMDIwMjlaMF0xITAfBgoJkiaJk\/IsZAEZFhFPZmZsaW5lQXV0aFNhbXBsZTE4MDYGCgmSJomT8ixkAQETKDdmM2U1ZTc3NmY3OTczMDA1YTFiYTU4MWQ5ZTRmYzIwZDZiMjA2N2IwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAjspPlIymI497gJwvz8wN5kz5elteLzpNgR\/CMWFIZ3fESDPqa+pyOoUq27MzlhCeF5qCsOQRirOpxCTEiFQwfwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCtyM9ayMRlrefJ\/\/9TpGg33Gez\/WiAnOsRLSzCmQGL36Sycny4WrTMKITNSIC9Lgu92PL6lIgqzRUVsepq2\/AXizsZwrjkpFAC4gqzjcgs2C9w+FTRHROayP7xdk532ohL8Q9MyFZjKCkiEJCbLjbWsfywsntmLUHBeg0SehZM\/F5Zv7OD5xTI1mmmjV+\/E12WKwKskXkkJdIAEv+cw1EHYPkr7zzG51jisoK7f+DhMNDAeKJWCxks 2016-10-01 18:20:38.865610 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:424 :: NSS object is null 2016-10-01 18:20:38.873479 OfflineAuthSample[3807:1252807] [DEBUG] [CERTIFICATE_MANAGER] BOOL hasCertificateExpired(X509 *) in WLCertManager.m:647 :: Certificate currentDate: 2016-10-01 10:20:38 +0000, expiryDate: 2066-10-01 10:20:29 +0000 2016-10-01 18:20:38.877528 OfflineAuthSample[3807:1252807] [WARN] [CERTIFICATE_MANAGER]
+[WLCertManager isCertificateVerified:] in WLCertManager.m:572 :: Verification failure: unable to verify the first certificate 2016-10-01 18:20:38.883162 OfflineAuthSample[3807:1252807] [DEBUG] [CERTIFICATE_MANAGER] +[WLCertManager saveCertificate:withLabel:] in WLCertManager.m:78 :: Certificate saved. 2016-10-01 18:20:38.900978 OfflineAuthSample[3807:1252852] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/apps/services/api/OfflineAuthSample/iphone/login 2016-10-01 18:20:38.903341 OfflineAuthSample[3807:1252852] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://52.77.249.78:9080/testssl/apps/services/api/OfflineAuthSample/iphone/login 2016-10-01 18:20:39.048286 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:333 :: Request Success 2016-10-01 18:20:39.049534 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:334 :: Response Status Code : 200 2016-10-01 18:20:39.052398 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:335 :: Response Content : /*-secure- {"errorMessage":null,"isSuccessful":true,"authRequired":true}*/ 2016-10-01 18:20:40.510105 OfflineAuthSample[3807:1252807] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2016-10-01 18:20:40.519465 OfflineAuthSample[3807:1252807] [MC] Reading from public effective user settings. 2016-10-01 18:20:47.358122 OfflineAuthSample[3807:1252880] [DEBUG] [NONE] establishSSLClientAuth 2016-10-01 18:20:47.359112 OfflineAuthSample[3807:1252807] [WARN] [USER_CERT_AUTH]
+[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.OfflineAuthSample 2016-10-01 18:20:47.360715 OfflineAuthSample[3807:1252855] 0x17414a3a0 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x17414a3a0> { count = 1, transaction: 0, voucher = 0x0, contents = "Result" => <int64: 0x174224a60>: 29 } 2016-10-01 18:20:47.362028 OfflineAuthSample[3807:1252855] 0x17414a030 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x17414a030> { count = 2, transaction: 0, voucher = 0x0, contents = "Dictionary" => <dictionary: 0x17414aa80> { count = 1, transaction: 0, voucher = 0x0, contents = "ServerURL" => <dictionary: 0x1741497f0> { count = 3, transaction: 0, voucher = 0x0, contents = "com.apple.CFURL.magic"
=> <uuid: 0x174243db0> C3853DCC-9776-4114-B6C1-FD9F51944A6D "com.apple.CFURL.string" => <string: 0x174247080> { length = 30, contents = "https://mesu.apple.com/assets/" } "com.apple.CFURL.base" => <null: 0x1b0757e80>: null-object } } "Result" => <int64: 0x174229900>: 0 } 2016-10-01 18:20:47.362292 OfflineAuthSample[3807:1252855] [MobileAssetError:29] Unable to copy asset information from https://mesu.apple.com/assets/ for asset type com.apple.MobileAsset.TextInput.SpellChecker 2016-10-01 18:20:47.364273 OfflineAuthSample[3807:1252855] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false 2016-10-01 18:20:47.365370 OfflineAuthSample[3807:1252853] [DEBUG] [NONE] Request [/apps/services/../../invoke] 2016-10-01 18:20:47.373678 OfflineAuthSample[3807:1252853] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/invoke 2016-10-01 18:20:47.375603 OfflineAuthSample[3807:1252853] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://52.77.249.78:9080/testssl/invoke 2016-10-01 18:20:48.300515 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:333 :: Request Success 2016-10-01 18:20:48.302971 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:334 :: Response Status Code : 200 2016-10-01 18:20:48.306128 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:335 :: Response Content : /*-secure- {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"ib694qt4eqq93i5magp7iqf5qh"}}}*/ 2016-10-01 18:20:48.329077 OfflineAuthSample[3807:1253047] [DEBUG] [NONE] response [/apps/services/../../invoke] success: /*-secure- {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"ib694qt4eqq93i5magp7iqf5qh"}}}*/ 2016-10-01 18:20:48.329486 OfflineAuthSample[3807:1252807] No matching configurations found from the server. Defaulting to local configuration 2016-10-01 18:20:48.341231 OfflineAuthSample[3807:1253047] [TRACE] [WL_AUTH]
-[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:71 :: returning UUID from the keychain 2016-10-01 18:20:48.346860 OfflineAuthSample[3807:1253047] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/apps/services/loguploader 2016-10-01 18:20:48.349978 OfflineAuthSample[3807:1253047] [DEBUG] [WL_REQUEST]
-[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000 2016-10-01 18:20:48.352905 OfflineAuthSample[3807:1253047] [TRACE] [WL_AUTH]
-[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:71 :: returning UUID from the keychain 2016-10-01 18:20:48.356290 OfflineAuthSample[3807:1253047] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://52.77.249.78:9080/testssl/apps/services/loguploader) with headers: {
"Accept-Language" = "en-US";
"Content-Encoding" = gzip;
"Content-Type" = "application/json";
"User-Agent" = "OfflineAuthSample/1.0 (iPhone; iOS 10.0.1; Scale/3.00)/WLNativeAPI/7.1.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-clientlog-appname" = OfflineAuthSample;
"x-wl-clientlog-appversion" = "1.0";
"x-wl-clientlog-deviceId" = "A886EC57-DA81-4CF0-8F2D-9A2378124BCB";
"x-wl-clientlog-env" = iphone;
"x-wl-clientlog-model" = "iPhone8,2";
"x-wl-clientlog-osversion" = "10.0.1";
"x-wl-compressed" = true;
"x-wl-device-id" = "A886EC57-DA81-4CF0-8F2D-9A2378124BCB";
"x-wl-platform-version" = "7.1.0.0"; } You can see the request body in the Analytics platform logs. 2016-10-01 18:20:48.375203 OfflineAuthSample[3807:1253047] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://52.77.249.78:9080/testssl/apps/services/loguploader 2016-10-01 18:20:48.377642 OfflineAuthSample[3807:1253047] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread=<NSThread: 0x17427f140>{number = 14, name = (null)}) 2016-10-01 18:20:48.382231 OfflineAuthSample[3807:1253047] [TRACE] [WL_AUTH]
-[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:71 :: returning UUID from the keychain 2016-10-01 18:20:48.384336 OfflineAuthSample[3807:1253047] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/apps/services/loguploader 2016-10-01 18:20:48.388040 OfflineAuthSample[3807:1253047] [DEBUG] [WL_REQUEST]
-[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000 2016-10-01 18:20:48.390529 OfflineAuthSample[3807:1253047] [TRACE] [WL_AUTH]
-[WLDeviceAuthManager getWLUniqueDeviceId] in WLDeviceAuthManager.m:71 :: returning UUID from the keychain 2016-10-01 18:20:48.392962 OfflineAuthSample[3807:1253047] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:221 :: Sending request (http://52.77.249.78:9080/testssl/apps/services/loguploader) with headers: { "Accept-Language" = "en-US"; "Content-Encoding" = gzip; "Content-Type" = "application/json"; "User-Agent" = "OfflineAuthSample/1.0 (iPhone; iOS 10.0.1; Scale/3.00)/WLNativeAPI/7.1.0.0"; "X-Requested-With" = XMLHttpRequest; "x-wl-app-version" = "1.0"; "x-wl-clientlog-appname" = OfflineAuthSample; "x-wl-clientlog-appversion" = "1.0"; "x-wl-clientlog-deviceId" = "A886EC57-DA81-4CF0-8F2D-9A2378124BCB"; "x-wl-clientlog-env" = iphone; "x-wl-clientlog-model" = "iPhone8,2"; "x-wl-clientlog-osversion" = "10.0.1"; "x-wl-compressed" = true; "x-wl-device-id" = "A886EC57-DA81-4CF0-8F2D-9A2378124BCB"; "x-wl-platform-version" = "7.1.0.0"; } You can see the request body in the Analytics platform logs. 2016-10-01 18:20:48.407261 OfflineAuthSample[3807:1253047] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:320 :: Starting the request with URL http://52.77.249.78:9080/testssl/apps/services/loguploader 2016-10-01 18:20:48.409068 OfflineAuthSample[3807:1253047] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:231 :: waiting for response... (Thread={number = 14, name = (null)}) 2016-10-01 18:20:48.609066 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:333 :: Request Success 2016-10-01 18:20:48.611440 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:334 :: Response Status Code : 201 2016-10-01 18:20:48.614530 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:335 :: Response Content : 2016-10-01 18:20:48.618208 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:48.620666 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:365 :: Response Header: { "Content-Language" = "en-US"; "Content-Length" = 0; Date = "Sat, 01 Oct 2016 10:20:39 GMT"; P3P = "policyref=\"/w3c/p3p.xml\", CP=\"CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE\""; "X-Powered-By" = "Servlet/3.0"; } Response Data: Status code=201 2016-10-01 18:20:48.623068 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:424 :: NSS object is null 2016-10-01 18:20:48.625059 OfflineAuthSample[3807:1252807] [DEBUG] [OCLogger] Client Logs successfully sent to server. 2016-10-01 18:20:48.718881 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:333 :: Request Success 2016-10-01 18:20:48.721363 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:334 :: Response Status Code : 201 2016-10-01 18:20:48.724519 OfflineAuthSample[3807:1252807] [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE]
-[WLAFHTTPRequestOperationManagerWrapper requestFinished:] in WLAFHTTPRequestOperationManagerWrapper.m:335 :: Response Content : 2016-10-01 18:20:48.728144 OfflineAuthSample[3807:1252807] [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2015/09/14 00:19:02 2016-10-01 18:20:48.730032 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:365 :: Response Header: { "Content-Language" = "en-US"; "Content-Length" = 0; Date = "Sat, 01 Oct 2016 10:20:39 GMT"; P3P = "policyref=\"/w3c/p3p.xml\", CP=\"CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE\""; "X-Powered-By" = "Servlet/3.0"; } Response Data: Status code=201 2016-10-01 18:20:48.732786 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest requestFinished:] in WLRequest.m:424 :: NSS
From the log, the error is:
+[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:52 :: Request url is http://52.77.249.78:9080/testssl/authorization/v1/clients/instance 2016-10-01 18:20:38.665685 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:142 :: Request timeout is 10.000000 2016-10-01 18:20:38.667459 OfflineAuthSample[3807:1252807] [DEBUG] [WL_REQUEST]
The request seems to have timed out. You should change your network, why would the request time out with the server you're using.
I also see that you're using a device running iOS 10, in which case you should also handle Apple's changed behavior in regards to ATS (Application Transport Security) starting iOS 9.
Read more about ATS in MobileFirst Platform Foundation: https://mobilefirstplatform.ibmcloud.com/blog/2015/09/09/ats-and-bitcode-in-ios9/

Phantomjs loading resource error "Connection closed" in SUSE Linux

When open URL using SSL in Phantomjs( v 1.9.8 ), I face the problem: Resource request error "Connection closed".
OS info: SUSE Linux Enterprise Server 12
The command line like this:
phantomjs --ignore-ssl-errors=true --ssl-protocol=any --debug=true rasterize.js https://192.168.70.57:8072/upgrade.html test.png
The detail logs:
2015-03-10T17:59:45 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=' to enable persisten cookie storage)
2015-03-10T17:59:45 [DEBUG] Phantom - execute: Configuration
2015-03-10T17:59:45 [DEBUG] 0 objectName : ""
2015-03-10T17:59:45 [DEBUG] 1 cookiesFile : ""
2015-03-10T17:59:45 [DEBUG] 2 diskCacheEnabled : "false"
2015-03-10T17:59:45 [DEBUG] 3 maxDiskCacheSize : "-1"
2015-03-10T17:59:45 [DEBUG] 4 ignoreSslErrors : "true"
2015-03-10T17:59:45 [DEBUG] 5 localToRemoteUrlAccessEnabled : "false"
2015-03-10T17:59:45 [DEBUG] 6 outputEncoding : "UTF-8"
2015-03-10T17:59:45 [DEBUG] 7 proxyType : "http"
2015-03-10T17:59:45 [DEBUG] 8 proxy : ":1080"
2015-03-10T17:59:45 [DEBUG] 9 proxyAuth : ":"
2015-03-10T17:59:45 [DEBUG] 10 scriptEncoding : "UTF-8"
2015-03-10T17:59:45 [DEBUG] 11 webSecurityEnabled : "true"
2015-03-10T17:59:45 [DEBUG] 12 offlineStoragePath : ""
2015-03-10T17:59:45 [DEBUG] 13 offlineStorageDefaultQuota : "-1"
2015-03-10T17:59:45 [DEBUG] 14 printDebugMessages : "true"
2015-03-10T17:59:45 [DEBUG] 15 javascriptCanOpenWindows : "true"
2015-03-10T17:59:45 [DEBUG] 16 javascriptCanCloseWindows : "true"
2015-03-10T17:59:45 [DEBUG] 17 sslProtocol : "any"
2015-03-10T17:59:45 [DEBUG] 18 sslCertificatesPath : ""
2015-03-10T17:59:45 [DEBUG] 19 webdriver : ":"
2015-03-10T17:59:45 [DEBUG] 20 webdriverLogFile : ""
2015-03-10T17:59:45 [DEBUG] 21 webdriverLogLevel : "INFO"
2015-03-10T17:59:45 [DEBUG] 22 webdriverSeleniumGridHub : ""
2015-03-10T17:59:45 [DEBUG] Phantom - execute: Script & Arguments
2015-03-10T17:59:45 [DEBUG] script: "rasterize.js"
2015-03-10T17:59:45 [DEBUG] 0 arg: "https://192.168.70.57:8072/upgrade.html"
2015-03-10T17:59:45 [DEBUG] 1 arg: "chick.png"
2015-03-10T17:59:45 [DEBUG] Phantom - execute: Starting normal mode
2015-03-10T17:59:45 [DEBUG] WebPage - setupFrame ""
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/_coffee-script.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/package.json" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/coffee-script.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./lexer.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././rewriter.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././helpers.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./parser.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./helpers.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./nodes.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././scope.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./././helpers.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/././lexer.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/../coffee-script/./lib/coffee-script/./././rewriter.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] WebPage - updateLoadingProgress: 10
2015-03-10T17:59:45 [DEBUG] **Network - Resource request error: 2 ( "Connection closed" ) URL: "https://192.168.70.57:8072/upgrade.html"**
2015-03-10T17:59:45 [DEBUG] WebPage - updateLoadingProgress: 100
Unable to load the address!
2015-03-10T17:59:45 [DEBUG] WebPage - setupFrame ""
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/_coffee-script.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] WebPage - updateLoadingProgress: 10
2015-03-10T17:59:45 [DEBUG] WebPage - setupFrame ""
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/_coffee-script.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) )
2015-03-10T17:59:45 [DEBUG] WebPage - updateLoadingProgress: 100
2015-03-10T17:59:45 [DEBUG] WebPage - updateLoadingProgress: 10
2015-03-10T17:59:45 [DEBUG] WebPage - updateLoadingProgress: 100
2015-03-10T17:59:45 [DEBUG] WebPage - setupFrame ""
2015-03-10T17:59:45 [DEBUG] WebPage - setupFrame ""