Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed initial connection #734

Closed
hank opened this issue Jul 5, 2015 · 8 comments
Closed

Failed initial connection #734

hank opened this issue Jul 5, 2015 · 8 comments

Comments

@hank
Copy link

hank commented Jul 5, 2015

07-05 16:56:11.413  24140-24157/com.namelessdev.mpdroid E/MPDConnectionMonoSocket﹕ Command idle failed after 4 attempts.
    java.net.ConnectException: failed to connect to music.home.erik.bit/192.168.1.28 (port 6600) after 10000ms: connect failed: ENETUNREACH (Network is unreachable)
            at libcore.io.IoBridge.connect(IoBridge.java:114)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
            at java.net.Socket.connect(Socket.java:843)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.innerConnect(MPDConnection.java:481)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.isFailureHandled(MPDConnection.java:518)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.handleFailure(MPDConnection.java:444)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:408)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:364)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:841)
     Caused by: libcore.io.ErrnoException: connect failed: ENETUNREACH (Network is unreachable)
            at libcore.io.Posix.connect(Native Method)
            at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
            at libcore.io.IoBridge.connectErrno(IoBridge.java:144)
            at libcore.io.IoBridge.connect(IoBridge.java:112)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
            at java.net.Socket.connect(Socket.java:843)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.innerConnect(MPDConnection.java:481)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.isFailureHandled(MPDConnection.java:518)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.handleFailure(MPDConnection.java:444)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:408)
            at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:364)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:841)
07-05 16:56:11.923  24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.
07-05 16:56:14.603  24140-24158/com.namelessdev.mpdroid E/MPDAsyncWorker﹕ Error while connecting to the server.
    java.io.IOException: Failed initial connection: null
            at org.a0z.mpd.connection.MPDConnection.connect(MPDConnection.java:158)
            at org.a0z.mpd.MPD.connect(MPD.java:527)
            at org.a0z.mpd.MPD.connect(MPD.java:543)
            at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.connect(MPDAsyncWorker.java:98)
            at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.handleMessage(MPDAsyncWorker.java:135)
            at android.os.Handler.dispatchMessage(Handler.java:98)
            at android.os.Looper.loop(Looper.java:136)
            at android.os.HandlerThread.run(HandlerThread.java:61)
07-05 16:56:14.643  24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.
07-05 16:56:19.403  24140-24147/com.namelessdev.mpdroid I/dalvikvm﹕ Jit: resizing JitTable from 4096 to 8192
07-05 16:56:19.423  24140-24158/com.namelessdev.mpdroid E/MPDAsyncWorker﹕ Error while connecting to the server.
    java.io.IOException: Failed initial connection: null
            at org.a0z.mpd.connection.MPDConnection.connect(MPDConnection.java:158)
            at org.a0z.mpd.MPD.connect(MPD.java:527)
            at org.a0z.mpd.MPD.connect(MPD.java:543)
            at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.connect(MPDAsyncWorker.java:98)
            at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.handleMessage(MPDAsyncWorker.java:135)
            at android.os.Handler.dispatchMessage(Handler.java:98)
            at android.os.Looper.loop(Looper.java:136)
            at android.os.HandlerThread.run(HandlerThread.java:61)
07-05 16:56:19.463  24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.
07-05 16:56:19.523  24140-24140/com.namelessdev.mpdroid D/dalvikvm﹕ GC_FOR_ALLOC freed 1753K, 26% free 9719K/13080K, paused 50ms, total 55ms
07-05 16:56:20.223  24140-24158/com.namelessdev.mpdroid E/MPDAsyncWorker﹕ Error while connecting to the server.
    java.io.IOException: Failed initial connection: null
            at org.a0z.mpd.connection.MPDConnection.connect(MPDConnection.java:158)
            at org.a0z.mpd.MPD.connect(MPD.java:527)
            at org.a0z.mpd.MPD.connect(MPD.java:543)
            at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.connect(MPDAsyncWorker.java:98)
            at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.handleMessage(MPDAsyncWorker.java:135)
            at android.os.Handler.dispatchMessage(Handler.java:98)
            at android.os.Looper.loop(Looper.java:136)
            at android.os.HandlerThread.run(HandlerThread.java:61)
