None
closed
nobody
None
2018-11-10
2018-11-03
Anonymous
No

I've been trying to enable uprcl to play files stored locally on Arch Linux (both x86_64 and RP3) and hit the highlighted error message in the log (log level 5) below:

:3:src/mediaserver/contentdirectory.cxx:182::ContentDirectory: not creating entry for gmusic because neither gmusicuser nor gmusicautostart are defined in the configuration
:3:src/mediaserver/contentdirectory.cxx:182::ContentDirectory: not creating entry for qobuz because neither qobuzuser nor qobuzautostart are defined in the configuration
:3:src/mediaserver/contentdirectory.cxx:182::ContentDirectory: not creating entry for spotify because neither spotifyuser nor spotifyautostart are defined in the configuration
:3:src/mediaserver/contentdirectory.cxx:182::ContentDirectory: not creating entry for tidal because neither tidaluser nor tidalautostart are defined in the configuration
:4:libupnpp/upnpplib.cxx:180::LibUPnP: Using IP 192.168.86.27 port 49152
:4:libupnpp/device/device.cxx:550::UpnpDevice::addService: [urn:upnp-org:serviceId:ContentDirectory]
:5:src/mediaserver/contentdirectory.cxx:277::ContentDirectory::Internal::maybeStartSomePlugins: starting uprcl
:4:src/mediaserver/contentdirectory.cxx:59::ContentDirectory::pluginFactory: for uprcl
:4:src/mediaserver/contentdirectory.cxx:73::ContentDirectory: host 192.168.86.27 port 49152
:4:src/mediaserver/cdplugins/cmdtalk-fixed.cpp:85::CmdTalk::startCmd
:4:src/execmd-fixed.cpp:469::ExecCmd::startExec: (1|1) /usr/share/upmpdcli/cdplugins/uprcl/uprcl-app.py

:2:src/sysvshm-fixed.cpp:105::ShmSeg::ShmSeg: shmget(3040): errno 2: No such file or directory
:5:src/mediaserver/cdplugins/plgwithslave.cxx:262::PlgWithSlave::maybeStartCmd: shm attach failed (probably ok)
:4:libupnpp/device/device.cxx:550::UpnpDevice::addService: [urn:upnp-org:serviceId:ConnectionManager]
:4:src/main.cxx:786::Media server event loop
:4:libupnpp/device/device.cxx:507::UPNP_EVENT_SUBSCRIPTION_REQUEST: urn:upnp-org:serviceId:ContentDirectory
:4:libupnpp/device/device.cxx:430::UPNP_CONTROL_ACTION_REQUEST: Browse. Params: <?xml version="1.0"?>

I assume SHM is important and I'm just missing a build dependency, perhaps with one of the archlinux standard packages. Also: /dev/shm does exist and usable; i've tried latest release of libpnpp (0.16.1 and 0.17.0) with upmpdcli (1.3.6 and git top-of-tree), both with the same error message.

'libmpdclient' 'libupnpp>=0.15.3' 'libmicrohttpd' 'jsoncpp' 'curl' 'expat' 'python-requests' 'recoll' 'python-bottle' 'python-mutagen' 'mutagen' 'aspell-en' 'id3lib'

BTW, Thanks for all of you hard work on this! I've been using MPD for years and started to look for streaming service integration recently and this is just perfect.

Skunark
(also i'm having issues signing up, so hopefully I can respond to this)

Discussion

<< < 1 2 3 > >> (Page 2 of 3)
  • skunark
    skunark
    2018-11-07

    I'm still looking through the various logs, not sure if this is helpful

    Nov 06 22:15:11 hostname upmpdcli[14194]: uprcl: Browse root: rootmap now {'0$uprcl$folders': 'folders', '0$uprcl$untagged': 'untagged', '0$uprcl$albums': 'tags', '0$uprcl$items': 'tags', '0$uprcl$=Artist': 'tags', '0$uprcl$=Comment': 'tags', '0$uprcl$=Composer': 'tags', '0$uprcl$=Conductor': 'tags', '0$uprcl$=Date': 'tags', '0$uprcl$=Genre': 'tags', '0$uprcl$=Group': 'tags', '0$uprcl$=Orchestra': 'tags'}
    Nov 06 22:15:11 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: browse: {'cmdtalk:proc': 'browse', 'flag': 'meta', 'objid': '0$uprcl$=Artist'}. g_httphp [192.168.86.27:9090]
    Nov 06 22:15:11 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: browse: idpath: <=Artist>
    Nov 06 22:15:11 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: processmessage: processor raised: [uprcl-app: browse: can't browse meta for now]
    Nov 06 22:15:11 hostname upmpdcli[14194]: Traceback (most recent call last):
    Nov 06 22:15:11 hostname upmpdcli[14194]:   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalk.py", line 172, in processmessage
    Nov 06 22:15:11 hostname upmpdcli[14194]:     outfields = processor.process(params)
    Nov 06 22:15:11 hostname upmpdcli[14194]:   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalkplugin.py", line 53, in process
    Nov 06 22:15:11 hostname upmpdcli[14194]:     return self.dispatcher.run(params[prcnmkey], params)
    Nov 06 22:15:11 hostname upmpdcli[14194]:   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalkplugin.py", line 36, in run
    Nov 06 22:15:11 hostname upmpdcli[14194]:     return func(params)
    Nov 06 22:15:11 hostname upmpdcli[14194]:   File "/usr/share/upmpdcli/cdplugins/uprcl/uprcl-app.py", line 114, in browse
    Nov 06 22:15:11 hostname upmpdcli[14194]:     raise Exception("uprcl-app: browse: can't browse meta for now")
    Nov 06 22:15:11 hostname upmpdcli[14194]: Exception: uprcl-app: browse: can't browse meta for now
    Nov 06 22:15:11 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: browse: {'cmdtalk:proc': 'browse', 'flag': 'children', 'objid': '0$uprcl$'}. g_httphp [192.168.86.27:9090]
    Nov 06 22:15:11 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: browse: idpath: <>
    Nov 06 22:15:12 hostname upmpdcli[14194]: uprcl: tags:browse: idpath <=Artist>
    Nov 06 22:15:12 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: browse: {'cmdtalk:proc': 'browse', 'flag': 'children', 'objid': '0$uprcl$=Artist'}. g_httphp [192.168.86.27:9090]
    Nov 06 22:15:12 hostname upmpdcli[14194]: CMDTALK: uprcl-app.py: browse: idpath: <=Artist>
    Nov 06 22:15:12 hostname upmpdcli[14194]: uprcl: tagsbrowse. pid 0$uprcl$=Artist qpath ['=Artist']
    Nov 06 22:15:12 hostname upmpdcli[14194]: uprcl: tagsbrowse: executing <SELECT artist.artist_id, artist.value FROM tracks, artist WHERE tracks.artist_id = artist.artist_id GROUP BY tracks.artist_id ORDER BY value> values []
    
     
    Last edit: skunark 2018-11-07
  • medoc
    medoc
    2018-11-07

    The select data looks fine, the most probable issue here is that the table is empty.

    I am attaching a modified uprcltags.py (/usr/share/upmpdcli/cdplugins/uprcl/uprcltags.py), with some traces added. Please install it and just restart upmpdcli (no need to erase the cache, the SQLite db is not cached, it will be rebuilt in memory from the recoll index).

    I am interested in the traces from the plugin, they will go to stderr (either start upmpdcli from the command line as sudo upmpdcli -c /etc/upmpdcli.conf > /tmp/trace 2>&1, or use systemctl/journalctl for restarting and looking at the traces).

     
    Attachments
  • skunark
    skunark
    2018-11-08

    this is what /tmp/trace captured

    uprcl: Path translation: pthstr: /srv/media/Music/twenty one pilots:/srv/media/Music/twenty one pilots
    uprcl: runbottle: host mclaren.local port 9090 pthstr /srv/media/Music/twenty one pilots:/srv/media/Music/twenty one pilots pathprefix /uprcl
    uprcl: Creating/updating index in /var/cache/upmpdcli/uprcl for "/srv/media/Music/twenty one pilots"
    uprcl: runbottle: adding route for: /srv/media/Music/twenty one pilots/<filepath:path>
    uprcl: _update_index: initrunning set
    Bottle v0.12.13 server starting up (using WaitressServer())...
    Listening on http://mclaren.local:9090/
    Hit Ctrl-C to quit.
    
    :3:common/rclinit.cpp:312::Configuration directory: /var/cache/upmpdcli/uprcl
    :3:index/recollindex.cpp:667::recollindex: changing current directory to [/tmp]
    :3:index/recollindex.cpp:700::recollindex: starting up
    :3:rcldb/rcldb.cpp:1921::Db::waitUpdIdle: total xapian work 0 mS
    :3:index/fsindexer.cpp:240::fsindexer index time:  0 mS
    :3:./utils/workqueue.h:192::DbUpd: tasks 0 nowakes 0 wsleeps 1 csleeps 0
    :2:./utils/workqueue.h:153::WorkQueue::waitIdle:DbUpd: not ok
    :3:rcldb/rcldb.cpp:1921::Db::waitUpdIdle: total xapian work 0 mS
    :3:rcldb/rcldb.cpp:1921::Db::waitUpdIdle: total xapian work 10 mS
    :3:./utils/workqueue.h:192::DbUpd: tasks 0 nowakes 0 wsleeps 1 csleeps 0
    :3:./utils/workqueue.h:192::Internfile: tasks 16 nowakes 15 wsleeps 14 csleeps 2
    :3:./utils/workqueue.h:192::Split: tasks 0 nowakes 0 wsleeps 3 csleeps 0
    uprcl: Indexing took 0.52 Seconds
    :3:common/rclinit.cpp:312::Configuration directory: /var/cache/upmpdcli/uprcl
    uprcl: Estimated alldocs query results: 16
    uprcl: Retrieved 16 docs in 0.01 Seconds
    uprcl: _rcl2folders took 0.00 Seconds
    uprcl: recolltosql: processed 16 docs in 0.00 Seconds
    uprcl: Init done
    

    I did double check to make sure the file was correctly copied
    md5sum /usr/share/upmpdcli/cdplugins/uprcl/uprcltags.py
    e68c3e5ba93b257cb5109c53a64d8815 /usr/share/upmpdcli/cdplugins/uprcl/uprcltags.py

     
    Last edit: skunark 2018-11-08
  • skunark
    skunark
    2018-11-08

    package versions if this provides any insight...

    jsoncpp 1.8.4-2
    libmicrohttpd 0.9.59-1
    libmpdclient 2.16-1
    libupnpp 0.17.0-3
    mutagen 1.41.1-1
    python-bottle 0.12.13-2
    python-mutagen 1.41.1-1
    python-requests 2.20.0-1
    python-requests-file 1.4.3-2
    python-waitress 1.1.0-2
    recoll 1.24.1-2
    sqlite 3.25.2-1

     
  • medoc
    medoc
    2018-11-08

    Ok, this means that the method where I put the traces is not called. More traces in file attached. We're getting close I think :)

     
    Attachments
  • skunark
    skunark
    2018-11-08

    I've attached the trace for the latest uprcltags.py

    small snippet of the trace:

    uprcl: Looking for artist (<class 'str'>) in doc
    uprcl: artist not found
    
     
    Last edit: skunark 2018-11-08
    Attachments
  • medoc
    medoc
    2018-11-09

    It seems that only the standard Recoll stored fields are found, and none of those which are specified by the configuration in /var/cache/upmpdcli/uprcl/fields. This is particularly weird, because the fields (e.g. artist) were indeed present in the recoll preview/fields that you uploaded earlier.

    Could you attach a tar or zip of /var/cache/upmpdcli/uprcl ? If this is too big (I don't know the limit for attachments here), maybe upload it somewhere ?

     
  • medoc
    medoc
    2018-11-10

    The uprcl directory is missing the "fields" file, which defines which data should be stored in the index. This file is normally copied from /usr/share/upmpdcli/cdplugins/uprcl/rclconfig-fields during the initial run (if /var/cache/upmpdcli/uprcl does not exist).

    So please try to delete /var/cache/upmpdcli/uprcl, then restart upmpdcli, and check if the fields file is indeed copied. If not there should be messages in the log, maybe there is a permission issue (source not readable by upmpdcli?)

    The weird thing is that the preview fields that you copied previously from recoll should not have been possible in the absence of an appropriate "fields" file. Anyway... let's try the above.

     
  • skunark
    skunark
    2018-11-10

    That did the trick!

    I didn't see an error message of the missing file and mostly i've been doing:
    rm -rf /var/cache/upmpdcli/uprcl/*
    which doesn't copy over the missing file on restart, and not
    rm -rf /var/cache/upmpdcli/uprcl
    which does copy over the missing file on restart. My bad

    The archlinux user PKGBUILD file doesn't create the cache directory, which might have alleviated the problem. I have suggested that fix for the package maintainer.

    Thank you so much for helping me figure this out. My swarm of Raspberry PIs can now access both my ripped CDs and Tidal in a single app.

     
<< < 1 2 3 > >> (Page 2 of 3)

Cancel   Add attachment