Simple DLNA Renderer for Odroid C1+...or not?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Okay, lighttpd intallation successful, no errors.
edit: still errors: warning: directory permissions differ on /var/cache/lighttpd/
filesystem: 755 package: 700


Code:
sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf-original

done


Code:
sudo nano /etc/lighttpd/lighttpd.conf

done

Code:
server.document-root = "/mnt/dsmusic"

mimetype.assign = (
  ".jpg" => "image/jpeg",
  ".png" => "image/png",
 )

done, but...doesn't it has to be "/mnt/MPD" because of Rune's specification in mpd.conf? After switching to RuneAudio there's no mount point "dsmusic" (it was with DietPi).

Code:
sudo systemctl enable lighttpd

done

...reboot.

[*drum-roll*]...no covers. :eek:

Next I did...(instructed by myself, if I'm right)

Result(s):

Code:
sudo systemctl [COLOR="Blue"]status/stop/enabled/start[/COLOR] lighttpd
successively

Result(s):

● lighttpd.service - Lighttpd Web Server
Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Tue 2020-09-22 15:13:46 CEST; 13min ago
Main PID: 284 (code=exited, status=0/SUCCESS)

edit: uninstalled lighttpd

edit#2: repeated the whole process with the same result

Code:
lighttpd.service - Lighttpd Web Server
   Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
 
Last edited:
Same here with v1.4.55-3

Code:
lighttpd.service - Lighttpd Web Server
   Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Tue 2020-09-22 16:29:40 CEST; 10s ago
  Process: 796 ExecStart=/usr/bin/lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 796 (code=exited, status=0/SUCCESS)

PS:I didn't want to sit around and just tried something out ...even it was "pointless". But an error message is a message, too.;)
PPS: If we've messed up too much now, I'll be happy to do it all over again.
 
Gimme a good feeling...RuneAudio fresh from the start. ;)

Dear Linuxfan,

I'm currently busy with spontaneous holiday preparations (going to Venice) and I don't know how much time is left for the project at the moment.

I say thank you very much and if you're willing to help me afterwards it would be fine. Until then, an "out-of-the-box-RuneAudio" is okay for me and I have enough time to think about if it's worth to go on. :)
 
Code:
(code=exited, status=0/SUCCESS)
lighttpd failed to start because of a permissions issue, possibly because RuneAudio runs as root?
I suggest you stick with version 1.4.37 of lighttpd. After installation, change permissions on /var/log/lighttpd
Code:
chmod 755 /var/log/lighttpd
Before going any further, it's worth starting lighttpd to check that it's working -
Code:
systemctl start lighttpd
If you see "code=exited" or "inactive (dead)" then change the permissions further -
Code:
chmod 777 /var/log/lighttpd
then
Code:
systemctl restart lighttpd
If it still doesn't start, the final thing to try is to add this line to /etc/lighttpd/lighttpd.conf
server.username = "root"
so the entire contents would be -
Code:
server.document-root = "/mnt/MPD"

server.username = "root"

mimetype.assign = (
  ".jpg" => "image/jpeg",
  ".png" => "image/png",
 )

Once you see that lighttpd starts successfully, you're ready to enable it at start up -
Code:
sudo systemctl enable lighttpd
And reboot, confident that lighttpd will start!
 
I still have a little time...more taking it. ;) To approach the whole thing more relaxed I've flashed a second mSDHC with RuneAudio for testing purposes.

I don't repeat all the things had to be done, here are only the essential deviations...and the results. ;)

- lighttpd-1.4.37-1-armv7h installation successful but still inactive.
- nginx still active after reboot although disabled

chmod 755 /var/log/lighttpd

There isn't such a directory, only /usr/bin/lighttpd and /usr/lib/lighttpd. I've chosen .../bin/... instead and set

Code:
 chmod 777 /usr/bin/lighttpd

*reboot*

Identical constellation.

linuxfan said:
server.document-root = "/mnt/MPD"

server.username = "root"

mimetype.assign = (
".jpg" => "image/jpeg",
".png" => "image/png",
)

After a quick look into mpd.conf, user there is called "mpd". Did an accordingly customization & reboot...

lighttpd and mpd are active and nginx is disabled!

Next step...MaximumMPD:

- customized and commenting out coverart_ctl.php
- reboot
- configured MaxMPD, restart app..

...still no covers. :xeye:
 
Last edited:
Code:
chmod 755 /var/log/lighttpd
There isn't such a directory
There's something wrong there, because lighttpd-1.4.37-1-armv7h.pkg.tar.xz should definitely create that directory.
I suggest for now to concentrate only on lighttpd - there are ways to diagnose if it's serving cover art, without any involvement of MPD.
First I suggest you create the missing directory - because lighttpd will want to write log files there.
Code:
sudo mkdir /var/log/lighttpd
Now restart lighttpd
Code:
sudo systemctl restart lighttpd

Then on any computer connected to your LAN, launch a web browser and go to the IP address of your Odroid C1. You should see a basic listing of your music directories.
You need to get to this point, before MaximumMPD has any chance of seeing the cover art.

customized and commenting out coverart_ctl.php
Don't bother with this modification - it only affects how the Rune app serves cover art (via nginx) and you're now using a completely separate web server (lighttpd).
 