07-05 16:56:20.343  24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.

The above shows my attempting to reconnect to the mpd server over and over again with the Try Again button. This happens rather consistently on my Asus Transformer TF101 with Android 4.4.4. After a few minutes I can retry and it comes back, but then the problem repeats a few minutes later. I've built a debug binary from the source here and loaded it, so this is using the current trunk. I'm going to try and make some changes myself to see if I can improve this connectivity issue.

@abarisain
Copy link
Owner

Hmm, I doubt that it is mpdroid's fault though. If you look at the
exception, it really is a native one that says network unreachable
Le 5 juil. 2015 22:59, "hank" notifications@github.com a écrit :

07-05 16:56:11.413 24140-24157/com.namelessdev.mpdroid E/MPDConnectionMonoSocket﹕ Command idle failed after 4 attempts.
java.net.ConnectException: failed to connect to music.home.erik.bit/192.168.1.28 (port 6600) after 10000ms: connect failed: ENETUNREACH (Network is unreachable)
at libcore.io.IoBridge.connect(IoBridge.java:114)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
at java.net.Socket.connect(Socket.java:843)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.innerConnect(MPDConnection.java:481)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.isFailureHandled(MPDConnection.java:518)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.handleFailure(MPDConnection.java:444)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:408)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:364)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: libcore.io.ErrnoException: connect failed: ENETUNREACH (Network is unreachable)
at libcore.io.Posix.connect(Native Method)
at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
at libcore.io.IoBridge.connectErrno(IoBridge.java:144)
at libcore.io.IoBridge.connect(IoBridge.java:112)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
at java.net.Socket.connect(Socket.java:843)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.innerConnect(MPDConnection.java:481)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.isFailureHandled(MPDConnection.java:518)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.handleFailure(MPDConnection.java:444)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:408)
at org.a0z.mpd.connection.MPDConnection$CommandProcessor.call(MPDConnection.java:364)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
07-05 16:56:11.923 24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.
07-05 16:56:14.603 24140-24158/com.namelessdev.mpdroid E/MPDAsyncWorker﹕ Error while connecting to the server.
java.io.IOException: Failed initial connection: null
at org.a0z.mpd.connection.MPDConnection.connect(MPDConnection.java:158)
at org.a0z.mpd.MPD.connect(MPD.java:527)
at org.a0z.mpd.MPD.connect(MPD.java:543)
at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.connect(MPDAsyncWorker.java:98)
at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.handleMessage(MPDAsyncWorker.java:135)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
07-05 16:56:14.643 24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.
07-05 16:56:19.403 24140-24147/com.namelessdev.mpdroid I/dalvikvm﹕ Jit: resizing JitTable from 4096 to 8192
07-05 16:56:19.423 24140-24158/com.namelessdev.mpdroid E/MPDAsyncWorker﹕ Error while connecting to the server.
java.io.IOException: Failed initial connection: null
at org.a0z.mpd.connection.MPDConnection.connect(MPDConnection.java:158)
at org.a0z.mpd.MPD.connect(MPD.java:527)
at org.a0z.mpd.MPD.connect(MPD.java:543)
at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.connect(MPDAsyncWorker.java:98)
at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.handleMessage(MPDAsyncWorker.java:135)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
07-05 16:56:19.463 24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.
07-05 16:56:19.523 24140-24140/com.namelessdev.mpdroid D/dalvikvm﹕ GC_FOR_ALLOC freed 1753K, 26% free 9719K/13080K, paused 50ms, total 55ms
07-05 16:56:20.223 24140-24158/com.namelessdev.mpdroid E/MPDAsyncWorker﹕ Error while connecting to the server.
java.io.IOException: Failed initial connection: null
at org.a0z.mpd.connection.MPDConnection.connect(MPDConnection.java:158)
at org.a0z.mpd.MPD.connect(MPD.java:527)
at org.a0z.mpd.MPD.connect(MPD.java:543)
at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.connect(MPDAsyncWorker.java:98)
at com.namelessdev.mpdroid.helpers.MPDAsyncWorker.handleMessage(MPDAsyncWorker.java:135)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
07-05 16:56:20.343 24140-24158/com.namelessdev.mpdroid D/MPDAsyncWorker﹕ Disconnected.

