MobileFirst 7.1.0.00.20170505-1403 - Intermittent connectivity issue to MobileFirst server from Android and iPhone - ibm-mobilefirst

We have build an hybrid application and we have noticed an intermittent issue with connectivity to the mobile-first server from Android and iPhone. And it resolves once we kill the app and start again. This happens in following scenarios
1) when the direct update is requested and once the direct update is done immediately after that it stops working.
2) when the app is open and kept ideal in the background for some time like 30 min and then if try to access it does not connect to the server.
iPhone Logs
Jan 17 21:37:42 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Error>: NSURLConnection finished with error - code -1100
Jan 17 21:37:42 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677143475613, "end_mach":6677143529851, "elapsed_s":"0.002259917", "event":"Motion::CoarseMovement", "now_s":"537935862.468443036"}
Jan 17 21:37:43 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677159234428, "end_mach":6677159257208, "elapsed_s":"0.000949167", "event":"Motion::CoarseMovement", "now_s":"537935863.124722004"}
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/09/19 17:15:50
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [My.SessionTimeoutServiceFactory] SessionTimeoutService elapsedTime : NaN
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [My.services] {"wifiName":"Not Available","networkConnectionType":"WIFI","ipv4Addresses":{"3GAddress":"10.192.82.165","wifiAddress":"10.0.1.5"},"ipv6Addresses":{"3GAddress":"::2600:380:a32b:513d:40ac:e5f3","wifiAddress":"::fe80:8:0:0:1c1a:a8cf"},"isNetworkConnected":"true","carrierName":"Not Available","isRoaming":"Not Available","isAirplaneMode":"Not Available","telephonyNetworkType":"Not Available","ipAddress":"10.0.1.5"}
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://myServerIp:443/MyProject/adapters/AnnouncementsAdapter/announcements/fetchannouncements
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://myServerIp:443/MyProject/adapters/AnnouncementsAdapter/announcements/fetchannouncements
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Error>: NSURLConnection finished with error - code -1001
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Error>: NSURLConnection finished with error - code -1001
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 0
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : The request timed out.
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 0
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : The request timed out.
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TCP Conn Cancel [39:0x1c4362700]
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TCP Conn Cancel [41:0x1c0365400]
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC Enabling TLS [45:0x1c0368f40]
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TCP Conn Start [45:0x1c0368f40]
Jan 17 21:37:43 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <8A3D00F0-37B8-4A43-BA2E-2C96EAE6AA9F>.<0> setting up Connection 45
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TLS Event [45:0x1c0368f40]: 1, Pending(0)
Jan 17 21:37:44 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677182200912, "end_mach":6677182224304, "elapsed_s":"0.000974667", "event":"Motion::CoarseMovement", "now_s":"537935864.081508040"}
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TLS Event [45:0x1c0368f40]: 2, Pending(0)
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TLS Event [45:0x1c0368f40]: 20, Pending(0)
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TCP Conn Connected [45:0x1c0368f40]: Err(16)
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TCP Conn Event [45:0x1c0368f40]: 1
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TCP Conn Event [45:0x1c0368f40]: 8
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: TIC TLS Handshake Complete [45:0x1c0368f40]
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <8A3D00F0-37B8-4A43-BA2E-2C96EAE6AA9F>.<0> now using Connection 45
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <8A3D00F0-37B8-4A43-BA2E-2C96EAE6AA9F>.<0> sent request, body N
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <8A3D00F0-37B8-4A43-BA2E-2C96EAE6AA9F>.<0> received response, status 401 content K
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <8A3D00F0-37B8-4A43-BA2E-2C96EAE6AA9F>.<0> response ended
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:388 :: Request Failed
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:389 :: Response Status Code : 401
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] in WLAFHTTPRequestOperationManagerWrapper.m:390 :: Response Error : Request failed: unauthorized (401)
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WORKLIGHT] +[WLClient sharedInstance] in WLClient.m:165 :: IBMMobilieFirstFoundation.framework version = 7.1-2016/09/19 17:15:50
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [NONE] Request [https://myServerIp:443/MyProject/authorization/v1/authorization]
Jan 17 21:37:44 Owners-iPhone-3 trustd[5056] <Notice>: could not disable pinning: not an internal release
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: THREAD WARNING: ['WLAuthorizationManagerPlugin'] took '22.705078' ms. Plugin should use a background thread.
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] +[WLAFHTTPRequestOperationManagerWrapper requestWithURL:] in WLAFHTTPRequestOperationManagerWrapper.m:51 :: Request url is https://myServerIp:443/MyProject/authorization/v1/authorization?response_type=code&client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.15013111462581286
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: Client relinquished <BKProcessAssertion: 0x100f8a9f0; "Called by UIKit, from <redacted>" (finishTask:180s); id:\M-b\M^#\M-&0B8CA7216A0C>
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] Deactivate assertion: <BKProcessAssertion: 0x100f8a9f0; "Called by UIKit, from <redacted>" (finishTask:180s); id:\M-b\M^#\M-&0B8CA7216A0C>
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] dump all assertions HWM:4 (deactivateAssertion): {
<BKProcessAssertion: 0x101884d90; "Resume" (activation:inf); id:\M-b\M^#\M-&9D6AF759764B> [active]
}
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] New process assertion state; preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventSuspendOnSleep (assertion 0x100f8a9f0 added: (none); removed: preventIdleSleep)
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] Setting jetsam priority to 10 [0x10100]
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] dump all assertions HWM:4 (CPUMON check): {
<BKProcessAssertion: 0x101884d90; "Resume" (activation:inf); id:\M-b\M^#\M-&9D6AF759764B> [active]
}
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: Releasing PowerAssertion on MyMobileApp:5966 from update
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] Remove assertion: <BKProcessAssertion: 0x100f8a9f0; "Called by UIKit, from <redacted>" (finishTask:180s); id:\M-b\M^#\M-&0B8CA7216A0C>
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: [MyMobileApp:5966] dump all assertions HWM:4 (CPUMON check): {
<BKProcessAssertion: 0x101884d90; "Resume" (activation:inf); id:\M-b\M^#\M-&9D6AF759764B> [active]
}
Jan 17 21:37:44 Owners-iPhone-3 assertiond[74] <Notice>: -[BKAssertion dealloc] - <0x100f8a9f0>
Jan 17 21:37:44 Owners-iPhone-3 powerd[40] <Notice>: Process assertiond.74 Released SystemIsActive "MyMobileApp:5966:5966-C6CEB4F5-9DCC-4E15-8BB6-0B8CA7216A0C [Called by UIKit, from <redacted>] [0x100f8a9f0]" age:00:00:02 id:51539648155 [System: PrevIdle SysAct]
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp[5966] <Notice>: [DEBUG] [WL_AFHTTPRequestOperationManagerWrapper_PACKAGE] -[WLAFHTTPRequestOperationManagerWrapper start] in WLAFHTTPRequestOperationManagerWrapper.m:356 :: Starting the request with URL https://myServerIp:443/MyProject/authorization/v1/authorization?response_type=code&client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&redirect_uri=http%3A%2F%2Fmfpredirecturi&isAjaxRequest=true&x=0.15013111462581286
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <D0C8DF5A-65FD-4BE0-82C9-21579B9947D1>.<0> now using Connection 45
Jan 17 21:37:44 Owners-iPhone-3 MyMobileApp(CFNetwork)[5966] <Notice>: Task <D0C8DF5A-65FD-4BE0-82C9-21579B9947D1>.<0> sent request, body N
Jan 17 21:37:44 Owners-iPhone-3 CommCenter(libATCommandStudioDynamic.dylib)[88] <Notice>: QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 1F 00 80 03 02 04 EB 71 51 00 13 00 14 06 00 C1 F3 A2 FF D4 00 A2 01 00 64 A4 03 00 01 64 00']
Jan 17 21:37:44 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677197559866, "end_mach":6677197584343, "elapsed_s":"0.001019875", "event":"Motion::CoarseMovement", "now_s":"537935864.721438050"}
Jan 17 21:37:45 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677205218631, "end_mach":6677205243804, "elapsed_s":"0.001048875", "event":"Motion::CoarseMovement", "now_s":"537935865.040650964"}
Jan 17 21:37:45 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677220543131, "end_mach":6677220575096, "elapsed_s":"0.001331875", "event":"Motion::CoarseMovement", "now_s":"537935865.679077029"}
Jan 17 21:37:47 Owners-iPhone-3 destinationd(DuetExpertCenter)[5082] <Notice>: predictionForCategories returned error: <private>
Jan 17 21:37:47 Owners-iPhone-3 destinationd(DuetExpertCenter)[5082] <Error>: Error: <private>
Jan 17 21:37:47 Owners-iPhone-3 destinationd[5082] <Error>: <private> received error: <private>
Jan 17 21:37:48 Owners-iPhone-3 symptomsd(SymptomEvaluator)[5571] <Error>: AWD direct: received libnetcore symptom w/ non conforming layout, dropping
Jan 17 21:37:49 Owners-iPhone-3 CommCenter(libATCommandStudioDynamic.dylib)[88] <Notice>: QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 1F 00 80 03 02 04 EC 71 51 00 13 00 14 06 00 C1 F2 A2 FF 8A 00 A2 01 00 64 A4 03 00 01 64 00']
Jan 17 21:37:49 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677320175459, "end_mach":6677320223146, "elapsed_s":"0.001986958", "event":"Motion::CoarseMovement", "now_s":"537935869.830474019"}
Jan 17 21:37:50 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677343176271, "end_mach":6677343215897, "elapsed_s":"0.001651083", "event":"Motion::CoarseMovement", "now_s":"537935870.788828015"}
Jan 17 21:37:50 Owners-iPhone-3 backboardd(IOKit)[66] <Error>: iohideventsystem_client_dispatch_properties_changed:0x10004003
Jan 17 21:37:51 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677350805334, "end_mach":6677350831802, "elapsed_s":"0.001102833", "event":"Motion::CoarseMovement", "now_s":"537935871.106637001"}
Jan 17 21:37:51 Owners-iPhone-3 dataaccessd(PersistentConnection)[574] <Notice>: SimpleTimer <PCSimpleTimer: 0x105abd500> has fired
Jan 17 21:37:51 Owners-iPhone-3 dataaccessd(PersistentConnection)[574] <Notice>: Invalidating simple timer <PCSimpleTimer: 0x105abd500>
Jan 17 21:37:51 Owners-iPhone-3 dataaccessd(PersistentConnection)[574] <Notice>: Disabling power monitoring for <PCSimpleTimer: 0x105abd500> - 2 timers
Jan 17 21:37:51 Owners-iPhone-3 dataaccessd(PersistentConnection)[574] <Notice>: SimpleTimer <PCSimpleTimer: 0x106356790> has fired
Jan 17 21:37:51 Owners-iPhone-3 dataaccessd(PersistentConnection)[574] <Notice>: Invalidating simple timer <PCSimpleTimer: 0x106356790>
Jan 17 21:37:51 Owners-iPhone-3 dataaccessd(PersistentConnection)[574] <Notice>: Disabling power monitoring for <PCSimpleTimer: 0x106356790> - 1 timers
Jan 17 21:37:51 Owners-iPhone-3 MyMobileApp(WebCore)[5966] <Notice>: 0x103313d00 - PerformanceMonitor::measurePostLoadMemoryUsage: Process was using 158139272 bytes of memory after the page load.
Jan 17 21:37:53 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677396859076, "end_mach":6677396897944, "elapsed_s":"0.001619500", "event":"Motion::CoarseMovement", "now_s":"537935873.025398970"}
Jan 17 21:37:53 Owners-iPhone-3 locationd[71] <Notice>: {"msg":"CLWifiPositioningSystemLogic::apply", "event":"elapsed", "begin_mach":6677404480228, "end_mach":6677404523844, "elapsed_s":"0.001817333", "event":"Motion::CoarseMovement", "now_s":"537935873.342646003"}
Jan 17 21:37:54 Owners-iPhone-3 CommCenter(libATCommandStudioDynamic.dylib)[88] <Notice>: QMI: Svc=0x03(NAS) Ind MsgId=0x0051 Bin=['01 1F 00 80 03 02 04 ED 71 51 00 13 00 14 06 00 BF F5 A3 FF 8C 00 A2 01 00 64 A4 03 00 01 64 00']
The request just reaches the web server but it returned with 401 error. Once app is killed and restarted it starts working again.
IBM Http Server logs
- - [17/Jan/2018:21:01:12 -0500] "GET /worklightconsole/201704051514/css/images/IBM_logo.png HTTP/1.1" 200 720
- - [17/Jan/2018:21:01:12 -0500] "GET /worklightconsole/201704051514/css/fonts/bold/helvetica-neue-bold.woff2 HTTP/1.1" 200 30804
- - [17/Jan/2018:21:11:48 -0500] "GET / HTTP/1.1" 302 283
- - [17/Jan/2018:21:34:20 -0500] "GET /MYProject/authorization/v1/authorization?client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&scope=-MYRealm&isAjaxRequest=true&x=0.275786186755855 HTTP/1.1" 200 -
- - [17/Jan/2018:21:34:20 -0500] "GET /MyProject/adapters/SecurityAdapter/security/login HTTP/1.1" 401 41
- - [17/Jan/2018:21:34:21 -0500] "GET /MyProject/authorization/v1/authorization?response_type=code&client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&redirect_uri=http%3A%2F%2Fmfpredirecturi&scope=MYRealm&isAjaxRequest=true&x=0.6627940373520301 HTTP/1.1" 200 25
- - [17/Jan/2018:21:34:22 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:34:22 -0500] "GET /analytics-service/data/administration/apps/worklight/getSettings HTTP/1.1" 200 1407
- - [17/Jan/2018:21:34:25 -0500] "POST /MyProject/apps/services/api/MYMobileApp/iphone/login HTTP/1.1" 401 166
- - [17/Jan/2018:21:34:26 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:36:38 -0500] "GET /MyProject/adapters/AnnouncementsAdapter/announcements/fetchannouncements HTTP/1.1" 401 41
- - [17/Jan/2018:21:36:40 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:36:40 -0500] "GET /analytics-service/data/administration/apps/worklight/getSettings HTTP/1.1" 200 1407
- - [17/Jan/2018:21:37:06 -0500] "GET /MyProject/authorization/v1/authorization?client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&scope=-MYRealm&isAjaxRequest=true&x=0.410883442826542 HTTP/1.1" 403 19
- - [17/Jan/2018:21:37:07 -0500] "GET /MyProject/adapters/SecurityAdapter/security/login HTTP/1.1" 401 41
- - [17/Jan/2018:21:37:08 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:37:44 -0500] "GET /MyProject/adapters/AnnouncementsAdapter/announcements/fetchannouncements HTTP/1.1" 401 41
- - [17/Jan/2018:21:37:44 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:37:44 -0500] "GET /analytics-service/data/administration/apps/worklight/getSettings HTTP/1.1" 200 1407
- - [17/Jan/2018:21:34:25 -0500] "POST /MyProject/apps/services/api/MYMobileApp/iphone/login HTTP/1.1" 504 315
- - [17/Jan/2018:21:34:25 -0500] "POST /MyProject/apps/services/my_custom_auth_request_url HTTP/1.1" 504 315
- - [17/Jan/2018:21:34:38 -0500] "POST /MyProject/apps/services/api/MYMobileApp/iphone/login HTTP/1.1" 504 315
- - [17/Jan/2018:21:34:38 -0500] "POST /MyProject/apps/services/my_custom_auth_request_url HTTP/1.1" 504 315
- - [17/Jan/2018:21:34:53 -0500] "POST /MyProject/apps/services/my_custom_auth_request_url HTTP/1.1" 504 315
- - [17/Jan/2018:21:34:53 -0500] "POST /MyProject/apps/services/api/MYMobileApp/iphone/login HTTP/1.1" 504 315
- - [17/Jan/2018:21:34:56 -0500] "GET /MyProject/authorization/v1/authorization?response_type=code&client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&redirect_uri=http%3A%2F%2Fmfpredirecturi&scope=MYRealm&isAjaxRequest=true&x=0.1482186844277551 HTTP/1.1" 504 315
- - [17/Jan/2018:21:40:04 -0500] "GET /MyProject/authorization/v1/authorization?client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&scope=-MYRealm&isAjaxRequest=true&x=0.5411687142084214 HTTP/1.1" 200 -
- - [17/Jan/2018:21:40:04 -0500] "GET /MyProject/adapters/SecurityAdapter/security/login HTTP/1.1" 401 41
- - [17/Jan/2018:21:40:06 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:40:06 -0500] "GET /analytics-service/data/administration/apps/worklight/getSettings HTTP/1.1" 200 1407
- - [17/Jan/2018:21:35:12 -0500] "POST /MyProject/apps/services/api/MYMobileApp/iphone/login HTTP/1.1" 504 315
- - [17/Jan/2018:21:35:24 -0500] "POST /MyProject/apps/services/my_custom_auth_request_url HTTP/1.1" 504 315
- - [17/Jan/2018:21:40:33 -0500] "GET /MyProject/adapters/AnnouncementsAdapter/announcements/fetchannouncements HTTP/1.1" 401 41
- - [17/Jan/2018:21:40:34 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:40:40 -0500] "GET /MyProject/adapters/AnnouncementsAdapter/announcements/fetchannouncements HTTP/1.1" 401 41
- - [17/Jan/2018:21:40:40 -0500] "POST /analytics-service/data HTTP/1.1" 201 -
- - [17/Jan/2018:21:40:44 -0500] "GET /MyProject/authorization/v1/authorization?client_id=4bd3c60d412b36d16f4da069658c0c7fa226cad1&scope=-MYRealm&isAjaxRequest=true&x=0.9602466115384183 HTTP/1.1" 200 -
- - [17/Jan/2018:21:40:45 -0500] "GET /MyProject/adapters/SecurityAdapter/security/login HTTP/1.1" 401 41
- - [17/Jan/2018:21:40:46 -0500] "POST /analytics-service/data HTTP/1.1" 201 -

