Last.fm scrobbling working for local client, but not for remote Ampache or Subsonic clients

219 views
Skip to first unread message

Roland Hauff

unread,
Feb 27, 2018, 12:30:24 PM2/27/18
to Ampache
I have Ampache 3.8.5 running on Ubuntu 17.10.  Last.fm is configured and working to scrobble when I login on my desktop pc, the same pc as running server.  However, when I use Android or iPhone running Subsonic or Ampache client, Scrobbling fails.

Here is a snippet of my Ampache log:

2018-02-27 11:07:14 [ampache] (session) -> 4b9a269f0dfd1a073c18b5ebe8723461 has been extended to Tue, 27 Feb 2018 12:07:14 -0600 extension length 3600
2018-02-27 11:07:14 [ampache] (API) -> Ping Received from 192.168.x.xx :: 4b9a269f0dfd1a073c18b5ebe8723461
2018-02-27 11:07:14 [ampache] (API) -> Handshake Attempt, IP:192.168.x.xx User:roland Version:350001
2018-02-27 11:07:14 [ampache] (API) -> Login Attempt, IP:192.168.x.xx Time: 1519751238 User:roland (2) Auth:dfd862e7a7a44c54d505d6ac983130e9f32d3c6d10b9088976b797dc0ebb8400
2018-02-27 11:07:14 [ampache] (session) -> Session created: 77f68eaee611241f05ecb39e46f4c23c
2018-02-27 11:07:14 [ampache] (API) -> Login Success, passphrase matched
2018-02-27 11:07:15 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:15 -0600 extension length 3600
2018-02-27 11:07:15 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:15 -0600 extension length 3600
2018-02-27 11:07:15 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:15 -0600 extension length 3600
2018-02-27 11:07:15 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:15 -0600 extension length 3600
2018-02-27 11:07:19 [admin] (session) -> tpta3f2fq2fb9b4d59kv0npai6 has been extended to Tue, 27 Feb 2018 12:07:19 -0600 extension length 3600
2018-02-27 11:07:19 [admin] (ajax.server.php) -> Called for page: {index}
2018-02-27 11:07:28 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:28 -0600 extension length 3600
2018-02-27 11:07:28 [ampache] (API) -> Ping Received from 192.168.2.11 :: 77f68eaee611241f05ecb39e46f4c23c
2018-02-27 11:07:34 [admin] (session) -> tpta3f2fq2fb9b4d59kv0npai6 has been extended to Tue, 27 Feb 2018 12:07:34 -0600 extension length 3600
2018-02-27 11:07:34 [admin] (ajax.server.php) -> Called for page: {index}
2018-02-27 11:07:38 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:38 -0600 extension length 3600
2018-02-27 11:07:38 [ampache] (API) -> Ping Received from 192.168.2.11 :: 77f68eaee611241f05ecb39e46f4c23c
2018-02-27 11:07:38 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:38 -0600 extension length 3600
2018-02-27 11:07:39 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:39 -0600 extension length 3600
2018-02-27 11:07:39 [ampache] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 12:07:39 -0600 extension length 3600
2018-02-27 11:07:39 [ampache] (API) -> Ping Received from 192.168.2.11 :: 77f68eaee611241f05ecb39e46f4c23c
2018-02-27 11:07:43 [ampache] (play) -> Asked for type {song}
2018-02-27 11:07:43 [roland] (session) -> 77f68eaee611241f05ecb39e46f4c23c has been extended to Tue, 27 Feb 2018 13:07:43 -0600 extension length 7200
2018-02-27 11:07:43 [roland] (play) -> Playing file (/audiovideo/music/Afro Celt Sound System/Volume 3 Further In Time/03 - When Youre Falling.mp3}...
2018-02-27 11:07:43 [roland] (play) -> Media type {mp3}
2018-02-27 11:07:43 [roland] (play) -> Custom play action {}
2018-02-27 11:07:43 [roland] (play) -> Transcode to {}
2018-02-27 11:07:43 [roland] (play) -> Transcoding is not enabled for this media type. Valid types: {["native"]}
2018-02-27 11:07:43 [roland] (play) -> Starting stream of /audiovideo/music/Afro Celt Sound System/Volume 3 Further In Time/03 - When Youre Falling.mp3 with size 10083741
2018-02-27 11:07:43 [roland] (play) -> Registering stream stats for {Afro Celt Sound System - When You're Falling}...
2018-02-27 11:07:43 [roland] (user.class.php) -> Updating stats for {song/4883} {okhttp/3.7.0}...
2018-02-27 11:07:43 [roland] (user.class.php) -> save_mediaplay...
2018-02-27 11:07:43 [roland] (Last.FM) -> No session key, not scrobbling (need to grant Ampache to last.fm)
2018-02-27 11:07:43 [ampache] (API) -> Handshake Attempt, IP:192.168.x.xx User:roland Version:350001
2018-02-27 11:07:43 [ampache] (API) -> Login Attempt, IP:192.168.x.xx Time: 1519751267 User:roland (2) Auth:859f3b890a92c74bc8b8a7e966848ed068efd4130c462f6bdb3074d14b26e3ea
2018-02-27 11:07:43 [ampache] (session) -> Session created: b190e6792be34dbcc138db9d3d2c6662
2018-02-27 11:07:43 [ampache] (API) -> Login Success, passphrase matched
2018-02-27 11:07:43 [ampache] (session) -> b190e6792be34dbcc138db9d3d2c6662 has been extended to Tue, 27 Feb 2018 12:07:43 -0600 extension length 3600
2018-02-27 11:07:44 [roland] (play) -> Stream ended at 10083741 (10083741) bytes out of 10083741
2018-02-27 11:07:45 [admin] (session) -> tpta3f2fq2fb9b4d59kv0npai6 has been extended to Tue, 27 Feb 2018 12:07:45 -0600 extension length 3600
2018-02-27 11:07:45 [admin] (ajax.server.php) -> Called for page: {index}

Roland Hauff

unread,
Feb 27, 2018, 2:33:56 PM2/27/18
to Ampache
Ok, this has got to be a permission problem somehow.  The ONLY place Scrobbling works is from web interface on localhost.  Web interface from internet address has the same messages above.

Ernie D

unread,
Feb 27, 2018, 3:00:09 PM2/27/18
to amp...@googlegroups.com
Hello Roland

I just tried Subsonic and DSub on Android and successfully scrobbled several songs to my last.fm account.  Do you have "scrobble to Last.fm" enabled in the Subsonic settings?



73 From AA1AD
Ernie D
Federal Way, WA | CN87ug
--
You received this message because you are subscribed to the Google Groups "Ampache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampache+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampache/ba62503d-3186-47cf-a19e-2f2fca79e789%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roland Hauff

unread,
Feb 27, 2018, 6:07:30 PM2/27/18
to Ampache
Ernie, I assume you mean Subsonic settings on client?  Yes, I tried it with scrobbling turned on AND turned off.  No change.

The interesting thing on the Subsonic requests I see "noscrobble=1", regardless of what I put in the client setting.

Roland Hauff

unread,
Mar 8, 2018, 4:50:05 PM3/8/18
to Ampache
For some reason, Scrobbling on remote clients started working today.  I'm not sure what exactly caused it to start working.  I had upgraded from Ampache 3.8.5 to 3.8.6 a few days ago, but that didn't fix it.  Today I noticed that remote web access of Ampache server was getting redirected to localhost, thus giving a blank page.  I believe that behavior started with 3.8.6, as I hadn't made any other changes to config, or tested remote web access since then.

To fix the localhost redirect, I had to go into /etc/apache2/sites-available/000-default.conf and change line 1 "<VirtualHost *:80>" to "<VirtualHost *:8080>".  I use port 8080 port-forwarded for the Ampache server.

Before I found the above fix for the localhost redirect problem, I has also changed a few settings back to default in /var/www/html/ampache/config/ampache.cfg.php:
http_host = "localhost"
http_port = 8080
local_web_path = "http://localhost/ampache"

I just commented them out.  Those didn't fix the localhost redirect problem, but after removing those, along with editing /etc/apache2/sites-available/000-default.conf, everything now works, including Last.fm on all my clients!


Roland Hauff

unread,
Mar 8, 2018, 4:54:44 PM3/8/18
to Ampache
It is interesting that in the Ampache log, the initial request still shows noscrobble=1:

2018-03-08 15:47:50 [roland] (subsonic) -> Stream proxy: http://rhauff.hopto.org:8080/ampache/play/index.php?ssid=f9acac221c582189393155e3a900d82c&type=song&oid=800&uid=2&client=iSub&noscrobble=1&player=api&name=Cavern%20Of%20Anti-Matter%20-%20invocation%20melodie%20in%20c.mp3

and a few lines down in the log i see:
2018-03-08 15:47:50 [roland] (user.class.php) -> Scrobbling explicitly skipped

but then once the song hits 50% playback I get:

2018-03-08 15:49:35 [roland] (user.class.php) -> save_mediaplay...
2018-03-08 15:49:36 [roland] (Last.FM) -> Submission Successful

All good!
Reply all
Reply to author
Forward
0 new messages