The above shows my attempting to reconnect to the mpd server over and over
again with the Try Again button. This happens rather consistently on my
Asus Transformer TF101 with Android 4.4.4. After a few minutes I can retry
and it comes back, but then the problem repeats a few minutes later. I've
built a debug binary from the source here and loaded it, so this is using
the current trunk. I'm going to try and make some changes myself to see if
I can improve this connectivity issue.


Reply to this email directly or view it on GitHub
#734.

@avuton
Copy link
Contributor

avuton commented Jul 5, 2015

Also, the develop branch has much better connection code.

@hank
Copy link
Author

hank commented Jul 5, 2015

OK i can try the develop branch. I'm not sure I understand why the changes aren't in trunk. I think the network occasionally drops out on the tablet, but the connection errors persist for minutes after it's come back.

@abarisain
Copy link
Owner

"Trunk" (which is master) is the stable branch.

Le 5 juil. 2015 à 23:10, hank notifications@github.com a écrit :

OK i can try the develop branch. I'm not sure I understand why the changes aren't in trunk. I think the network occasionally drops out on the tablet, but the connection errors persist for minutes after it's come back.


Reply to this email directly or view it on GitHub.

@hank
Copy link
Author

hank commented Jul 5, 2015

Well, I got a pcap, and it tries to connect, but mpd just plain rejects it. I'm using the following mpd:

Music Player Daemon 0.19.10

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2014 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient nfs

Neighbor plugins:
 smbclient upnp

Decoders plugins:
 [mad] mp3 mp2
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [faad] aac
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [pcm]

Output plugins:
 shout null fifo pipe alsa ao oss pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2

Input plugins:
 file alsa archive curl ffmpeg smbclient nfs mms

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud cue embcue

Protocols:
 file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// alsa://

Here's the PCAP. I'm starting to think this is a true authentication failure having to do with mpd, not a network issue.

https://mega.nz/#!hUtCGQgL!ZJuBJGKP7MBz0_6DkpE0asLmpA6LoJNb2JMqSMWIykE

@abarisain
Copy link
Owner

It's possible that in that version mpdroid opens too many connections and floods mpd. After a few minutes, the connextions will hive timeouted

Le 6 juil. 2015 à 00:02, hank notifications@github.com a écrit :

Well, I got a pcap, and it tries to connect, but mpd just plain rejects it. I'm using the following mpd:

Music Player Daemon 0.19.10

Copyright (C) 2003-2007 Warren Dukes warren.dukes@gmail.com
Copyright (C) 2008-2014 Max Kellermann max@duempel.org
This is free software; see the source for copying conditions. There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
simple proxy upnp

Storage plugins:
local smbclient nfs

Neighbor plugins:
smbclient upnp

Decoders plugins:
[mad] mp3 mp2
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[opus] opus ogg oga
[sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
[audiofile] wav au aiff aif
[dsdiff] dff
[dsf] dsf
[faad] aac
[wavpack] wv
[modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
[ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
[pcm]

Output plugins:
shout null fifo pipe alsa ao oss pulse jack httpd recorder

Encoder plugins:
null vorbis opus lame wave flac

Archive plugins:
[bz2] bz2

Input plugins:
file alsa archive curl ffmpeg smbclient nfs mms

Playlist plugins:
extm3u m3u pls xspf asx rss soundcloud cue embcue

Protocols:
file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// alsa://
Here's the PCAP. I'm starting to think this is a true authentication failure having to do with mpd, not a network issue.

https://mega.nz/#!hUtCGQgL!ZJuBJGKP7MBz0_6DkpE0asLmpA6LoJNb2JMqSMWIykE


Reply to this email directly or view it on GitHub.

@hank
Copy link
Author

hank commented Jul 6, 2015

Looked at my mpd log - sure enough, it hit max. I set max_connections to 100 and we'll see if that fixes it.

@hank
Copy link
Author

hank commented Jul 7, 2015

Since making that config change, things have seemed better. I think the app should have a help dialog that tells you to do that if you're having trouble.

@hank hank closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants