Closed sync1211 closed 7 years ago
First a word to your additional information: Maybe your PI will lack of power for all this things. To your problem: It seems that no mpd-instance is running and listening on localhost at port 7701.
Please post your logfile.
LOGGING/DEBUGGING If something doesn't work, start this script with the additional parameter debug: ~/src/mumble-ruby-pluginbot/scripts/start.sh debug
And DO NOT run the script as root!
Somehow it can't find the file, when I'am logged in as botmaster:
bash: /home/botmaster/src/mumble-ruby/scripts/start.sh: No such file or directory
I have used root (via sudo su) while installing the bot, does that change anything?
the debug command outputs the following lines:
from /root/src/mumble-ruby-pluginbot/pluginbot.rb:6:in `<main>'
/usr/local/rvm/gems/ruby-2.1.1@bots/gems/ffi-1.9.10/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library 'libcelt0.so': libcelt0.so: cannot open shared object file: No such file or directory (LoadError)
from /usr/local/rvm/gems/ruby-2.1.1@bots/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `map'
from /usr/local/rvm/gems/ruby-2.1.1@bots/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `ffi_lib'
from /usr/local/rvm/gems/ruby-2.1.1@bots/gems/celt-ruby-0.0.1/lib/celt-ruby.rb:9:in `<module:Celt>'
from /usr/local/rvm/gems/ruby-2.1.1@bots/gems/celt-ruby-0.0.1/lib/celt-ruby.rb:6:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /usr/local/rvm/gems/ruby-2.1.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby.rb:2:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /root/src/mumble-ruby-pluginbot/pluginbot.rb:6:in `<main>'
Do you think reinstalling the bot as botmaster without root would be worth trying?
Yes, install it as user new. Please follow Natenoms guide, it is well tested and works. ;)
Ok I've reinstalled everything and now it connects to the server, but immediatly disconnects. The debug command outputs the following lines:
[killduckthread] can't kill because wrong argument type nil (expected VM/thread)
Plugin ./plugins/version.rb loaded.
Plugin ./plugins/youtube.rb loaded.
Plugin ./plugins/null.rb loaded.
Plugin ./plugins/mpd.rb loaded.
Plugin ./plugins/control.rb loaded.
Plugin ./plugins/radiostream.rb loaded.
Plugin ./plugins/ektoplazm.rb loaded.
Plugin ./plugins/soundcloud.rb loaded.
Plugin ./plugins/bandcamp.rb loaded.
Plugin ./plugins/messages.rb loaded.
Config loaded!
parse extra config
Own Config loading and overwriting default settings!
pluginbot is starting...
start
/home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/audio_player.rb:53:in `initialize': No such file or directory @ rb_sysopen - /home/botmaster/mpd1/mpd.fifo (Errno::ENOENT)
from /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/audio_player.rb:53:in `open'
from /home/botmaster/.rvm/gems/ruby-2.2.1@bots/gems/mumble-ruby-1.1.2/lib/mumble-ruby/audio_player.rb:53:in `stream_named_pipe'
from /home/botmaster/src/mumble-ruby-pluginbot/pluginbot.rb:217:in `mumble_start'
from /home/botmaster/src/mumble-ruby-pluginbot/pluginbot.rb:565:in `block in <main>'
from /home/botmaster/src/mumble-ruby-pluginbot/pluginbot.rb:560:in `loop'
from /home/botmaster/src/mumble-ruby-pluginbot/pluginbot.rb:560:in `<main>'
Connecting to the server is still ongoing.
connected
[killduckthread] can't kill because wrong argument type nil (expected VM/thread)
Don't miss step 9...
9 Set up MPD (Music Player Daemon) [https://wiki.natenom.com/w/Installation_of_mumble-ruby-pluginbot]
I've now redone step 9 (and even reinstalled mpd), but nothing changed. The debug log still outputs the same error.
Could it be a problem that mpd has been installed as root and the user botmaster has no root access (=not being included in the sudoers file)?
If you follow the installation instructions you install a "local" mpd for user botmaster and you do NOT use the systems mpd.
BTW: For the installation howto to work you must follow all steps and not only choose some of them and hope that it works; it won't.
So far I've only skipped the 'On Arch Linux only' steps in the tutorial.
As for the mpd: I noticed that when I'm executing rvm use @bots
in ~/src/mumble-ruby/ it says that ruby-2.1.1 isn't installed. But as far as I know ruby should be installed (I've executed rvm install ruby --latest
).
Also there is a mpd installed by botmaster (ruby-mpd) and one installed by apt-get (mpd) on my raspberry PI.
please post the output of mpd ~/mpd1/mpd.conf (if there is any)
the output of ps aux | grep mpd
and the content of ~/mpd1/mpd.conf
All commands as user botmaster.
Output of mpd ~/mpd1/mpd.conf
:
Failed to bind to '127.0.0.1:7701': Cannot assign requested address
Output of ps aux | grep mpd
:
1008 23569 0.0 0.2 2020 1208 pts/1 S+ 19:06 0:00 grep --color=auto mpd
Output of ~/mpd1.mpd.conf
:
bash: /home/botmaster/mpd1.mpd.conf: No such file or directory
location of mpd.conf should be in:
/home/botmaster/mpd1/mpd.conf
location of mpd.conf should be in:
/home/botmaster/mpd1/mpd.conf
As far as I know it is located there in my system. The ~ equals /home/botmaster/.
I've read your first post more careful. Do you use the https://www.raspberrypi.org/products/model-b/ or https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ ?
The first one has not enough power to drive a bot without maximum overclocking an optimized kernel for the bot and NO OTHER things running on it. In this setting it is still not able to play a song without stuttering. In short: This device has not enough power.
For the second there is a image for download aviable. I recommend to update the bot after first start as well you should update the distro itself. The image is basing on a minimal raspian only extended for the bot functionality, there is no other ballast on it.
To your issue: mpd did not start for a unknown reason to me. Maybe the mpd documentation or google could help. Search for mpd, Cannot assign requested address
I'm using the model B with a bit of overclocking (800MHz). So, does that mean, that the bot has no chance of running on my Raspberry PI? (In that case it isn't that bad, since I'm already planning on upgrading to a V2 Type B.)
Thank you very much for all your support and time!
As the title says my bot cannot connect to the mumble-server (which is hosted on the same device). After starting the bot it tells me:
Additional information: -The server is password-protected, but the bot should have the right password. -I'm using an raspberry pi type B with ~16 GB. -The Pi is running a LAN > Wifi bridge.
Thank you in advance!