You are not logged in.

#1 2012-09-20 23:36:12

kenshin421
Member
Registered: 2012-08-07
Posts: 12

[Solved] Ncmpcpp won't start unless connected to internet

I ran mpd as a user and I get this output (not sure if it affects it)
http://pastebin.com/k1HkDSNj

here is my ~/.mpdconf
http://pastebin.com/ht3USrh1

when I run ncmpcpp without being connected to the internet I get this
Couldn't connect to MPD (host = localhost, port = 6600): Failed to resolve host name

ncmpcpp appears if i'm connected. This was the closest thing I found to someone with a similar problem, but it didn't solve it https://bbs.archlinux.org/viewtopic.php?id=110505
Running mpd as a daemon didn' solve it, and if I ran it as a daemon, my music library doesn't appear (is it because I followed the single user configuration?)


Thanks in advance!

Last edited by kenshin421 (2012-09-21 21:54:33)

Offline

#2 2012-09-21 06:26:57

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] Ncmpcpp won't start unless connected to internet

kenshin421 wrote:

I ran mpd as a user and I get this output (not sure if it affects it)
http://pastebin.com/k1HkDSNj

here is my ~/.mpdconf
http://pastebin.com/ht3USrh1

when I run ncmpcpp without being connected to the internet I get this
Couldn't connect to MPD (host = localhost, port = 6600): Failed to resolve host name

ncmpcpp appears if i'm connected. This was the closest thing I found to someone with a similar problem, but it didn't solve it https://bbs.archlinux.org/viewtopic.php?id=110505
Running mpd as a daemon didn' solve it, and if I ran it as a daemon, my music library doesn't appear (is it because I followed the single user configuration?)


Thanks in advance!

change localhost to 127.0.0.1 and it should work.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#3 2012-09-21 07:26:55

kenshin421
Member
Registered: 2012-08-07
Posts: 12

Re: [Solved] Ncmpcpp won't start unless connected to internet

I still get the same error. I changed binds_to_address and I also tried the only localhost in the file (located under audio). I tried using "localhost" and "127.0.0.1" suggested.

Offline

#4 2012-09-21 09:39:01

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: [Solved] Ncmpcpp won't start unless connected to internet

comment your "user" line in mpdconf
bind to address- localhost
  port - 6600
here is my mpdconf for your reference .


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#5 2012-09-21 15:14:03

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] Ncmpcpp won't start unless connected to internet

kenshin421 wrote:

I still get the same error. I changed binds_to_address and I also tried the only localhost in the file (located under audio). I tried using "localhost" and "127.0.0.1" suggested.

you still need to change your ncmpcpp config too....

mpd_host = "127.0.0.1"

And yes, as stated above, comment out the user line, it is wrong in single user mode.


Apart from this. This does seem like a deeper problem...
Whats the output of:

ip addr show

And while we are at it, show your /etc/hosts file too...

Last edited by Rasi (2012-09-21 15:32:28)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#6 2012-09-21 15:57:36

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [Solved] Ncmpcpp won't start unless connected to internet

and as another sidenote, using unix sockets *should* always work, even without any kind of network.

~/.mpdconf

bind_to_address  "/home/.mpd/kenshin421/socket"

.ncmpcpp/config:

mpd_host = "/home/.mpd/kenshin421/socket"

You can have multiple bind_to_address lines in .mpdconf, so just setup both

bind_to_address  "/home/.mpd/kenshin421/socket"
bind_to_address  "127.0.0.1"

Last edited by Rasi (2012-09-21 15:59:24)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#7 2012-09-21 21:54:01

kenshin421
Member
Registered: 2012-08-07
Posts: 12

Re: [Solved] Ncmpcpp won't start unless connected to internet

Ah. Fixing the ncmpcpp config fixed it. I didn't know there was an mpd_host on there. Thanks!

Offline

Board footer

Powered by FluxBB