Related

Shaka player live stream does not start play-out

In our react-native-web application, running as a Tizen smart web app on Samsung smart TVs, we use ShakaPlayer 2.5.6c to play DASH live streams.
The issue is that sometimes the stream does not start. The DRM license is received, segments are being fetched, but somehow the player does not show any frames. The player does not log any errors.
Hours later the issue disappears. Also, the issue does not seem to affect all devices.
The live streams originate from a Halo packages that is being used for other clients as well (ExoPlayer, AVplayer & Chromecast ShakaPlayer), without any issue. We use titanium DRM license wrapping.
Below is a detailed timeline of what happens with a failing stream.
The app registers player listeners for events abrstatuschanged, adaptation, buffering, drmsessionupdate, emsg, error, expirationupdated, largegap, loading, manifestparsed, onstatechange, onstateidle, streaming, unloading, and variantchanged. Additionally, every 2.5 seconds the playhead, current manifest & buffering info is written. For each segment fetch, the response date header is shown.
We have tried with a wide range of configurations, including different values for buffering parameters, defaultPresentationDelay jumpLargeGaps and videoRobustness. All with the same result.
The timeline below shows that the same segment is fetched multiple times. It looks like the player is retrying to fetch segments, although none fail.
At first it looks like there is a DRM issue, where the player is not able to decode video chunks.
When play-out succeeds we see an extra 'expirationupdated: there is a change in the expiration times of an EME session' event right after a 'drmsessionupdate: the CDM has accepted the license response' event, which could support this theory.
However, no error is thrown by the player.
What could be the cause of this behavior? Note that the issue appear often, but not always.
2020-3-14 11:10:55 loading
2020-3-14 11:10:55 onstatechange "attach"
2020-3-14 11:10:55 onstatechange "media-source"
2020-3-14 11:10:55 onstatechange "manifest-parser"
2020-3-14 11:10:55 onstatechange "manifest"
2020-3-14 11:10:55 networkEngine manifest response
2020-3-14 11:10:55 manifestparsed
2020-3-14 11:10:55 onstatechange "drm-engine"
2020-3-14 11:10:55 onstatechange "load"
2020-3-14 11:10:55 buffering true
2020-3-14 11:10:55 streaming
2020-3-14 11:10:55 abrstatuschanged
2020-3-14 11:10:55 seekRange {"start":266177.98933333333,"end":266197.85233330727}
2020-3-14 11:10:55 onstateidle state: load
2020-3-14 11:10:56 video event: play
2020-3-14 11:10:56 network license request
2020-3-14 11:10:56 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:29 GMT" audio1/Header.m4s
2020-3-14 11:10:56 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" audio1/1388208802880.m4s
2020-3-14 11:10:56 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:55 GMT" video2/Header.m4s
2020-3-14 11:10:56 network license response received
2020-3-14 11:10:56 drmsessionupdate the CDM has accepted the license response
2020-3-14 11:10:56 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video2/1388208801440.m4s
2020-3-14 11:10:57 abrstatuschanged
2020-3-14 11:10:57 adaptation an automatic adaptation causes the active tracks to change
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:43 GMT" audio1/1388208981440.m4s
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:38 GMT" video2/1388208081440.m4s
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:34 GMT" audio1/1388208261440.m4s
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:56 GMT" video3/Header.m4s
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s MISS
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s HIT
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s HIT
2020-3-14 11:10:57 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s HIT
2020-3-14 11:10:58 current status player.isBuffering(): true; player.isInProgress(): false
2020-3-14 11:10:58 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:25 - 2020-3-14 11:10:45]; usingPresentationStartTime: false;
2020-3-14 11:10:58 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:10:58 live playhead time 2020-3-14 11:10:34
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s HIT
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s HIT
2020-3-14 11:10:58 networkEngine manifest response
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:33 GMT" audio1/1388208082880.m4s HIT
2020-3-14 11:10:58 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:34 GMT" audio1/1388208261440.m4s HIT
2020-3-14 11:10:59 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208081440.m4s HIT
2020-3-14 11:10:59 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:37 GMT" audio1/1388208441920.m4s HIT
2020-3-14 11:10:59 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" video3/1388208261440.m4s MISS
2020-3-14 11:10:59 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:49 GMT" video3/1388208441440.m4s MISS
2020-3-14 11:10:59 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:51 GMT" video3/1388208621440.m4s MISS
2020-3-14 11:10:59 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:53 GMT" video3/1388208801440.m4s MISS
2020-3-14 11:11:00 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:39 GMT" audio1/1388208622400.m4s HIT
2020-3-14 11:11:00 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:41 GMT" audio1/1388208802880.m4s HIT
2020-3-14 11:11:00 buffering false
2020-3-14 11:11:00 current status player.isBuffering(): false; player.isInProgress(): false
2020-3-14 11:11:00 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:28 - 2020-3-14 11:10:48]; usingPresentationStartTime: false;
2020-3-14 11:11:00 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:11:00 live playhead time 2020-3-14 11:10:34
2020-3-14 11:11:00 buffered time [2020-3-14 11:10:31 to 2020-3-14 11:10:40]
2020-3-14 11:11:01 networkEngine manifest response
2020-3-14 11:11:03 current status player.isBuffering(): false; player.isInProgress(): false
2020-3-14 11:11:03 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:30 - 2020-3-14 11:10:50]; usingPresentationStartTime: false;
2020-3-14 11:11:03 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:11:03 live playhead time 2020-3-14 11:10:34
2020-3-14 11:11:03 buffered time [2020-3-14 11:10:31 to 2020-3-14 11:10:40]
2020-3-14 11:11:04 networkEngine manifest response
2020-3-14 11:11:05 current status player.isBuffering(): false; player.isInProgress(): false
2020-3-14 11:11:05 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:33 - 2020-3-14 11:10:53]; usingPresentationStartTime: false;
2020-3-14 11:11:05 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:11:05 live playhead time 2020-3-14 11:10:34
2020-3-14 11:11:05 buffered time [2020-3-14 11:10:31 to 2020-3-14 11:10:40]
2020-3-14 11:11:07 adaptation an automatic adaptation causes the active tracks to change
2020-3-14 11:11:07 networkEngine segment "date":"Sat, 14 Mar 2020 10:11:04 GMT" video3/1388208981440.m4s MISS
2020-3-14 11:11:07 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:43 GMT" audio1/1388208981440.m4s HIT
2020-3-14 11:11:07 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:45 GMT" audio1/1388209161920.m4s HIT
2020-3-14 11:11:07 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:29 GMT" video7/Header.m4s HIT
2020-3-14 11:11:07 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:47 GMT" audio1/1388209342400.m4s HIT
2020-3-14 11:11:07 networkEngine manifest response
2020-3-14 11:11:08 current status player.isBuffering(): false; player.isInProgress(): false
2020-3-14 11:11:08 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:35 - 2020-3-14 11:10:55]; usingPresentationStartTime: false;
2020-3-14 11:11:08 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:11:08 live playhead time 2020-3-14 11:10:39
2020-3-14 11:11:08 buffered time [2020-3-14 11:10:31 to 2020-3-14 11:10:42]
2020-3-14 11:11:08 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:45 GMT" video7/1388209161440.m4s HIT
2020-3-14 11:11:09 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:47 GMT" video7/1388209341440.m4s HIT
2020-3-14 11:11:10 current status player.isBuffering(): false; player.isInProgress(): false
2020-3-14 11:11:10 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:38 - 2020-3-14 11:10:58]; usingPresentationStartTime: false;
2020-3-14 11:11:10 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:11:10 live playhead time 2020-3-14 11:10:40
2020-3-14 11:11:10 buffered time [2020-3-14 11:10:31 to 2020-3-14 11:10:46]
2020-3-14 11:11:11 networkEngine manifest response
2020-3-14 11:11:12 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:49 GMT" audio1/1388209522880.m4s HIT
2020-3-14 11:11:12 networkEngine segment "date":"Sat, 14 Mar 2020 10:10:51 GMT" audio1/1388209701440.m4s HIT
2020-3-14 11:11:13 current status player.isBuffering(): false; player.isInProgress(): false
2020-3-14 11:11:13 current manifest info delay: 10s; maxSegmentDuration: 2.25s; seekRange: [2020-3-14 11:10:40 - 2020-3-14 11:11:00]; usingPresentationStartTime: false;
2020-3-14 11:11:13 live presentationStartTime 2020-3-11 09:14:05
2020-3-14 11:11:13 live playhead time 2020-3-14 11:10:45
2020-3-14 11:11:13 buffered time [2020-3-14 11:10:31 to 2020-3-14 11:10:46]

