Lucky Dog

[안드로이드] Android Retrofit2 네트워크 에러 관련 본문

안드로이드

[안드로이드] Android Retrofit2 네트워크 에러 관련

Poohya 2018. 11. 2. 17:53

Caused by: java.io.EOFException: \n not found: limit=0 content=…



1. 서버 방화벽 문제


=>접속 허용으로 해결


2. Tomcat keepAliveTimeout 문제


connectionTimeout 을 늘린다고 해결 안됨. (keepAliveTimeout 을 끄거나 늘려야 함)



o 이슈 재현

Tomcat7 server.xml 설정


<Connector 

...

connectionTimeout="xxx" (milisecond)

keepAliveTimeout="xxx" (millisecond)

...

/>


keepAliveTimeout 시간을 줄이고 (ex 1~100)

휴대폰에서 접속하면 에러 발생


maxThreads 초과하는 접속은 java.net.SocketTimeoutException: SSL handshake timed out 발생


o Retrofit2 error message


java.io.IOException: unexpected end of stream on Connection{39.115.210.51:8443, proxy=DIRECT@ hostAddress=/xx.xxx.xxx.xx:xxx cipherSuite=TLS_RSA_WITH_AES_128_CBC_SHA protocol=http/1.1}

...

...

Caused by: java.io.EOFException: \n not found: limit=0 content=…

...


o Volley error message


Retrofit2 메시지와 거의 동일. 에러 메시지에 (recycle count=0) 만 추가됨


Comments