Last week I finally had some courage to update my Macbook to Mojave. The latest version of the MacOS family. The only thing I was really looking forward was the security updates and Dark Mode. Aside from that, it was unappealing to me.
Today, I downloaded some videos and wanted to fire up my minidlna local install only to find out that service was not working. None of my devices was able to see the DLNA service so I couldn’t stream to any TV.
I started investigating. I did the basics, tried to restart, and services were launching fine.
➜ ~ brew services restart minidlna Stopping `minidlna`... (might take a while) ==> Successfully stopped `minidlna` (label: homebrew.mxcl.minidlna) ==> Successfully started `minidlna` (label: homebrew.mxcl.minidlna)
Since everything seem fine, and still I couldn’t see the DLNA media. I went to the logs.
➜ ~ tail -100 /usr/local/var/log/minidlnad.log
I saw some errors which caught my attention. So I decided to remove it completely.
➜ ~ brew remove minidlna xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Uninstalling /usr/local/Cellar/minidlna/1.2.1_1... (11 files, 307.6KB)
And I saw the xcrun error, invalid active developer path? After quickly reviewing in Google this was due to the X Code Command Line tools that needed to be installed. It seems when Mojave was installed, the old X Code Command line tools were removed. Ok now we are getting somewhere. Now I would install that package. Again I went to my terminal and:
➜ ~ xcode-select --install
The package started downloading. It was about 130MB. Once it was installed I went and installed minidlna again.
➜ ~ brew install minidlna ==> Installing dependencies for minidlna: ffmpeg ==> Installing minidlna dependency: ffmpeg ==> Downloading https://homebrew.bintray.com/bottles/ffmpeg-4.1.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring ffmpeg-4.1.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/ffmpeg/4.1: 282 files, 55.4MB ==> Installing minidlna ==> Downloading https://homebrew.bintray.com/bottles/minidlna-1.2.1_1.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring minidlna-1.2.1_1.mojave.bottle.tar.gz ==> Caveats Simple single-user configuration: mkdir -p ~/.config/minidlna cp /usr/local/opt/minidlna/share/minidlna/minidlna.conf ~/.config/minidlna/minidlna.conf ln -s YOUR_MEDIA_DIR ~/.config/minidlna/media minidlnad -f ~/.config/minidlna/minidlna.conf -P ~/.config/minidlna/minidlna.pid To have launchd start minidlna now and restart at login: brew services start minidlna Or, if you don't want/need a background service you can just run: minidlna ==> Summary 🍺 /usr/local/Cellar/minidlna/1.2.1_1: 11 files, 307.9KB ==> Caveats ==> minidlna Simple single-user configuration: mkdir -p ~/.config/minidlna cp /usr/local/opt/minidlna/share/minidlna/minidlna.conf ~/.config/minidlna/minidlna.conf ln -s YOUR_MEDIA_DIR ~/.config/minidlna/media minidlnad -f ~/.config/minidlna/minidlna.conf -P ~/.config/minidlna/minidlna.pid To have launchd start minidlna now and restart at login: brew services start minidlna Or, if you don't want/need a background service you can just run: minidlna
Once it was re-installed. I tried to launch it once more.
➜ minidlna brew services start minidlna ==> Successfully started `minidlna` (label: homebrew.mxcl.minidlna)
It launched, again, with no error but still it wouldn’t work. Sighs. We have to keep digging. So I went to the logs again, on a bug hunting mission and found this:
[2018/11/13 20:04:46] minidlna.c:1048: warn: Starting MiniDLNA version 1.2.1. [2018/11/13 20:04:46] minissdp.c:131: error: bind(udp): Address already in use [2018/11/13 20:04:46] minidlna.c:1080: info: Failed to open socket for receiving SSDP. Trying to use MiniSSDPd [2018/11/13 20:04:46] minissdp.c:84: error: setsockopt(udp, IP_ADD_MEMBERSHIP): Bad file descriptor [2018/11/13 20:04:46] minissdp.c:189: warn: Failed to add multicast membership for address 192.168.1.137 [2018/11/13 20:04:46] getifaddr.c:338: info: Enabling interface 192.168.1.137/255.255.255.0 [2018/11/13 20:04:46] minissdp.c:830: error: connect("/var/run/minissdpd.sock"): No such file or directory[2018/11/13 20:04:46] minidlna.c:1083: fatal: Failed to connect to MiniSSDPd. EXITING%
Reviewing online on the minidlna site, they do suggest to try to install such software.
https://sourceforge.net/p/minidlna/support-requests/55/
Funny enough I found a link to my article on that link.
Right now I will keep reviewing and will come back later with an answer.