SSL Handshake failure with TLSv1 by using Java 6, HTMLUnit and Bouncy Castle

I am trying to connect SSL site https://link.bollore-logistics.com by using Java 6 and HTMLUnit, I have added more supported Ciphers by using Bouncy Castle. But still, I am receiving handshake failure. I cannot upgrade Java version due to production limitation. Please kindly help
Code of configuration:
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
});
if (Security.getProvider("BC") == null){
logger.info("Bouncy Castle provider is NOT available");
}
else{
logger.info("Bouncy Castle provider is available");
}
Provider provider = new BouncyCastleProvider();
Security.addProvider(provider);
SSLContext context = SSLContext.getInstance("SSL");
context.init(null, new X509TrustManager[]{new X509TrustManager() {
#Override
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
}
#Override
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
#Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
}}, new SecureRandom());
String[] scs = context.getSocketFactory().getSupportedCipherSuites();
Arrays.sort(scs);
for(String s : scs) {
System.out.println(s);
}
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());
// Create all-trusting host name verifier
HostnameVerifier allHostsValid = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
Code to make connection (HTMLUnit):
WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setRedirectEnabled(true);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setCssEnabled(false);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getPage(url);
Here is the error log:
2017-12-06 11:27:40 DEBUG WebClient:325 - Get page for window named '', using WebRequest[<url="http://link.bollore-logistics.com/Contact/SmartSearch/77707575", GET, EncodingType[name=application/x-www-form-urlencoded], [], {Accept-Encoding=gzip, deflate, Accept=*/*}, null>]
2017-12-06 11:27:40 DEBUG WebClient:1259 - Load response for GET http://link.bollore-logistics.com/Contact/SmartSearch/77707575
trigger seeding of SecureRandom
done seeding SecureRandom
2017-12-06 11:27:40 DEBUG RequestAddCookies:122 - CookieSpec selected: mine
2017-12-06 11:27:40 DEBUG RequestAuthCache:76 - Auth cache not set in the context
2017-12-06 11:27:40 DEBUG PoolingHttpClientConnectionManager:249 - Connection request: [route: {}->http://link.bollore-logistics.com:80][total kept alive: 0; route allocated: 0 of 6; total allocated: 0 of 20]
2017-12-06 11:27:40 DEBUG PoolingHttpClientConnectionManager:282 - Connection leased: [id: 0][route: {}->http://link.bollore-logistics.com:80][total kept alive: 0; route allocated: 1 of 6; total allocated: 1 of 20]
2017-12-06 11:27:40 DEBUG MainClientExec:234 - Opening connection {}->http://link.bollore-logistics.com:80
2017-12-06 11:27:40 DEBUG DefaultHttpClientConnectionOperator:131 - Connecting to link.bollore-logistics.com/195.101.158.66:80
2017-12-06 11:27:40 DEBUG DefaultHttpClientConnectionOperator:138 - Connection established 192.168.171.168:52556<->195.101.158.66:80
2017-12-06 11:27:40 DEBUG MainClientExec:255 - Executing request GET /Contact/SmartSearch/77707575 HTTP/1.1
2017-12-06 11:27:40 DEBUG MainClientExec:260 - Target auth state: UNCHALLENGED
2017-12-06 11:27:40 DEBUG MainClientExec:266 - Proxy auth state: UNCHALLENGED
2017-12-06 11:27:40 DEBUG headers:124 - http-outgoing-0 >> GET /Contact/SmartSearch/77707575 HTTP/1.1
2017-12-06 11:27:40 DEBUG headers:127 - http-outgoing-0 >> Host: link.bollore-logistics.com
2017-12-06 11:27:40 DEBUG headers:127 - http-outgoing-0 >> User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
2017-12-06 11:27:40 DEBUG headers:127 - http-outgoing-0 >> Accept-Language: en-US
2017-12-06 11:27:40 DEBUG headers:127 - http-outgoing-0 >> Accept-Encoding: gzip, deflate
2017-12-06 11:27:40 DEBUG headers:127 - http-outgoing-0 >> Accept: */*
2017-12-06 11:27:40 DEBUG headers:127 - http-outgoing-0 >> Connection: Keep-Alive
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "GET /Contact/SmartSearch/77707575 HTTP/1.1[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "Host: link.bollore-logistics.com[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "Accept-Language: en-US[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "Accept-Encoding: gzip, deflate[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "Accept: */*[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2017-12-06 11:27:40 DEBUG wire:72 - http-outgoing-0 >> "[\r][\n]"
2017-12-06 11:27:41 DEBUG wire:72 - http-outgoing-0 << "HTTP/1.0 302 Found[\r][\n]"
2017-12-06 11:27:41 DEBUG wire:72 - http-outgoing-0 << "Location: https://link.bollore-logistics.com/Contact/SmartSearch/77707575[\r][\n]"
2017-12-06 11:27:41 DEBUG wire:72 - http-outgoing-0 << "Server: BigIP[\r][\n]"
2017-12-06 11:27:41 DEBUG wire:72 - http-outgoing-0 << "Connection: Keep-Alive[\r][\n]"
2017-12-06 11:27:41 DEBUG wire:72 - http-outgoing-0 << "Content-Length: 0[\r][\n]"
2017-12-06 11:27:41 DEBUG wire:72 - http-outgoing-0 << "[\r][\n]"
2017-12-06 11:27:41 DEBUG headers:113 - http-outgoing-0 << HTTP/1.0 302 Found
2017-12-06 11:27:41 DEBUG headers:116 - http-outgoing-0 << Location: https://link.bollore-logistics.com/Contact/SmartSearch/77707575
2017-12-06 11:27:41 DEBUG headers:116 - http-outgoing-0 << Server: BigIP
2017-12-06 11:27:41 DEBUG headers:116 - http-outgoing-0 << Connection: Keep-Alive
2017-12-06 11:27:41 DEBUG headers:116 - http-outgoing-0 << Content-Length: 0
2017-12-06 11:27:41 DEBUG MainClientExec:284 - Connection can be kept alive indefinitely
2017-12-06 11:27:41 DEBUG PoolingHttpClientConnectionManager:314 - Connection [id: 0][route: {}->http://link.bollore-logistics.com:80] can be kept alive indefinitely
2017-12-06 11:27:41 DEBUG PoolingHttpClientConnectionManager:320 - Connection released: [id: 0][route: {}->http://link.bollore-logistics.com:80][total kept alive: 1; route allocated: 1 of 6; total allocated: 1 of 20]
2017-12-06 11:27:41 DEBUG WebClient:1349 - Got a redirect status code [302] new location = [https://link.bollore-logistics.com/Contact/SmartSearch/77707575]
2017-12-06 11:27:41 DEBUG WebClient:1259 - Load response for GET https://link.bollore-logistics.com/Contact/SmartSearch/77707575
2017-12-06 11:27:41 DEBUG RequestAddCookies:122 - CookieSpec selected: mine
2017-12-06 11:27:41 DEBUG RequestAuthCache:76 - Auth cache not set in the context
2017-12-06 11:27:41 DEBUG PoolingHttpClientConnectionManager:249 - Connection request: [route: {s}->https://link.bollore-logistics.com:443][total kept alive: 1; route allocated: 0 of 6; total allocated: 1 of 20]
2017-12-06 11:27:41 DEBUG PoolingHttpClientConnectionManager:282 - Connection leased: [id: 1][route: {s}->https://link.bollore-logistics.com:443][total kept alive: 1; route allocated: 1 of 6; total allocated: 2 of 20]
2017-12-06 11:27:41 DEBUG MainClientExec:234 - Opening connection {s}->https://link.bollore-logistics.com:443
2017-12-06 11:27:41 DEBUG DefaultHttpClientConnectionOperator:131 - Connecting to link.bollore-logistics.com/195.101.158.66:443
2017-12-06 11:27:41 DEBUG HtmlUnitSSLConnectionSocketFactory:335 - Connecting socket to link.bollore-logistics.com/195.101.158.66:443 with timeout 90000
2017-12-06 11:27:41 DEBUG HtmlUnitSSLConnectionSocketFactory:388 - Enabled protocols: [TLSv1]
2017-12-06 11:27:41 DEBUG HtmlUnitSSLConnectionSocketFactory:389 - Enabled cipher suites:[SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
2017-12-06 11:27:41 DEBUG HtmlUnitSSLConnectionSocketFactory:393 - Starting handshake
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1512530605 bytes = { 147, 117, 177, 152, 172, 87, 109, 103, 219, 130, 24, 140, 216, 108, 154, 3, 162, 211, 205, 89, 29, 221, 91, 103, 85, 39, 206, 187 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
Extension ec_point_formats, formats: [uncompressed]
***
[write] MD5 and SHA1 hashes: len = 161
0000: 01 00 00 9D 03 01 5A 27 63 AD 93 75 B1 98 AC 57 ......Z'c..u...W
0010: 6D 67 DB 82 18 8C D8 6C 9A 03 A2 D3 CD 59 1D DD mg.....l.....Y..
0020: 5B 67 55 27 CE BB 00 00 36 00 04 00 05 00 2F C0 [gU'....6...../.
0030: 02 C0 04 C0 0C C0 0E C0 07 C0 09 C0 11 C0 13 00 ................
0040: 33 00 32 00 0A C0 03 C0 0D C0 08 C0 12 00 16 00 3.2.............
0050: 13 00 09 00 15 00 12 00 03 00 08 00 14 00 11 01 ................
0060: 00 00 3E 00 0A 00 34 00 32 00 17 00 01 00 03 00 ..>...4.2.......
0070: 13 00 15 00 06 00 07 00 09 00 0A 00 18 00 0B 00 ................
0080: 0C 00 19 00 0D 00 0E 00 0F 00 10 00 11 00 02 00 ................
0090: 12 00 04 00 05 00 14 00 08 00 16 00 0B 00 02 01 ................
00A0: 00 .
http-bio-8080-exec-3, WRITE: TLSv1 Handshake, length = 161
[Raw write]: length = 166
0000: 16 03 01 00 A1 01 00 00 9D 03 01 5A 27 63 AD 93 ...........Z'c..
0010: 75 B1 98 AC 57 6D 67 DB 82 18 8C D8 6C 9A 03 A2 u...Wmg.....l...
0020: D3 CD 59 1D DD 5B 67 55 27 CE BB 00 00 36 00 04 ..Y..[gU'....6..
0030: 00 05 00 2F C0 02 C0 04 C0 0C C0 0E C0 07 C0 09 .../............
0040: C0 11 C0 13 00 33 00 32 00 0A C0 03 C0 0D C0 08 .....3.2........
0050: C0 12 00 16 00 13 00 09 00 15 00 12 00 03 00 08 ................
0060: 00 14 00 11 01 00 00 3E 00 0A 00 34 00 32 00 17 .......>...4.2..
0070: 00 01 00 03 00 13 00 15 00 06 00 07 00 09 00 0A ................
0080: 00 18 00 0B 00 0C 00 19 00 0D 00 0E 00 0F 00 10 ................
0090: 00 11 00 02 00 12 00 04 00 05 00 14 00 08 00 16 ................
00A0: 00 0B 00 02 01 00 ......
[Raw read]: length = 5
0000: 15 03 01 00 02 .....
[Raw read]: length = 2
0000: 02 28 .(
http-bio-8080-exec-3, READ: TLSv1 Alert, length = 2
http-bio-8080-exec-3, RECV TLSv1 ALERT: fatal, handshake_failure
http-bio-8080-exec-3, called closeSocket()
http-bio-8080-exec-3, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
2017-12-06 11:27:41 DEBUG DefaultManagedHttpClientConnection:87 - http-outgoing-1: Shutdown connection
2017-12-06 11:27:41 DEBUG MainClientExec:128 - Connection discarded
2017-12-06 11:27:41 DEBUG DefaultManagedHttpClientConnection:79 - http-outgoing-1: Close connection
2017-12-06 11:27:41 DEBUG PoolingHttpClientConnectionManager:320 - Connection released: [id: 1][route: {s}->https://link.bollore-logistics.com:443][total kept alive: 1; route allocated: 0 of 6; total allocated: 1 of 20]
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1694)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:939)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1120)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1147)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1131)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at com.gargoylesoftware.htmlunit.HtmlUnitSSLConnectionSocketFactory.connectSocket(HtmlUnitSSLConnectionSocketFactory.java:155)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:178)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1313)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1371)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1230)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:338)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:407)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:392)
at com.grabber.Grabber.accessWebpage(Grabber.java:204)
at com.grabber.Grabber.doGet(Grabber.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
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.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:1087)
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$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:619)
I had a similar problem (but not using HtmlUnit in that case. I used a directly a org.apache.http.impl.client.CloseableHttpClient).
It seams there is something wrong with the handshake until java 7 (no problem anymore in java 8). If you try to access a server providing "TLSv1.2" you might get the error reported by you.
If security is not that much of an issue in your case, you can try the to force usage of TLSv1.1 (as long as you have not yet switched to java 8).
This shoud be possible this way:
WebClientOptions webClientOptions= new WebClientOptions();
webClientOptions.setSSLClientProtocols(new String[]{"TLSv1.1"});
SSLConnectionSocketFactory.buildSSLSocketFactory(webClientOptions);
Assuming Sun/Oracle Java 6, since you didn't say IBM (which implements crypto differently):
Your problem is not ciphers (which BC-provider could fix only if the problem was lack of ECC ciphers), nor protocols. https://www.ssllabs.com/ssltest/analyze.html?d=link.bollore-logistics.com shows that server accepts ciphers and protocols that Java 6 could do without any augmentation.
Your problem is SNI (Server Name Indication). The ssllabs report shows that the only simulated clients that fail are the ones that don't send SNI (Android 2, Windows XP, Java 6) and a simple test with openssl confirms the server requires SNI. Java 6 JSSE did not implement SNI.
It might work to use the BC version of JSSE -- this is a separate jar bctls-jdk15on-$ver not bcprov-jdk15on-$ver and providername BCJSSE not BC. In the most recent versions (1.57 and 1.58) according to the source it appears to me the client should do SNI by default, if you connect using a domainname (not IPaddress or local alias). However I can't verify because I can't get BCJSSE to instantiate at all due to some problem with SecureRandom that I don't have time now to track down.

DJANGO-REST, MOD_WSGI and APACHE integration problems

I've been trying to integrate a DJANGO-REST WS into apache using MOD_WSGI, but after some long hours of trying to apply all debugging techniques and different wsgi scripts, I would appreciate some help.
Server version: Apache/2.2.22 (Ubuntu)
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
MOD_WSGI Version: 3.3
Currently my WSGI file is the following:
"""
WSGI config for zighome_rest project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os, sys
sys.path.append('/usr/local/ZigHomeWS')
sys.path.append('/usr/local/ZigHomeWS/zighome_rest')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zighome_rest.settings")
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
and my virtual host is configured as below:
<VirtualHost *:80>
ServerAdmin my.email#gmail.com
ServerName my.server.name
DocumentRoot /usr/local/DummyApp
WSGIDaemonProcess ZigHomeWS python-path=/usr/local/ZigHomeWS/zighome_rest:/usr/lib/python2.7:/usr/local/lib/python2.7/site-packages/django
WSGIProcessGroup ZigHomeWS
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias /ZigHomeWS /usr/local/ZigHomeWS/zighome_rest/zighome_rest/WSGI/django.wsgi
WSGIPassAuthorization On
<Directory /usr/local/ZigHomeWS/zighome_rest>
<Files django.wsgi>
Order deny,allow
Allow from all
</Files>
</Directory>
<Directory /usr/local/DummyApp>
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/error_ZigHomeWS.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
</VirtualHost>
The current settings.py file has the following configuration:
"""
Django settings for zighome_rest project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '6h34&#m=1t4!(axkhz1+%6%u8^o(7^ao500pl#*+=$sk(a846#'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'configuration',
'execution',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'zighome_rest.urls'
WSGI_APPLICATION = 'zighome_rest.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/usr/local/ZigHomeWS/zighome_rest/zighome.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
As soon as I call one of the services, with curl, like so:
curl -X POST http://my.server.name/ZigHomeWS/execution/start/ -u user:passwd
I get the following error logged:
[Sat Sep 27 19:15:28 2014] [info] mod_wsgi (pid=13351): Adding '/usr/local/ZigHomeWS/zighome_rest' to path.
[Sat Sep 27 19:15:28 2014] [info] mod_wsgi (pid=13351): Adding '/usr/lib/python2.7' to path.
[Sat Sep 27 19:15:28 2014] [info] mod_wsgi (pid=13351): Adding '/usr/local/lib/python2.7/site-packages/django' to path.
[Sat Sep 27 19:15:32 2014] [info] [client 46.189.221.224] mod_wsgi (pid=13351, process='ZigHomeWS', application=''): Loading WSGI script '/usr/local/ZigHomeWS/zighome_rest/zighome_rest/WSGI/django.wsgi'.
[Sat Sep 27 18:15:33 2014] [error] No handlers could be found for logger "django.request"
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] mod_wsgi (pid=13351): Exception occurred processing WSGI script '/usr/local/ZigHomeWS/zighome_rest/zighome_rest/WSGI/django.wsgi'.
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] Traceback (most recent call last):
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] response = self.get_response(request)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 199, in get_response
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 236, in handle_uncaught_exception
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return debug.technical_500_response(request, *exc_info)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 91, in technical_500_response
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] html = reporter.get_traceback_html()
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 350, in get_traceback_html
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return t.render(c)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return self._render(context)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 142, in _render
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return self.nodelist.render(context)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] bit = self.render_node(node, context)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return node.render(context)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 90, in render
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] output = self.filter_expression.resolve(context)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 624, in resolve
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] new_obj = func(obj, *arg_vals)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 769, in date
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return format(value, arg)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 343, in format
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return df.format(format_string)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 35, in format
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] pieces.append(force_text(getattr(self, piece)()))
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 268, in r
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return self.format('D, j M Y H:i:s O')
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 35, in format
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] pieces.append(force_text(getattr(self, piece)()))
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/encoding.py", line 85, in force_text
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] s = six.text_type(s)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 144, in __text_cast
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return func(*self.__args, **self.__kw)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 83, in ugettext
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return _trans.ugettext(message)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 325, in ugettext
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] return do_translate(message, 'ugettext')
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 306, in do_translate
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] _default = translation(settings.LANGUAGE_CODE)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 209, in translation
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] default_translation = _fetch(settings.LANGUAGE_CODE)
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 189, in _fetch
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] "The translation infrastructure cannot be initialized before the "
[Sat Sep 27 18:15:33 2014] [error] [client 46.189.221.224] AppRegistryNotReady: The translation infrastructure cannot be initialized before the apps registry is ready. Check that you don't make non-lazy gettext calls at import time.
I must confess that adding "/usr/local/lib/python2.7/site-packages/django" was just a measure of desperation, which end-up by resulting on nothing.
One thing I should probably mention, although it shouldn't make any difference to the solution, is that the core system is actually a C++ system which I wrapped up with SWIG.
Needless to say, it's working on the Django-REST development environment.
Last but not least, if in the WSGI script file I change these two lines:
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
by these:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
It will crash instead of providing the stack trace in the log file:
[Sat Sep 27 19:44:10 2014] [error] [client X.X.X.X] Premature end of script headers: django.wsgi
I end up applying the recommended debugging techniques but unfortunately it wasn't very helpful, since the stack-trace of gdb just gave me:
(gdb) cont
Continuing.
[New Thread 0x7fc6d4de9700 (LWP 9312)]
[New Thread 0x7fc6d45e8700 (LWP 9313)]
[Thread 0x7fc6dde3a700 (LWP 9242) exited]
[Thread 0x7fc6d45e8700 (LWP 9313) exited]
[Thread 0x7fc6d4de9700 (LWP 9312) exited]
[Thread 0x7fc6dd639700 (LWP 9245) exited]
[Thread 0x7fc6e364a740 (LWP 9216) exited]
[Inferior 1 (process 9216) exited with code 01]
Investigation:
So... I've just realized something.
From what I read from several sites on the web, I should be really using this call:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
on the WSGI script. Since I was getting nowhere fast with these two lines of code, which were crashing all the time, I remembered to call any other web-service that I have created and VOILA!! It works. (Don't know why I haven't try this before...stubbornness I guess)
Now, one of the major differences between the two web-services, is that one, only parses some XML file and adds data to the sqlite3 database and the other one (the one that crashes), starts the whole system, which implies the creation of multiple threads and so forth.
Thus, I'm now looking for any threads related documented issue I can find with modwsgi.
I hope you can provide me with some help
Thank you
I've updated my wsgi.py file from:
from django.core.handlers.wsgi import WSGIHandler
application = WSGIHandler()
To:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Objective C Thread Error

How do I handle these errors with no crash report? I believe that the issue that I have discovered is calling a class where a certain thread is suppose to manage of clearing and appending its own buffer..
Here is the report that I have received. I found this report in the console but there were no crash logs found in the device logs (even when the app did crash)
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 4 name: WebThread
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 4:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fcdeb4 0x32fcd000 + 3764
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_kernel.dylib 0x32fce048 0x32fcd000 + 4168
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 CoreFoundation 0x3b2bd040 0x3b226000 + 618560
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 CoreFoundation 0x3b2bbd9e 0x3b226000 + 613790
Feb 18 18:15:58 ReportCrash[14342] <Error>: 4 CoreFoundation 0x3b22eeb8 0x3b226000 + 36536
Feb 18 18:15:58 ReportCrash[14342] <Error>: 5 CoreFoundation 0x3b22ed44 0x3b226000 + 36164
Feb 18 18:15:58 ReportCrash[14342] <Error>: 6 WebCore 0x36f0da40 0x36f03000 + 43584
Feb 18 18:15:58 ReportCrash[14342] <Error>: 7 libsystem_c.dylib 0x3634f30e 0x3633e000 + 70414
Feb 18 18:15:58 ReportCrash[14342] <Error>: 8 libsystem_c.dylib 0x3634f1d4 0x3633e000 + 70100
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 5:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fcdeb4 0x32fcd000 + 3764
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_kernel.dylib 0x32fce048 0x32fcd000 + 4168
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 CoreFoundation 0x3b2bd040 0x3b226000 + 618560
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 CoreFoundation 0x3b2bbd9e 0x3b226000 + 613790
Feb 18 18:15:58 ReportCrash[14342] <Error>: 4 CoreFoundation 0x3b22eeb8 0x3b226000 + 36536
Feb 18 18:15:58 ReportCrash[14342] <Error>: 5 CoreFoundation 0x3b22ed44 0x3b226000 + 36164
Feb 18 18:15:58 ReportCrash[14342] <Error>: 6 Foundation 0x3603f78a 0x3603b000 + 18314
Feb 18 18:15:58 ReportCrash[14342] <Error>: 7 Foundation 0x360e3058 0x3603b000 + 688216
Feb 18 18:15:58 ReportCrash[14342] <Error>: 8 iOSMad 0x000ff2e6 0xf5000 + 41702
Feb 18 18:15:58 ReportCrash[14342] <Error>: 9 Foundation 0x360ec678 0x3603b000 + 726648
Feb 18 18:15:58 ReportCrash[14342] <Error>: 10 libsystem_c.dylib 0x3634f30e 0x3633e000 + 70414
Feb 18 18:15:58 ReportCrash[14342] <Error>: 11 libsystem_c.dylib 0x3634f1d4 0x3633e000 + 70100
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 6 name: com.apple.NSURLConnectionLoader
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 6:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fcdeb4 0x32fcd000 + 3764
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_kernel.dylib 0x32fce048 0x32fcd000 + 4168
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 CoreFoundation 0x3b2bd040 0x3b226000 + 618560
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 CoreFoundation 0x3b2bbd9e 0x3b226000 + 613790
Feb 18 18:15:58 ReportCrash[14342] <Error>: 4 CoreFoundation 0x3b22eeb8 0x3b226000 + 36536
Feb 18 18:15:58 ReportCrash[14342] <Error>: 5 CoreFoundation 0x3b22ed44 0x3b226000 + 36164
Feb 18 18:15:58 ReportCrash[14342] <Error>: 6 Foundation 0x36068bc8 0x3603b000 + 187336
Feb 18 18:15:58 ReportCrash[14342] <Error>: 7 Foundation 0x360ec678 0x3603b000 + 726648
Feb 18 18:15:58 ReportCrash[14342] <Error>: 8 libsystem_c.dylib 0x3634f30e 0x3633e000 + 70414
Feb 18 18:15:58 ReportCrash[14342] <Error>: 9 libsystem_c.dylib 0x3634f1d4 0x3633e000 + 70100
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 7:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fded98 0x32fcd000 + 73112
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_c.dylib 0x36344cf6 0x3633e000 + 27894
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 libsystem_c.dylib 0x36344a12 0x3633e000 + 27154
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 libsystem_c.dylib 0x363448a0 0x3633e000 + 26784
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 8:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fded98 0x32fcd000 + 73112
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_c.dylib 0x36344cf6 0x3633e000 + 27894
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 libsystem_c.dylib 0x36344a12 0x3633e000 + 27154
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 libsystem_c.dylib 0x363448a0 0x3633e000 + 26784
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 9 name: com.apple.CFSocket.private
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 9:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fde594 0x32fcd000 + 71060
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 CoreFoundation 0x3b2c11f2 0x3b226000 + 635378
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 libsystem_c.dylib 0x3634f30e 0x3633e000 + 70414
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 libsystem_c.dylib 0x3634f1d4 0x3633e000 + 70100
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 10:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fded98 0x32fcd000 + 73112
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_c.dylib 0x36344cf6 0x3633e000 + 27894
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 libsystem_c.dylib 0x36344a12 0x3633e000 + 27154
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 libsystem_c.dylib 0x363448a0 0x3633e000 + 26784
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 11:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fde594 0x32fcd000 + 71060
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 ExternalAccessory 0x3440f742 0x34409000 + 26434
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 Foundation 0x360ec678 0x3603b000 + 726648
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 libsystem_c.dylib 0x3634f30e 0x3633e000 + 70414
Feb 18 18:15:58 ReportCrash[14342] <Error>: 4 libsystem_c.dylib 0x3634f1d4 0x3633e000 + 70100
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 12:
Feb 18 18:15:58 ReportCrash[14342] <Error>: 0 libsystem_kernel.dylib 0x32fde08c 0x32fcd000 + 69772
Feb 18 18:15:58 ReportCrash[14342] <Error>: 1 libsystem_c.dylib 0x36347d2a 0x3633e000 + 40234
Feb 18 18:15:58 ReportCrash[14342] <Error>: 2 libsystem_c.dylib 0x36351f14 0x3633e000 + 81684
Feb 18 18:15:58 ReportCrash[14342] <Error>: 3 Foundation 0x36068cca 0x3603b000 + 187594
Feb 18 18:15:58 ReportCrash[14342] <Error>: 4 ExternalAccessory 0x3440e986 0x34409000 + 22918
Feb 18 18:15:58 ReportCrash[14342] <Error>: 5 Foundation 0x360ec678 0x3603b000 + 726648
Feb 18 18:15:58 ReportCrash[14342] <Error>: 6 libsystem_c.dylib 0x3634f30e 0x3633e000 + 70414
Feb 18 18:15:58 ReportCrash[14342] <Error>: 7 libsystem_c.dylib 0x3634f1d4 0x3633e000 + 70100
Feb 18 18:15:58 ReportCrash[14342] <Error>:
Feb 18 18:15:58 ReportCrash[14342] <Error>: Thread 0 crashed with ARM Thread State (32-bit):
Feb 18 18:15:58 ReportCrash[14342] <Error>: r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x3c2c0534
Feb 18 18:15:58 ReportCrash[14342] <Error>: r4: 0x00000006 r5: 0x3c2c0b88 r6: 0x1e57cd14 r7: 0x2fd0ba14
Feb 18 18:15:58 ReportCrash[14342] <Error>: r8: 0x1e57ccf0 r9: 0x00000300 r10: 0x00000000 r11: 0x1f82b498
Feb 18 18:15:58 ReportCrash[14342] <Error>: ip: 0x00000148 sp: 0x2fd0ba08 lr: 0x3636d123 pc: 0x32fde350
Feb 18 18:15:58 ReportCrash[14342] <Error>: cpsr: 0x00000010
Any help would be greatly appreciated...
thank you in advance.
This may or may not help in your particular case, but it is often helpful to add "All Exceptions" to your breakpoints in the debugger. This is done by selecting the Breakpoint Navigator, clicking the + icon in the lower left of the pane and clicking "Add Exception Breakpoint".
Apologies if you've already done this but maybe it will be useful to a future reader.

