matthieugrieger / mumbledj

A Mumble bot that plays audio fetched from various media sites.
MIT License
170 stars 59 forks source link

Pine64 config file and command arguments ignored. #171

Open ca21a7b567 opened 8 years ago

ca21a7b567 commented 8 years ago

Before submitting this issue, please acknowledge that you have done the following:


What type of issue is this?


Log output of bot with --debug flag (likely only for bug reports):

INFO[0000] Checking for duplicate aliases...
INFO[0000] Performing startup checks...
INFO[0000] Checking for availability of services...      num_services=3
WARN[0000] A startup check discovered an issue. The service will be disabled.  error=No YouTube API key has been provided service=YouTube
WARN[0000] A startup check discovered an issue. The service will be disabled.  error=No SoundCloud API key has been provided service=SoundCloud
INFO[0000] Checking YouTubeDL installation...
INFO[0001] Checking ffmpeg installation...
INFO[0001] Checking aria2c installation...
INFO[0001] Checking openssl installation...
INFO[0001] Attempting connection to server...            address=127.0.0.1 port=64738
FATA[0005] An error occurred while connecting to the server.  error=x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs

Description of your issue:

MumbleDJ version v3.1.0

I am running MumbleDJ on a Pine64. I have compiled the program and the issue I am encountering is when I run ./mumbledj in the go-apps folder, it ignores the config.yaml even though it will create a new one when it doesn't exit in the ~/.config/mumbledj/config.yaml. Also, any command line arguments are also ignored (except for --version it seems). Typing ./mumbledj --server 123.123.123.123 (or anything) still has mumbledj attempting to connect to 127.0.0.1. I have also set an API key in the config file, I have also tried to rum mumbledj as sudo and have chmod 777 my config file.

matthieugrieger commented 8 years ago

How did you install MumbleDJ? Also, what distro are you running? I haven't come across these issues.

ca21a7b567 commented 8 years ago

I am running Ubuntu and I installed MumbleDJ via Go. "Go Run" wasn't working, so I used "Go Build" instead.

matthieugrieger commented 8 years ago

Is $HOME defined in your environment variables?

ca21a7b567 commented 8 years ago

yessir:

... MAIL=/var/mail/ubuntu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/home/ubuntu/.config/mumbledj SHLVL=1 HOME=/home/ubuntu LOGNAME=ubuntu SSH_CONNECTION=192.168.0.115 6459 192.168.0.102 22 LESSOPEN=| /usr/bin/lesspipe %s XDG_RUNTIMEDIR=/run/user/1000 LESSCLOSE=/usr/bin/lesspipe %s %s =/usr/bin/printenv ...

If there is no config.yaml, it creates one in the proper location, it just never reads it nor does it take command line arguments. I tried running it from the build folder as well as the /bin folder

ca21a7b567 commented 8 years ago

Okay, the quick and dirty solution is to just compile it in Docker and run it from there.

matthieugrieger commented 8 years ago

Strange... I'll have to take a look at it.

What happens if you provide the filepath to config.yaml using the --config flag?

ca21a7b567 commented 8 years ago

Same thing, it ignores the command.

./mumbledj --config ~/.config/mumbledj/config.yaml INFO[0000] Checking for duplicate aliases... INFO[0000] Performing startup checks... INFO[0000] Checking for availability of services... num_services=3 WARN[0000] A startup check discovered an issue. The service will be disabled. error=No YouTube API key has been provided service=YouTube WARN[0000] A startup check discovered an issue. The service will be disabled. error=No SoundCloud API key has been provided service=SoundCloud INFO[0000] Checking YouTubeDL installation... INFO[0001] Checking ffmpeg installation... INFO[0001] Checking aria2c installation... INFO[0001] Checking openssl installation... INFO[0001] Attempting connection to server... address=127.0.0.1 port=64738 FATA[0020] An error occurred while connecting to the server. error=x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs

matthieugrieger commented 8 years ago

Hmm. I'll have to see if I can replicate this somehow, but I've never experienced the problem. The only difference between your setup and mine is that you're using an ARM system, but I'd be surprised if that had anything to do with it.

dkayser commented 7 years ago

I had Mumbledj running for a long time, now moved to a new server and wanted to install from scratch. Running into the same problem. My version is 3.2.1, running with Go 1.8 and Debian Jessie using avconf. Also installed via "go get ..." which is one difference to my old setup, which I had installed from sources.

The old version where everything is working as usual is 3.1.4. on Arch, with ffmpeg and Go 1.7.3.

Config file in place, gets ignored even when specified with -c. Permissions on the config are the same between the two setups. Content as well.

Should I downgrade to 3.1.4 on Debian? I kind of like the new features, but I got stuck and I just do not know what's up. Here the output with -d enabled:

x@dev:~/.go/bin$ mumbledj -c /home/x/.config/mumbledj/config.yaml -d

WARN[0000] An error occurred while reading the configuration file. Using default configuration...  error=While parsing config: yaml: line 12: did not find expected key file=/home/x/.config/mumbledj/config.yaml

INFO[0000] Performing startup checks...

INFO[0000] Checking for availability of services...      num_services=3

WARN[0000] A startup check discovered an issue. The service will be disabled.  error=No YouTube API key has been provided service=YouTube

WARN[0000] A startup check discovered an issue. The service will be disabled.  error=No SoundCloud API key has been provided service=SoundCloud

INFO[0000] Checking YouTubeDL installation...

INFO[0000] Checking ffmpeg installation...

FATA[0000] ffmpeg is either not installed or is not discoverable in $PATH. If you would like to use avconv instead, change the defaults.player_command value in the configuration file.

Other go apps work well.