mpdPup - Simplified MPD Music Server/Jukebox - v0.9.3

For talk and support relating specifically to Puppy derivatives
Message
Author
Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

#241 Post by Magellan »

ldolse wrote:Hi Kocozze, are you definitely running 0.9.3 or 0.9.3a? The older version 0.9.2 had an issue on some platforms which didn't like launching mpd with 'nice'. I removed this logic in 0.9.3.


For other interested parties, I did some experimenting with MPD's buffer today. It seems to me that there may be a bug which prevents buffers larger than ~120,000 KB to be specified, if I specify 130000 and above I get an MPD error.
Anyway 120,000 KB is around 13-14 minutes of CD quality audio. I set a buffer fill of 2% - I personally don't like 100% because this breaks Internet Radio and makes it slow to switch between albums/tracks.

Here's what I discovered:
  • MPD only keeps the current and next track in the buffer
  • First and Second track are buffered on initial playback
  • Next track is buffered at the very beginning of each track
The above was based on interpreting network/disk activity graphs on my NAS - to confirm this 100% I unplugged the network from the MPD machine after buffering for track 4 was completed (but before track 3 had finished playback). MPD completed playing track 3 and moved along to track 4 with no problem. I restored the network around halfway through track 4 and MPD picked right up and immediately buffered track 5.

I also tested with the buffer fill set to 100% - the biggest difference in that case was that you would need to wait until the first track (and possibly the second) was fully loaded into memory before playback actually began. The graphs more or less looked the same.
I tried the same, increased the buffer, but I can't hear any sonic change - not worse, but not better either.

kocozze
Posts: 36
Joined: Wed 07 Nov 2012, 19:49

#242 Post by kocozze »

Idolse wrote:
I think I know the cause - kocozze, when you said you installed to the hard drive, do you know what type of install you did? I'm wondering if you did a full install instead of a Frugal install. If you did this you're not running in a read-only RAM environment, you're running in a full Linux install.

Please type this command at the CLI:
Code:
grep 'PUPMODE=' /etc/rc.d/PUPSTATE
Let me know what it says. It should say 13, but if you did a full install it would give you a different number. My recommendation would be to install frugally, but you could also edit the startup script:
Code:
nano /etc/init.d/20.mpd
Change the number 13 to whatever number was displayed with the first command.

Kocozze: ok, I've installed in full mode, the PUPSTATE say 2, not 13. I've changed the number in 20.mpd and now it works fine!!! :D
A last question: you say that the error warnings at the restart of mpdpup after shutdown with power button is normal, and i believe this, but at the end of the rows of warning messages mpdpup ask me every time to reboot the system (pratically i must restart twice!). Is normal still this? :oops:

lugili
Posts: 16
Joined: Sun 24 Feb 2013, 21:07

Access Synology NAS

#243 Post by lugili »

Hi all,
I have been roaming around a lot here but had no time to try mpdpup until now. Great job!