UIGraphicsGetCurrentContext Problem

I have a problem drawing objects passing this graphic context
CGContextRef context = UIGraphicsGetCurrentContext();
Here is the code I use to draw
- (void) draw: (CGContextRef) gc
{
CGFloat black[4] = {0.0f, 0.0f, 0.0f, 1.0f}; // R G B + Alpha
CGPoint p [2];
p[0].x = xStart ;
p[0].y = yStart ;
p[1].x = xEnd ;
p[1].y = yEnd ;
CGContextSetStrokeColor(gc, black); //Definie la couleur
CGContextStrokeLineSegments(gc, p, 2 ) ;
}
Some object draw, other don't (very strange) and in the console I read:
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextDrawImage: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextSetStrokeColor: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextStrokeLineSegments: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextSetStrokeColor: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextStrokeLineSegments: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextSetStrokeColor: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextStrokeLineSegments: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextSetStrokeColor: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextStrokeLineSegments: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextSetStrokeColor: invalid context 0x0
Thu Mar 24 21:53:59 MacBook-Air-di-Michele-Giarratana.local IVBricker[381] <Error>: CGContextStrokeLineSegments: invalid context 0x0
So I can't speak to the invalid content errors because we'd need to see the rest of the code but it looks like the colour space could be incorrect (it's not RGB by default). Add this before you call stroke:
CGContextSetStrokeColorSpace(gc, CGColorSpaceCreateDeviceRGB());