Yes, that could be useful for nginx configuration - but it appears that the Rune app manages much of that configuration within its own separate configuration file(s), then "manages" how nginx is run ...
so that information would best be used by the RuneAudio developers, so they can better set up their configuration files.

If you search the Rune forum you will see that cover art is a big problem for many users - I think the Rune developers should consider dropping nginx and using lighttpd instead.
 
Okay, it seems Rune is a little idiosyncratic.

linuxfan said:
sudo mkdir /var/log/lighttpd

I did it five times...made directory, checked directory's existence, restart lighttpd, reboot...Rune removed it. So there's no error.log-file, too.

A last countertest: changed lighttpd.conf user back to "root"...lighttpd start failed ("mpd" works)

Last but not least, whatever "we" have done, calling Odroid's IP is "404 error"


===
Edit:
===


Took back all the changes and disabled "lighttpd" and enabled "nginx"
...Rune's still online again.
 
Last edited:
Ah, so Rune OS has a non-persistent /var directory. That's what has been causing so much trouble.
OK, let's set a different location for log files, say /etc/log/lighttpd
Code:
mkdir /etc/log
mkdir /etc/log/lighttpd
Now you must configure lighttpd to use this new location
Code:
sudo nano /etc/lighttpd/lighttpd.conf
insert this line before all the jpeg stuff -
Code:
server.errorlog  = "/etc/log/lighttpd/error.log"
Restart lighttpd
Code:
sudo systemctl restart lighttpd
check that a log has been created
Code:
ls /etc/log/lighttpd

Now try again to browse to your C1's IP address.

Signing off for the night.
 
Done everything.

linuxfan said:
check that a log has been created

No log has been created.

  • reboot - lighttpd task start failed, still no log file
  • removed conf entry server.errorlog = "/etc/log/lighttpd/error.log"
  • reboot - lighttpd task start
  • call C1's IP - 404 error
  • back to nginx/disabled lighttpd - Rune is working

Now...

Code:
sudo shutdown masterkw +2 glass of red wine
 
I reproduced the problem on my desktop computer running an Ubuntu-based Linux.
As it launches, lighttpd looks for /var/log/lighttpd (where a log file will be written upon exit) but if this directory does not exist, lighttpd will fail to launch.
lighttpd also attempts to write a PID file to /var/run and if this directory does not exist, it will also fail to launch.

The problem is that Arch Linux mounts /var/log (or possibly even /var) as a temporary filesystem, which is volatile, so all changes are lost at shutdown/reboot.

I configured lighttpd to write the log file and PID file to somewhere other than /var ... but this is not an elegant solution.
I think the proper solution is here -
Arch Linux ARM • View topic - Problem with lighttpd logs
it's a method of re-creating temporary files/directories at each boot up.

Here's the complete setup, to avoid confusion with earlier posts:
I'm assuming you are logged into RuneOS as "root"

Download and install lighttpd
Code:
wget [url]http://tardis.tiny-vps.com/aarm/packages/l/lighttpd/lighttpd-1.4.37-1-armv7h.pkg.tar.xz[/url]
pacman -U lighttpd-1.4.37-1-armv7h.pkg.tar.xz
Open the lighttpd configuration file in a text editor
Code:
nano /etc/lighttpd/lighttpd.conf
replace all the contents with this -
Code:
server.document-root = "/mnt/MPD"

mimetype.assign = (
  ".jpg" => "image/jpeg",
  ".png" => "image/png",
 )
Now to fix the /var/log directory, first check that Rune has the directory /etc/tmpfiles.d
Code:
ls /etc/tmpfiles.d

If not, stop. I will give you my "ugly" solution instead.
If the directory exists, create a new configuration file with nano
Code:
nano /etc/tmpfiles.d/lighttpd.conf
insert this single line -
Code:
d /var/log/lighttpd 0755 http http - -
Save.
Reboot.
Check that var/log/lighttpd exists
Code:
ls var/log/lighttpd
If so, go ahead and enable lighttpd
Code:
systemctl enable lighttpd

In a web browser go to the C1's IP address. You should see music directories listed.
If so, MaximumMPD should now show cover art.
 
Amendment: there's one more line to include in /etc/lighttpd/lighttpd.conf
Code:
server.document-root = "/mnt/MPD"
[COLOR="Red"]dir-listing.activate = "enable"[/COLOR]

mimetype.assign = (
  ".jpg" => "image/jpeg",
  ".png" => "image/png",
 )
Otherwise when you browse to your C1's IP address you may see 403 - Forbidden
and for the sake of diagnosis we really want to be able to see your directories listed.
 
Okay, all steps done with a fresh Rune install!

listingcej34.jpg


maxmpdh8jg1.png


...but still no covers in MaxMPD :confused:
 
It appears that lighttpd is now working. That's great.
Any MPD client which conforms to MPD specifications should be able to display cover art at this point.

I think all you need to do is change MaximumMPD's HTTP Port value from 8080 to 80

And let me ask a stupid question - your configuration files for both MPD (/etc/mpd.conf) and lighttpd (/etc/lighttpd/lighttpd.conf)
have the same value, right? /mnt/MPD
 
Config files are identical.

If I change port to 80, MaxMPD starts processing the queue.

  1. a number of several thousand entries are displayed, about four times the actual quantity
  2. each directory is repeated several times when read in
  3. with an attached error "album art not found".

If I restart the app all config entries were cleared and status displayed "done".
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.