初めて APK で ARC を試しました。正常に起動しますが、バックエンド サーバーへの接続に失敗します。
SocketException: setsockopt が失敗しました: EINVAL (無効な引数)
2015 年 4 月 7 日にダウンロードした現在の Chrome と ARC。
スタック トレースは、サポートされていない KeepAlive ソケット オプションを設定しようとして失敗したことを示しています (そのポインタより)。
いつも呼び出しているSocketConfig socket = SocketConfig.custom().setSoKeepAlive(false).build();
ように、HttpClientに追加しても役に立ちません。私には見えますが、 ...で呼び出しても呼び出しがクラッシュします。HttpClientConnectionOperator
sock.setKeepAlive(socketConfig.isSoKeepAlive());
false
ありがとう、乾杯、トム。
I/HttpClient( 204): I/O exception (java.net.SocketException) caught when processing request to HttpRoute[{s}->https://xxx.xxx.xxx:443]: setsockopt failed: EINVAL (Invalid argument)
I/HttpClient( 204): Retrying request to HttpRoute[{s}->https://xxx.xxx.xxx:443]
shell.js:141 I/libposix_translation_static( 204): TCPSocket::Bind: [::0.0.0.0]:0
shell.js:141 I/libposix_translation_static( 204): TCPSocket::connect: [xxx]:443
shell.js:141 E/PortalHttpClient( 204): Failed http request: POST https://xxx.xxx.xxx:443/if/xxx HTTP/1.1
E/PortalHttpClient( 204): java.net.SocketException: setsockopt failed: EINVAL (Invalid argument)
E/PortalHttpClient( 204): at libcore.io.IoBridge.setSocketOption(IoBridge.java:306)
E/PortalHttpClient( 204): at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:289)
E/PortalHttpClient( 204): at java.net.Socket.setKeepAlive(Socket.java:453)
E/PortalHttpClient( 204): at com.android.org.conscrypt.OpenSSLSocketImplWrapper.setKeepAlive(OpenSSLSocketImplWrapper.java:100)
E/PortalHttpClient( 204): at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:134)
E/PortalHttpClient( 204): at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
E/PortalHttpClient( 204): at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:373)
E/PortalHttpClient( 204): at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:225)
E/PortalHttpClient( 204): at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
E/PortalHttpClient( 204): at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
E/PortalHttpClient( 204): at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
E/PortalHttpClient( 204): at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
E/PortalHttpClient( 204): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
E/PortalHttpClient( 204): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
E/PortalHttpClient( 204): at xxx.xxx.PortalHttpClient.execute(PortalHttpClient.java:134)
E/PortalHttpClient( 204): at xxx.xxx.PortalHttpClient.executeWithRetry(PortalHttpClient.java:107)
E/PortalHttpClient( 204): at xxx.xxx.PortalHttpClient.post(PortalHttpClient.java:78)
E/PortalHttpClient( 204): at xxx.xxx.HttpServerCommunication.pairDevice(HttpServerCommunication.java:100)
E/PortalHttpClient( 204): at xxx.xxx.ServerCommunicationSwitch.pairDevice(ServerCommunicationSwitch.java:51)
E/PortalHttpClient( 204): at xxx.xxx.xxx.app.base.XxxAsyncTask.doInBackground(XxxAsyncTask.java:53)
E/PortalHttpClient( 204): at android.os.AsyncTask$4.call(AsyncTask.java:372)
E/PortalHttpClient( 204): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/PortalHttpClient( 204): at android.os.AsyncTask$SerialExecutor$2.run(AsyncTask.java:280)
E/PortalHttpClient( 204): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/PortalHttpClient( 204): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/PortalHttpClient( 204): at java.lang.Thread.run(Thread.java:841)
E/PortalHttpClient( 204): Caused by: libcore.io.ErrnoException: setsockopt failed: EINVAL (Invalid argument)
E/PortalHttpClient( 204): at libcore.io.Posix.setsockoptInt(Native Method)
E/PortalHttpClient( 204): at libcore.io.ForwardingOs.setsockoptInt(ForwardingOs.java:122)
E/PortalHttpClient( 204): at libcore.io.IoBridge.setSocketOptionErrno(IoBridge.java:338)
E/PortalHttpClient( 204): at libcore.io.IoBridge.setSocketOption(IoBridge.java:304)
E/PortalHttpClient( 204): ... 28 more
W/PortalHttpClient( 204): xxx.xxx.comm.common.CommunicationException: HOST_NOT_AVAILABLE[recoverable]: java.net.SocketException: setsockopt failed: EINVAL (Invalid argument) - will retry in 10s