mierak / rmpc

A configurable, terminal based Media Player Client with album art support via various terminal image protocols
https://mierak.github.io/rmpc/
BSD 3-Clause "New" or "Revised" License
130 stars 6 forks source link

Connection refused (os error 111) #66

Closed jgregoire closed 1 month ago

jgregoire commented 1 month ago

I have installed rmpc on two machines, using the same config, with commands:

~ $ rustup update
~ $ cargo install rmpc

Version:

~ $ rmpc version
rmpc VERGEN_IDEMPOTENT_OUTPUT

Not very helpful, that. :)

~ $ mpd --version
Music Player Daemon 0.23.15 (v0.23.15)

On one machine, everything works. The other gives this error: Error: Message: 'Failed to connect to mpd', inner error: 'Generic("Connection refused (os error 111)")'

$MPD_HOST and $MPD_PORT are defined on both machines. (The server is a third machine on the network.)

On the machine where rmpc fails to launch, ncmpcpp connects to the server OK.

rmpc config: https://github.com/jgregoire/dotfiles/commit/a62eba54a705d50311b89ad4d17fd7b6a60b2d61

[edit] ~ $ rmpc -a [HOST]:[PORT] also fails with the same error.

~ $ rmpc debuginfo
rmpc VERGEN_IDEMPOTENT_OUTPUT

Config path          /home/james/.config/rmpc/config.ron
Theme path           None

MPD:
Address              IpAndPort("127.0.0.1:6600")

Youtube playback:
Cache dir            None
ffmpeg               installed       ffmpeg version n7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
ffprobe              installed       ffprobe version n7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
yt-dlp               not installed   Version not available
python3              installed       Python 3.12.6       
python-mutagen       installed       PRESENT             

Image protocol:
Requested            Auto
Resolved             Unsupported
TMUX                 false
ueberzugpp           not installed   Version not available

I tried adding the server address to the config, but the above command still reports 127.0.0.1, and I still get the error.

jgregoire commented 1 month ago

Ah, I lied. On the machine where it works (Arch Linux), I installed the rmpc-git package from AUR.

I removed the cargo-installed package, installed rmpc-git from AUR, and now it works on the second machine, too.

~ $ rmpc version
rmpc v0.4.0-16-g3e4951b

Yeah, that's better.

mierak commented 1 month ago

Hey, glad you worked it out. Support for the MPD env vars was added after 0.4.0 was released and thus is currently only available in the -git as you found out. Versioning the docs so this is more obvious is on my todo list.

Not very helpful, that. :)

Right, I did not realize that cargo builds without git, will fix that, thanks!

jgregoire commented 1 month ago

Thanks! Great program. I love having album art. Worked OOTB on Kitty.