Although I do run into a problem. My Synology NAS can only easily be accessed with SSH (I found this http://www.druhosting.com/content/synol ... root-users) if you login as root. When I try to fill in user = root in the setup wizard and then the password, the mpd server seems not to be able to connect. Also existing usernames on the NAS with passwords do not seem to work (as expected reading the link). If I leave the user name empty and just fill in a password (assuming this is the right way to enter root) the wizard seems to take the password as the user name- which also does not work.

I can ssh the NAS from my ubuntu computer as root without problem.

Anyone encountered this problem, or, what am I missing? What does the wizard exactly do with the information that I enter regarding user/password?

Hope this is understandable.

Thanks for help.
lugili

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

Re: Access Synology NAS

#244 Post by Magellan »

lugili wrote:Hi all,
I have been roaming around a lot here but had no time to try mpdpup until now. Great job!

Although I do run into a problem. My Synology NAS can only easily be accessed with SSH (I found this http://www.druhosting.com/content/synol ... root-users) if you login as root. When I try to fill in user = root in the setup wizard and then the password, the mpd server seems not to be able to connect. Also existing usernames on the NAS with passwords do not seem to work (as expected reading the link). If I leave the user name empty and just fill in a password (assuming this is the right way to enter root) the wizard seems to take the password as the user name- which also does not work.

I can ssh the NAS from my ubuntu computer as root without problem.

Anyone encountered this problem, or, what am I missing? What does the wizard exactly do with the information that I enter regarding user/password?

Hope this is understandable.

Thanks for help.
lugili
I ran into the same problem with my Synology NAS. I was going to switch from one NAS to the Synology NAS. The other NAS, a LaCie, never came up with the same problem. I gave it up for the moment and stayed with the LaCie, but I would be ahppy for an explanation what this is about.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#245 Post by ldolse »

kocozze wrote:A last question: you say that the error warnings at the restart of mpdpup after shutdown with power button is normal, and i believe this, but at the end of the rows of warning messages mpdpup ask me every time to reboot the system (pratically i must restart twice!). Is normal still this? :oops:
You're running in an unsupported mode (full install), nothing you are doing is normal :D . That said, it's to be expected in your case. Because you are running a full install those error messages are completely legitimate (and quite accurate) - every time you power off abruptly or use the reset button you are corrupting your filesystem, so it needs to be repaired.

Not trying to blame you, my fault for not documenting your installation method, and I really do need to update the stock Puppy install wizards to prevent people from selecting this option. Anyway my recommendation would be to reinstall using frugal instead when you get a chance, but for now just try to poweroff cleanly from the CLI with the poweroff or reboot command.
Last edited by ldolse on Mon 25 Feb 2013, 05:22, edited 4 times in total.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

Re: Access Synology NAS

#246 Post by ldolse »

lugili wrote:Although I do run into a problem. My Synology NAS can only easily be accessed with SSH (I found this http://www.druhosting.com/content/synol ... root-users) if you login as root. When I try to fill in user = root in the setup wizard and then the password, the mpd server seems not to be able to connect. Also existing usernames on the NAS with passwords do not seem to work (as expected reading the link). If I leave the user name empty and just fill in a password (assuming this is the right way to enter root) the wizard seems to take the password as the user name- which also does not work.
Hi Lugili, the problem is Synology never meant for you to use the root user for file sharing. You need to go into the Synology Web UI, clck 'Control panel', then click 'User'. Create a new User, and when you go through the prompts make sure they have access to the share with the music library. Then put this user/pass in the wizard.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#247 Post by ldolse »

Magellan wrote:I tried the same, increased the buffer, but I can't hear any sonic change - not worse, but not better either.
I'm not sure if I heard a change or not either, at times I thought I might have but it wasn't my main goal. I was more interested in what was technically happening. I was also testing some of the other tuning I'm thinking of for the next release, so a lot of variables in play.

Still need to integrate Pavel Hofman's A/B scripts with a wizard based UI so people can do some automated A/B testing for more quantitative comparisons.

kocozze
Posts: 36
Joined: Wed 07 Nov 2012, 19:49

#248 Post by kocozze »

ldolse wrote:
kocozze wrote:A last question: you say that the error warnings at the restart of mpdpup after shutdown with power button is normal, and i believe this, but at the end of the rows of warning messages mpdpup ask me every time to reboot the system (pratically i must restart twice!). Is normal still this? :oops:
You're running in an unsupported mode (full install), nothing you are doing is normal :D . That said, it's to be expected in your case. Because you are running a full install those error messages are completely legitimate (and quite accurate) - every time you power off abruptly or use the reset button you are corrupting your filesystem, so it needs to be repaired.

Not trying to blame you, my fault for not documenting your installation method, and I really do need to update the stock Puppy install wizards to prevent people from selecting this option. Anyway my recommendation would be to reinstall using frugal instead when you get a chance, but for now just try to poweroff cleanly from the CLI with the poweroff or reboot command.
You're right Idolse!!! It's better for me to do a frugal installation (I proceed to this), there's no reason for not doing so!
Really thanks for your patience :D !

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

Re: Access Synology NAS

#249 Post by Magellan »

ldolse wrote:
lugili wrote:Although I do run into a problem. My Synology NAS can only easily be accessed with SSH (I found this http://www.druhosting.com/content/synol ... root-users) if you login as root. When I try to fill in user = root in the setup wizard and then the password, the mpd server seems not to be able to connect. Also existing usernames on the NAS with passwords do not seem to work (as expected reading the link). If I leave the user name empty and just fill in a password (assuming this is the right way to enter root) the wizard seems to take the password as the user name- which also does not work.
Hi Lugili, the problem is Synology never meant for you to use the root user for file sharing. You need to go into the Synology Web UI, clck 'Control panel', then click 'User'. Create a new User, and when you go through the prompts make sure they have access to the share with the music library. Then put this user/pass in the wizard.
If I need to change the password for reaching the NAS, how do I set the new password in the MPD-wizard? Is it att all possible?
I run a normal user account on the Synology NAS, and I keep my music in this account, but I can´t reach it, despite it is not a root account.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

Re: Access Synology NAS

#250 Post by ldolse »

If I need to change the password for reaching the NAS, how do I set the new password in the MPD-wizard? Is it att all possible?
I run a normal user account on the Synology NAS, and I keep my music in this account, but I can´t reach it, despite it is not a root account.
Just run 'mpdwizard' from the CLI at any time to make changes, including the NAS password. To be clear though, if you use the Synology Web UI it doesn't treat its' accounts like standard Linux user accounts. From the Web UI you use Synology file managment software to create your various shares and folders. You then use the user manager to create users, and just choose which folders that user has access to. So the music shouldn't ever be 'inside' a user account (unless you're completely bypassing Synology's built in methods). Are you running the latest DSM software? I own a Synology NAS as well, so I'm speaking from experience.

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

Re: Access Synology NAS

#251 Post by Magellan »

ldolse wrote:
If I need to change the password for reaching the NAS, how do I set the new password in the MPD-wizard? Is it att all possible?
I run a normal user account on the Synology NAS, and I keep my music in this account, but I can´t reach it, despite it is not a root account.
Just run 'mpdwizard' from the CLI at any time to make changes, including the NAS password. To be clear though, if you use the Synology Web UI it doesn't treat its' accounts like standard Linux user accounts. From the Web UI you use Synology file managment software to create your various shares and folders. You then use the user manager to create users, and just choose which folders that user has access to. So the music shouldn't ever be 'inside' a user account (unless you're completely bypassing Synology's built in methods). Are you running the latest DSM software? I own a Synology NAS as well, so I'm speaking from experience.
I do run the MPD-wizard from the CLI. The first time i ran the wizard, after - I think it was - I had set the IP adress, share and directory for the NAS, I was directed to a setting where I could set the username and password for the NAS. Problem is I can´t reach this setting again when I launch the MPD-wizard. After the IP, share and directory there is no setting for password and username again, and I don´t know how to find it. Can you follow me - what I mean?

Then I can´t reach the NAS from the CLI either - it just says the IP adress can´t be reached. And I have set upp all the accounts and permissions needed in the NAS. This is really bugging me, cause I don´t have a clue why. By the way, I can´t reach the NAS from the SSH Putty client from my windows Laptop either.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#252 Post by ldolse »

It sounds like you're running into some sort of bug. When I relaunch mpdwizard I get the following:
  • - type mpdwizard
    - select storage with the arrow key, press enter
    - Press Enter to confirm the network selection
    - Validate the server IP, share name, and directory are correct, press enter
    - username password prompt comes up, enter them in, press enter
    - Review the settings, enter to confirm
    - enter again to test, etc
It's possible you're hitting some really weird bug based on some bad input you made before, if that's the case you can remove the existing wizard settings and start from scratch by typing this command before starting the wizard:

Code: Select all

rm /etc/mpdwizard.conf
Actually before you delete the file, if you confirm that it's not working per the steps above, type 'more /etc/mpdwizard.conf' and paste the output here (your password will be in the clear, you may want to edit it first). BTW, are you using any really weird characters in your username or password?

If you figure out what you did wrong previously let me know, users are always finding ways to break the scripts I never anticipated, and I try to make the scripts smarter whenever possible.

You can also directly edit the network share by editing fstab:

Code: Select all

nano /etc/fstab[code]But the wizard will re-write portions of that file if you run it again.

It's to be expected you can't directly access the NAS from mpdPup, there is no ssh/telnet client software included to save space.  CIFS/SMB is the only way to reach it.  The reason you can't access via putty might be because you haven't enabled SSH access on the Synology - I recall that they only allow Web by default.

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

#253 Post by Magellan »

ldolse wrote:It sounds like you're running into some sort of bug. When I relaunch mpdwizard I get the following:
  • - type mpdwizard
    - select storage with the arrow key, press enter
    - Press Enter to confirm the network selection
    - Validate the server IP, share name, and directory are correct, press enter
    - username password prompt comes up, enter them in, press enter
    - Review the settings, enter to confirm
    - enter again to test, etc
It's possible you're hitting some really weird bug based on some bad input you made before, if that's the case you can remove the existing wizard settings and start from scratch by typing this command before starting the wizard:

Code: Select all

rm /etc/mpdwizard.conf
Actually before you delete the file, if you confirm that it's not working per the steps above, type 'more /etc/mpdwizard.conf' and paste the output here (your password will be in the clear, you may want to edit it first). BTW, are you using any really weird characters in your username or password?

If you figure out what you did wrong previously let me know, users are always finding ways to break the scripts I never anticipated, and I try to make the scripts smarter whenever possible.

You can also directly edit the network share by editing fstab:

Code: Select all

nano /etc/fstab[code]But the wizard will re-write portions of that file if you run it again.

It's to be expected you can't directly access the NAS from mpdPup, there is no ssh/telnet client software included to save space.  CIFS/SMB is the only way to reach it.  The reason you can't access via putty might be because you haven't enabled SSH access on the Synology - I recall that they only allow Web by default.[/quote]

I will try to put up the config file here when I get home later today.

Yes, ha ha... I use some weird Swedish letters in my username and passwords. Like Ä Å Ö. I can try and change them. But it must be a bug then, cause I follow exactly the path mentioned. But the password setting never show up again after the initial setting.

I have set up an user account on the NAS, just for music, and I have tried to reach this account from "within" MPD with the CLI. Don´t work. 

I just have noticed I can´t even log in as root over SSH from my windows computer, so there might be something fundamental going wrong here. I have enabled SSH, so that can´t be the problem. Hmm.. I updated the DSM software just a couple of weeks ago.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#254 Post by ldolse »

It's almost certainly the non-ascii characters causing it to fail. I'll test that when I get a chance to look at that code again, I'll bet you'll be fine if you just use ascii characters.

lugili
Posts: 16
Joined: Sun 24 Feb 2013, 21:07

#255 Post by lugili »

Hi Lugili, the problem is Synology never meant for you to use the root user for file sharing. You need to go into the Synology Web UI, clck 'Control panel', then click 'User'. Create a new User, and when you go through the prompts make sure they have access to the share with the music library. Then put this user/pass in the wizard.
For some weird reason I could not ssh into my synology nas despite the user setup like you described.
I found instructions on the internet on what to do on the Synology NAS:

edit /etc/passwd and replace /sbin/nologin with /bin/ash for users you want allow to SSH into your NAS.

Worked for me, now I can ssh into the NAS with all users. Weird ...

Another question regarding the setup: the path on my nas to the musicfolders are /volume1/musicserver/mpd_music. What do I need to enter as share?

Thanks all for your help.

lugili
Posts: 16
Joined: Sun 24 Feb 2013, 21:07

#256 Post by lugili »

Another question regarding the setup: the path on my nas to the musicfolders are /volume1/musicserver/mpd_music. What do I need to enter as share?
I think I was able to do it. Plays music now ... sounds better than my voyage mpd setup that I used so far. Atom D510 board with SOTM usb card and linear power supply into a dcs debussy.

Will listen and tweak a bit and report back in a few days.
Thanks again Idolse, great job. And all the others for support.

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

#257 Post by Magellan »

I don´t think this has anthing to do with wierd letters. Fact is, I realise now, that I never get to the username/password section, because I am recected at the previous stage, After the validate server IP, share name and directory, I get the message the IP adress can´t be reached.

- Validate the server IP, share name, and directory are correct, press enter
- username password prompt comes up, enter them in, press enter

This is making me MAD. People passing on the street outside my house have to be careful because there will soon be a NAS coming flying out from my window. :evil:

Magellan
Posts: 17
Joined: Tue 06 Mar 2012, 09:53

#258 Post by Magellan »

lugili wrote:
Hi Lugili, the problem is Synology never meant for you to use the root user for file sharing. You need to go into the Synology Web UI, clck 'Control panel', then click 'User'. Create a new User, and when you go through the prompts make sure they have access to the share with the music library. Then put this user/pass in the wizard.
For some weird reason I could not ssh into my synology nas despite the user setup like you described.
I found instructions on the internet on what to do on the Synology NAS:

edit /etc/passwd and replace /sbin/nologin with /bin/ash for users you want allow to SSH into your NAS.

Worked for me, now I can ssh into the NAS with all users. Weird ...

Another question regarding the setup: the path on my nas to the musicfolders are /volume1/musicserver/mpd_music. What do I need to enter as share?

Thanks all for your help.
I guesss you first logged in with SSH as root and changed the /etc/passwd ? My problem is I can´t even log in as root.

YES!!!! After several hours of trial and error and confusion I succeded to make it work at last. I think it was a combination of problems. I had in the end great help of both lugili and Idolse. I changed the passwords to only ascii, and then I could logon to the NAS as root over SSH. I could still not logon as user however, but after editing the etc/passwd I could logon as user also. It took me a while however, until I understod the editor on the nas was not vim or nano but vi. Then I reconfigured the MPD-wizard, and now the NAS did not reject MPD anymoore and I was transfered to the user/password settings. The rest was just easy going. Now beautiful music is streaming from my speakers. But now I must sleep. Thanks for helpful clues.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#259 Post by ldolse »

Glad you were both able to get your Synology connected and have got music now! I think you'll find it easier to administer if you stick with their Web UI - all the required configuration can be done from there. SSH is more for hacking on the system.

lugili
Posts: 16
Joined: Sun 24 Feb 2013, 21:07

#260 Post by lugili »

Glad you were both able to get your Synology connected and have got music now! I think you'll find it easier to administer if you stick with their Web UI - all the required configuration can be done from there. SSH is more for hacking on the system.
Fully agree with you there, but I was not able to do this with DSM 3.2 UI on the Synology. I am quite sure I did everything right there. Maybe a Synology bug ... or maybe I should have restarted the NAS at some point in time.

But glad it is all fine now :D

Post Reply