Skip to content

Error pinging server #134

Closed
Closed

Description

@danikula

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)

Activity

  1. self-assigned this
    on Apr 22, 2017
  2. danikula commented on Apr 23, 2017

    @danikula
    OwnerAuthor

    Since #28 fixed by this commit it should be fixed too.

  3. added this to the 2.7.0 milestone on Apr 23, 2017
  4. ricardorover commented on Aug 2, 2017

    @ricardorover

    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:

    08-01 23:37:33.905 16591-16591 W/Pinger: Error pinging server (attempt: 0, timeout: 70). 
    08-01 23:37:34.046 16591-16591 W/Pinger: Error pinging server (attempt: 1, timeout: 140). 
    08-01 23:37:34.326 16591-16591 W/Pinger: Error pinging server (attempt: 2, timeout: 280). 
    08-01 23:37:34.335 16591-16591 E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/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 https://github.com/danikula/AndroidVideoCache/issues/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.myapp.app.controller.AssetController.streamAsset(AssetController.java:117)
                                                                  at com.myapp.app.ui.main.feed.cell.AppVideoCell.bind(AppVideoCell.java:38)
                                                                  at com.myapp.app.ui.main.feed.AppListAdapter.onBindViewHolder(AppListAdapter.java:97)
                                                                  at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6356)
                                                                  at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6389)
                                                                  at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5335)
                                                                  at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5598)
                                                                  at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:282)
                                                                  at android.support.v7.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:336)
                                                                  at android.support.v7.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:349)
                                                                  at android.support.v7.widget.GapWorker.prefetch(GapWorker.java:356)
                                                                  at android.support.v7.widget.GapWorker.run(GapWorker.java:387)
                                                                  at android.os.Handler.handleCallback(Handler.java:751)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                  at android.os.Looper.loop(Looper.java:154)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:6126)
                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    

    (...)

    08-01 23:37:34.543 16591-16591 W/Pinger: Error pinging server (attempt: 0, timeout: 70). 
    08-01 23:37:34.685 16591-16591 W/Pinger: Error pinging server (attempt: 1, timeout: 140). 
    08-01 23:37:34.966 16591-16591 W/Pinger: Error pinging server (attempt: 2, timeout: 280). 
    08-01 23:37:34.969 16591-16591 E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/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 https://github.com/danikula/AndroidVideoCache/issues/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.myapp.app.controller.AssetController.streamAsset(AssetController.java:117)
                                                                  at com.myapp.app.ui.main.feed.cell.AppVideoCell.bind(AppVideoCell.java:38)
                                                                  at com.myapp.app.ui.main.feed.AppListAdapter.onBindViewHolder(AppListAdapter.java:97)
                                                                  at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6356)
                                                                  at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6389)
                                                                  at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5335)
                                                                  at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5598)
                                                                  at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440)
                                                                  at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436)
                                                                  at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224)
                                                                  at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551)
                                                                  at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511)
                                                                  at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1325)
                                                                  at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1061)
                                                                  at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4726)
                                                                  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
                                                                  at android.view.Choreographer.doCallbacks(Choreographer.java:686)
                                                                  at android.view.Choreographer.doFrame(Choreographer.java:618)
                                                                  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
                                                                  at android.os.Handler.handleCallback(Handler.java:751)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                  at android.os.Looper.loop(Looper.java:154)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:6126)
                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    

    (...)

    08-01 23:37:37.535 16591-20734 E/ProxyCache: ProxyCache error
                                                                  com.danikula.videocache.ProxyCacheException: Error opening connection for http://api.myapp.com/asset/123 with offset 72932. Version: 2.7.0
                                                                      at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
                                                                      at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:123)
                                                                      at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19)
                                                                      at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:187)
                                                                      at java.lang.Thread.run(Thread.java:761)
                                                                   Caused by: java.io.FileNotFoundException: http://api.myapp.com/asset/123
                                                                      at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
                                                                      at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
                                                                      at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:123) 
                                                                      at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19) 
                                                                      at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:187) 
                                                                      at java.lang.Thread.run(Thread.java:761) 
    08-01 23:37:37.537 16591-17446 E/HttpProxyCacheServer: HttpProxyCacheServer error
                                                                            com.danikula.videocache.ProxyCacheException: Error processing request. Version: 2.7.0
                                                                                at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:241)
                                                                                at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52)
                                                                                at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338)
                                                                                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                                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:761)
                                                                             Caused by: com.danikula.videocache.ProxyCacheException: Error reading source 1 times. Version: 2.7.0
                                                                                at com.danikula.videocache.ProxyCache.checkReadSourceErrorsCount(ProxyCache.java:59)
                                                                                at com.danikula.videocache.ProxyCache.read(ProxyCache.java:45)
                                                                                at com.danikula.videocache.HttpProxyCache.responseWithCache(HttpProxyCache.java:79)
                                                                                at com.danikula.videocache.HttpProxyCache.processRequest(HttpProxyCache.java:45)
                                                                                at com.danikula.videocache.HttpProxyCacheServerClients.processRequest(HttpProxyCacheServerClients.java:42)
                                                                                at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:234)
                                                                                at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52) 
                                                                                at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338) 
                                                                                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) 
                                                                                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:761) 
    
  5. Inxo commented on Aug 8, 2017

    @Inxo

    Have a some problem as @ricardorover

  6. ziyuo commented on Aug 15, 2017

    @ziyuo

    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)

  7. josinaldobarbosa commented on Oct 5, 2017

    @josinaldobarbosa
    E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/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 https://github.com/danikula/AndroidVideoCache/issues/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)
                                                                     ...
    
    

    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 👍

    Mint.disableNetworkMonitoring();
    Mint.initAndStartSession(context, BuildConfig.MINT);
    
  8. SanfenR commented on Oct 30, 2017

    @SanfenR

    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

  9. firebaseempower commented on Dec 13, 2017

    @firebaseempower

    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

  10. dechaow commented on Jan 12, 2018

    @dechaow

    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.

  11. gongtingshisi commented on Feb 7, 2018

    @gongtingshisi

    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.

  12. Hackforid commented on Mar 5, 2018

    @Hackforid

    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.

  13. ycdm commented on May 7, 2018

    @ycdm

    This problem still occurs even if wifi is connected

  14. 48 remaining items

  15. docwei2050 commented on Feb 6, 2021

    @docwei2050
    E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/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 https://github.com/danikula/AndroidVideoCache/issues/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)
                                                                     ...
    

    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 👍

    Mint.disableNetworkMonitoring();
    Mint.initAndStartSession(context, BuildConfig.MINT);
    

    who is MrStanaland?

  16. seazon commented on Mar 2, 2021

    @seazon

    Same with @nuborisar, and the solution works for the following case:

    Caused by: java.io.IOException: Cleartext HTTP traffic to 127.0.0.1 not permitted
    

    Check your android:networkSecurityConfig file, and add

    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">127.0.0.1</domain>
    </domain-config>
    
  17. byron-xie commented on Apr 6, 2021

    @byron-xie

    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)

    videoplayer.setUp(videoUrl,"dsa", Jzvd.SCREEN_NORMAL)//videoplayer
    Glide.with(videoplayer).load(videoUrl).into(videoplayer.posterImageView)
    
    Log.e("JavascriptInterface", "videoUrl:" + videoUrl)
    

    // viewModel.uploadCover()
    // viewModel.postVideoArticle(netPath,)
    video_capture.visibility = View.GONE
    })

    }
    
  18. byron-xie commented on Apr 6, 2021

    @byron-xie

    Use runOnUiThread can fixed it

  19. ShenYu0812 commented on Apr 25, 2021

    @ShenYu0812

    i have see this: when i use it:

    1. Android Studio & Platform:
    Android Studio 4.1.1
    Build #AI-201.8743.12.41.6953283, built on November 5, 2020
    Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    macOS 10.16
    
    1. Android build.gradle config:
      minSdkVersion 21
      targetSdkVersion 30
    
      kotlinOptions { jvmTarget = '1.8' }
    
    1. Phone: XIAOMI K30 (Android11, MIUI12)

    2. The way i use it:

    // i had use "ktor" to make requests to local  proxy server.
    CoroutineScope(Dispatchers.IO).launch {
      ...
      var client: HttpClient? = null
      try {
          ...
         client = HttpClient(OkHttp) ...
         val statement = client.get<HttpStatement>(httpProxyCacheServer.getProxyUrl(rawUrl)) // this is (PreloadStatement.kt:53)
         ...
      }
    }
    
    1. other info:
      i had not implementation this library derectly but use third-party library:
     implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.1.3-jitpack'
    
    1. i've clone this project newest and compare with that:
      just some thing different:

    截屏2021-04-25 下午6 18 06

    1. i try to exclude third-party lib and use this:
        implementation("com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:$GSY_PLAYER_VERSION") {
            exclude group: 'com.github.CarGuo.GSYVideoPlayer', module: 'gsyVideoPlayer-proxy_cache'
        }
        implementation "com.danikula:videocache:2.7.1"
    

    but not working, and crash as if because not support https.

    1. error log:
    2021-04-25 17:40:37.311 32413-32579/com.mycompany.demo W/HttpProxyCacheDebuger: Error pinging server (attempt: 2, timeout: 280). 
    2021-04-25 17:40:37.311 32413-32574/com.mycompany.demo W/HttpProxyCacheDebuger: Error pinging server (attempt: 2, timeout: 280). 
    2021-04-25 17:40:37.312 32413-32579/com.mycompany.demo E/HttpProxyCacheDebuger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]
    2021-04-25 17:40:37.312 32413-32574/com.mycompany.demo E/HttpProxyCacheDebuger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]
    2021-04-25 17:40:37.312 32413-32574/com.mycompany.demo W/System.err: com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]. Version: 8.1.2
    2021-04-25 17:40:37.312 32413-32574/com.mycompany.demo W/System.err:     at com.danikula.videocache.Pinger.ping(Pinger.java:71)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:184)
        
        [          1619343637.313 32413:32510 W/Failed to close socket on proxy side: {}. It seems client have already closed connectioshutdown failed: ENOTCONN (Transport endpoint is not connected)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:121)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:102)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at com.mycompany.demo.ui.video.manager.PreloadStatement$start$1.invokeSuspend(PreloadStatement.kt:53)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    2021-04-25 17:40:37.313 32413-32574/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
    2021-04-25 17:40:37.313 32413-32579/com.mycompany.demo W/System.err: com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]. Version: 8.1.2
    2021-04-25 17:40:37.313 32413-32579/com.mycompany.demo W/System.err:     at com.danikula.videocache.Pinger.ping(Pinger.java:71)
    2021-04-25 17:40:37.313 32413-32579/com.mycompany.demo W/System.err:     at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:184)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:121)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:102)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at com.mycompany.demo.ui.video.manager.PreloadStatement$start$1.invokeSuspend(PreloadStatement.kt:53)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    2021-04-25 17:40:37.314 32413-32579/com.mycompany.demo W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
    2021-04-25 17:40:37.316 32413-32510/com.mycompany.demo I/HttpProxyCacheDebuger: Opened connections: 7
    2021-04-25 17:40:37.339 32413-32510/com.mycompany.demo E/HttpProxyCacheDebuger: ****** injectCustomHeaders ****** :0
    
  20. sushilLynhill commented on Oct 1, 2021

    @sushilLynhill

    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) 

  21. wirteEable commented on Mar 9, 2022

    @wirteEable

    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)

  22. aungbophyoe commented on Jun 30, 2022

    @aungbophyoe

    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)

  23. Mishgan commented on Feb 17, 2023

    @Mishgan

    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)

  24. sansan-cc commented on Jun 12, 2023

    @sansan-cc

    我同样遇到了这个问题,使用viewpager2+fragment ,在fragment中展示Jzvd player。

    E/MediaMetadataRetrieverJNI: getFrameAtTime: videoFrame is a NULL pointer E/Pinger: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT] pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]. Version: 2.7.1

    有找到解决办法么,我和你使用场景一样

  25. sansan-cc commented on Jun 12, 2023

    @sansan-cc

    Is there a solution?

  26. tahakorkem commented on Jul 5, 2023

    @tahakorkem

    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)

    Adding networkSecurityConfig to manifest has solved this problem for me. See here: https://stackoverflow.com/a/54268640/4191562

  27. chands commented on Mar 3, 2024

    @chands

    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)

  28. chands commented on Mar 3, 2024

    @chands

    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"

  29. added a commit that references this issue on Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions