Repository navigation
Error pinging server #134
Copy link
Copy link
Closed
Description
In some cases local server cache proxy is not pinged. One known problem is system proxy in connection's settings (wi-fi or apn).
May be some another reasons exist.
Typical stacktrace is
E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:52645/ping with offset 0
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.FileNotFoundException: http://127.0.0.1:52645/ping
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:52645/ping with offset 0
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.FileNotFoundException: http://127.0.0.1:52645/ping
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:52645/ping with offset 0
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.FileNotFoundException: http://127.0.0.1:52645/ping
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:86)
at com.danikula.videocache.Pinger.access$100(Pinger.java:28)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:108)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:104)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, email me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, email me danikula@gmail.com or create issue here https://github.com/danikula/AndroidVideoCache/issues
at com.danikula.videocache.Pinger.ping(Pinger.java:67)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:182)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:119)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:100)
at com.danikula.videocache.sample.VideoFragment.startVideo(VideoFragment.java:59)
at com.danikula.videocache.sample.VideoFragment.afterViewInjected(VideoFragment.java:44)
at com.danikula.videocache.sample.VideoFragment_.onViewChanged(VideoFragment_.java:107)
at org.androidannotations.api.view.OnViewChangedNotifier.notifyViewChanged(OnViewChangedNotifier.java:41)
at com.danikula.videocache.sample.VideoFragment_.onViewCreated(VideoFragment_.java:72)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1259)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1624)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6268)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Reactions are currently unavailable
Activity
danikula commentedon Apr 23, 2017
Since #28 fixed by this commit it should be fixed too.
ricardorover commentedon Aug 2, 2017
Hi. Using AndroidVideoCache version 2.7.0 I saw the log below, so here I am, reporting as asked :) Hope it helps somehow.
I was testing using AndroidVideoCache inside recyclerview rows to pre-load audio and video. Scrolling between a lot of items very fast, around list position 650 the log stack traces appeared:
(...)
(...)
Inxo commentedon Aug 8, 2017
Have a some problem as @ricardorover
ziyuo commentedon Aug 15, 2017
E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT@]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT@]. Version: 2.7.0
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
at com.haier.cellarette.activity.VideoModuleActivity.startVideo(VideoModuleActivity.java:445)
at com.haier.cellarette.activity.VideoModuleActivity.showContent(VideoModuleActivity.java:353)
at com.haier.wine_consult.presenter.ConsultPresenter$5.onNext(ConsultPresenter.java:136)
at com.haier.wine_consult.presenter.ConsultPresenter$5.onNext(ConsultPresenter.java:121)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:215)
at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5280)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
josinaldobarbosa commentedon Oct 5, 2017
after many days of frustration I managed to find something: NanoHttpd/nanohttpd#270 (comment),
as MrStanaland said, Mint is causing this, at least in my case, now it works for me 👍
SanfenR commentedon Oct 30, 2017
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [HTTP @ Version: 2.7.0
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
at com.goodchef.liking.module.paly.VideoPlayActivity.onCreate(VideoPlayActivity.java:146)
at android.app.Activity.performCreate(Activity.java:6910)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at cn.jiguang.a.a.d.a.a.d.callActivityOnCreate(Unknown Source)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6577)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
When I loaded the local video, there was' Error pinging server (attempt: 2, timeout: 280) 'and this Error
firebaseempower commentedon Dec 13, 2017
Default proxies are: [DIRECT]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]. Version: 2.7.0
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
at com.danikula.videocache.sample.VideoFragment.setupPlayer(VideoFragment.java:80)
at com.danikula.videocache.sample.VideoFragment.afterViewInjected(VideoFragment.java:63)
at com.danikula.videocache.sample.VideoFragment_.onViewChanged(VideoFragment_.java:107)
at org.androidannotations.api.view.OnViewChangedNotifier.notifyViewChanged(OnViewChangedNotifier.java:41)
at com.danikula.videocache.sample.VideoFragment_.onViewCreated(VideoFragment_.java:72)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1259)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1624)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1270)
at android.app.Activity.performStart(Activity.java:6689)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2622)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
getting this issue
dechaow commentedon Jan 12, 2018
Hello,I using this library,this but I rest on video list pager a long time, again scroll list,they throw the error:
`E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:58762/ping with offset 0. Version: 2.7.0
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:776)
Caused by: java.io.FileNotFoundException: http://127.0.0.1:58762/ping
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:776)
//When I look this lines,I don't think Default proxy is [HTTP @ 10.8.8.103:81] but proxy in Library is //[127.0.0.1] ,my should modify Default proxy in library?
E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [HTTP @ 10.8.8.103:81]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [HTTP @ 10.8.8.103:81]. Version: 2.7.0
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
at com.shuyu.gsyvideoplayer.video.base.GSYVideoView.setUp(GSYVideoView.java:381)
at com.shuyu.gsyvideoplayer.video.base.GSYVideoControlView.setUp(GSYVideoControlView.java:524)
`
I hope you can answer my question,thanks.
gongtingshisi commentedon Feb 7, 2018
thanks author's masterpiece . response error still occurs on my phone,even though it has "IgnoreHostProxySelector.install(PROXY_HOST, port);" in HttpProxyCacheServer constructor function.Anyone knows how to resolve it?thank you.
Hackforid commentedon Mar 5, 2018
I saw this log when I connected to Wifi which has no Connection to Internet
AND
If I close both wifi and cell data, your proxy can not provider cached res.
ycdm commentedon May 7, 2018
This problem still occurs even if wifi is connected
48 remaining items
docwei2050 commentedon Feb 6, 2021
who is MrStanaland?
seazon commentedon Mar 2, 2021
Same with @nuborisar, and the solution works for the following case:
Check your
android:networkSecurityConfigfile, and addbyron-xie commentedon Apr 6, 2021
runOnUiThread(Runnable {
this.netPath = netPath
// var videoUrl = Const.PicBaseUrlConst.VID_BASE_URL.plus(netPath)
var videoUrl = "http://122.51.230.43:8081/e98d5c1b754b2fcb7941232135504a46/wx_camera_1584678750453.mp4"
Log.e("JavascriptInterface", "videoUrl:" + videoUrl)
// viewModel.uploadCover()
// viewModel.postVideoArticle(netPath,)
video_capture.visibility = View.GONE
})
byron-xie commentedon Apr 6, 2021
Use runOnUiThread can fixed it
ShenYu0812 commentedon Apr 25, 2021
i have see this: when i use it:
Phone: XIAOMI K30 (Android11, MIUI12)
The way i use it:
i had not implementation this library derectly but use third-party library:
just some thing different:
but not working, and crash as if because not support https.
sushilLynhill commentedon Oct 1, 2021
E/HttpProxyCacheServer: HttpProxyCacheServer error
com.danikula.videocache.ProxyCacheException: Error during waiting connection. Version: 2.7.1
at com.danikula.videocache.HttpProxyCacheServer.waitForRequest(HttpProxyCacheServer.java:223)
at com.danikula.videocache.HttpProxyCacheServer.access$100(HttpProxyCacheServer.java:54)
at com.danikula.videocache.HttpProxyCacheServer$WaitRequestsRunnable.run(HttpProxyCacheServer.java:326)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:389)
at java.net.ServerSocket.implAccept(ServerSocket.java:531)
at java.net.ServerSocket.accept(ServerSocket.java:499)
at com.danikula.videocache.HttpProxyCacheServer.waitForRequest(HttpProxyCacheServer.java:218)
at com.danikula.videocache.HttpProxyCacheServer.access$100(HttpProxyCacheServer.java:54)
at com.danikula.videocache.HttpProxyCacheServer$WaitRequestsRunnable.run(HttpProxyCacheServer.java:326)
at java.lang.Thread.run(Thread.java:761)
wirteEable commentedon Mar 9, 2022
2022-03-09 09:16:55.536 10193-10193/com.yihua.hugou W/System.err: com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]. Version: 7.1.5
2022-03-09 09:16:55.537 10193-10193/com.yihua.hugou W/System.err: at com.danikula.videocache.Pinger.ping(Pinger.java:71)
2022-03-09 09:16:55.537 10193-10193/com.yihua.hugou W/System.err: at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:181)
2022-03-09 09:16:55.537 10193-10193/com.yihua.hugou W/System.err: at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:118)
2022-03-09 09:16:55.537 10193-10193/com.yihua.hugou W/System.err: at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:99)
2022-03-09 09:16:55.537 10193-10193/com.yihua.hugou W/System.err: at com.shuyu.gsyvideoplayer.cache.ProxyCacheManager.doCacheLogic(ProxyCacheManager.java:75)
2022-03-09 09:16:55.537 10193-10193/com.yihua.hugou W/System.err: at tv.danmaku.ijk.media.exo2.Exo2PlayerManager.initVideoPlayer(Exo2PlayerManager.java:62)
2022-03-09 09:16:55.538 10193-10193/com.yihua.hugou W/System.err: at com.shuyu.gsyvideoplayer.GSYVideoBaseManager.initVideo(GSYVideoBaseManager.java:612)
2022-03-09 09:16:55.538 10193-10193/com.yihua.hugou W/System.err: at com.shuyu.gsyvideoplayer.GSYVideoBaseManager.access$000(GSYVideoBaseManager.java:38)
2022-03-09 09:16:55.538 10193-10193/com.yihua.hugou W/System.err: at com.shuyu.gsyvideoplayer.GSYVideoBaseManager$MediaHandler.handleMessage(GSYVideoBaseManager.java:572)
2022-03-09 09:16:55.538 10193-10193/com.yihua.hugou W/System.err: at android.os.Handler.dispatchMessage(Handler.java:110)
2022-03-09 09:16:55.538 10193-10193/com.yihua.hugou W/System.err: at android.os.Looper.loop(Looper.java:219)
2022-03-09 09:16:55.538 10193-10193/com.yihua.hugou W/System.err: at android.app.ActivityThread.main(ActivityThread.java:8668)
2022-03-09 09:16:55.539 10193-10193/com.yihua.hugou W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2022-03-09 09:16:55.539 10193-10193/com.yihua.hugou W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
2022-03-09 09:16:55.539 10193-10193/com.yihua.hugou W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
aungbophyoe commentedon Jun 30, 2022
2022-06-30 12:42:34.686 27076-27767/myapp.debug E/Pinger: Error reading ping response
com.danikula.videocache.ProxyCacheException: Error opening connection for http://127.0.0.1:37983/ping with offset 0. Version: 2.7.1
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:85)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:124)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:462)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
at com.danikula.videocache.HttpUrlSource.openConnection(HttpUrlSource.java:171)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:78)
at com.danikula.videocache.Pinger.pingServer(Pinger.java:101)
at com.danikula.videocache.Pinger.access$100(Pinger.java:33)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:123)
at com.danikula.videocache.Pinger$PingCallable.call(Pinger.java:119)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
2022-06-30 12:42:34.688 27076-27398/myapp.debug E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]. Version: 2.7.1
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:185)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:122)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:103)
Mishgan commentedon Feb 17, 2023
E Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]. Version: 2.7.1
at com.danikula.videocache.Pinger.ping(Unknown Source:135)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(Unknown Source:5)
at com.danikula.videocache.HttpProxyCacheServer.(Unknown Source:101)
at com.danikula.videocache.HttpProxyCacheServer.(Unknown Source:0)
at com.danikula.videocache.HttpProxyCacheServer$Builder.build(Unknown Source:7)
sansan-cc commentedon Jun 12, 2023
有找到解决办法么,我和你使用场景一样
sansan-cc commentedon Jun 12, 2023
tahakorkem commentedon Jul 5, 2023
Adding networkSecurityConfig to manifest has solved this problem for me. See here: https://stackoverflow.com/a/54268640/4191562
chands commentedon Mar 3, 2024
Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]
com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at #134. Default proxies are: [DIRECT]. Version: 2.7.1
at com.danikula.videocache.Pinger.ping(Pinger.java:73)
at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:185)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:122)
at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:103)
chands commentedon Mar 3, 2024
Finally following solution worked for me :)
add following in a xml file network_security_config inside res/xml dir
<network-security-config> <domain-config cleartextTrafficPermitted="true"> <domain includeSubdomains="true">127.0.0.1</domain> </domain-config> <base-config cleartextTrafficPermitted="false"> <trust-anchors> <certificates src="system" /> </trust-anchors> </base-config> </network-security-config>add following lines in Manifest.xml file inside application tag and outside activity
android:networkSecurityConfig="@xml/network_security_config"Update README.md