Reply To: Entering ws_returnerror (401: Unauthorized) linux fc6

#9238
throw
Participant

Here is the debug when server is started.

./mt-daapd -c /etc/mt-daapd/mt-daapd.conf -f -d 9
Found 1 tokens in /export//media
Token 1: /export//media
Expanding precomments to 2048
Expanding precomments to 4096
Checking existence of /usr/share/mt-daapd/admin-root
Checking existence of /usr/share/mt-daapd/admin-root
Checking existence of /export/media/db
Checking existence of /export/media/db
Loading new config file.
Firefly Version svn-1498: Starting with debuglevel 9
Starting rendezvous daemon
Initializing avahi
Client running
Creting service group
No entries yet… skipping service create
Starting avahi polling thread
Starting signal handler
Opening database
Executing: select value from config where term=’version’
Results: 0
Initializing database
Executing: select count(*) FROM songs
Executing: select value from config where term=’rescan’
Executing: vacuum
Avahi poll thread quit iwth error: OK
Rows: 0
Executing: create index idx_path on songs(path,idx)
Query: create index idx_path on songs(path,idx)
Error: index idx_path already exists
Executing: create index idx_songid on playlistitems(songid)
Query: create index idx_songid on playlistitems(songid)
Error: index idx_songid already exists
Executing: create index idx_playlistid on playlistitems(playlistid,songid)
Query: create index idx_playlistid on playlistitems(playlistid,songid)
Error: index idx_playlistid already exists
Starting web server from /usr/share/mt-daapd/admin-root on port 3689
Listening on port 3689
Starting server thread
Registering rendezvous names
Adding mt-bird1/_http._tcp
Creating service group (again?)
Creting service group
Waiting on something…
Done waiting.
Re-registering mt-bird1/_http._tcp
Found key of size 9
Added key txtvers=1
Added key Database ID=653F80C5
Added key Machine ID=653F80C5
Added key Machine Name=mt-bird1
Added key mtd-version=svn-1498
Added key iTSh Version=131073
Added key Version=196610
Added key Password=true
Added key ffid=12c6c778
Executing: select count(*) FROM songs
Serving 11 songs. Startup complete in 0 seconds
Rescanning database
Starting scan_init
Starting db scan
Executing: drop table updated
Query: drop table updated
Error: no such table: updated
Executing: create temp table updated (id int)
Rows: 0
Executing: drop table plupdated
Query: drop table plupdated
Error: no such table: plupdated
Executing: create temp table plupdated(id int)
Rows: 0
Scanning for MP3s in /export//media
Found /export/media/db
Found db.. recursing
Found /export/media/db/songs.db
Found /export/media/MOVIES
Found MOVIES.. recursing
Found /export/media/MOVIES/layercake.mp4
Executing: select * from songs where path=’/export/media/MOVIES/layercake.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (1)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/HighTension.mp4
Executing: select * from songs where path=’/export/media/MOVIES/HighTension.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (2)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/ScannerDark.mp4
Executing: select * from songs where path=’/export/media/MOVIES/ScannerDark.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (3)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/motorcyclediaries.mp4
Executing: select * from songs where path=’/export/media/MOVIES/motorcyclediaries.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (4)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/ConstGardener.mp4
Executing: select * from songs where path=’/export/media/MOVIES/ConstGardener.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (5)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/Invincible.mp4
Executing: select * from songs where path=’/export/media/MOVIES/Invincible.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (6)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/KingdomOfHeaven.mp4
Executing: select * from songs where path=’/export/media/MOVIES/KingdomOfHeaven.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (7)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/lifeaquad.mp4
Executing: select * from songs where path=’/export/media/MOVIES/lifeaquad.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (8)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/illusionist.mp4
Executing: select * from songs where path=’/export/media/MOVIES/illusionist.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (9)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/joedirt.mp4
Executing: select * from songs where path=’/export/media/MOVIES/joedirt.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (10)
Rows: 1
Skipping file, not modified
Found /export/media/MOVIES/zathura.mp4
Executing: select * from songs where path=’/export/media/MOVIES/zathura.mp4′ and idx=0
Executing: INSERT INTO updated VALUES (11)
Rows: 1
Skipping file, not modified
Found /export/media/lost+found
Found lost+found.. recursing
Ending song scan
Executing: pragma synchronous = off
Rows: 0
Executing: begin transaction
Rows: 0
Processing playlists
Starting playlist scan
Finished playlist loop
Executing: end transaction
Rows: 0
Executing: pragma synchronous=normal
Rows: 0
Executing: delete from songs where id not in (select id from updated)
Rows: 0
Executing: update songs set force_update=0
Rows: 11
Executing: drop table updated
Rows: 0
Executing: delete from playlists where ((type=2) OR (type=3)) and id not in (select id from plupdated)
Rows: 0
Executing: delete from playlistitems where playlistid not in (select distinct id from playlists)
Rows: 0
Executing: drop table plupdated
Rows: 0
Updating playlists
Executing: select count(*) from playlists
Executing: select * from playlists
Executing: update playlists set items=(select count(*) from songs where 1) where id=1
Rows: 1
Executing: select count(*) FROM songs
Scanned 11 songs (was 11) in 0 seconds

This is after I click on the share from with in itunes.

Thread 0: Entering ws_dispatcher (Connection from 192.168.69.21)
Thread 0: got request
Request: GET daap://192.168.69.25:3689/server-info HTTP/1.1
Thread 0: Read: Accept: */*
Thread 0: Adding header *Accept=*/**
Added *Accept=*/**
Thread 0: Read: User-Agent: iTunes/7.0.2 (Macintosh; N; PPC)
Thread 0: Adding header *User-Agent=iTunes/7.0.2 (Macintosh; N; PPC)*
Added *User-Agent=iTunes/7.0.2 (Macintosh; N; PPC)*
Thread 0: Read: Client-DAAP-Version: 3.3
Thread 0: Adding header *Client-DAAP-Version=3.3*
Added *Client-DAAP-Version=3.3*
Thread 0: Read: Client-DAAP-Access-Index: 2
Thread 0: Adding header *Client-DAAP-Access-Index=2*
Added *Client-DAAP-Access-Index=2*
Thread 0: Read: Accept-Encoding: gzip
Thread 0: Adding header *Accept-Encoding=gzip*
Added *Accept-Encoding=gzip*
Thread 0: Read:
Thread 0: Headers parsed!
Checking to see if connection matches close
Nope!

Thread 0: Connection type HTTP/1.1
: Connection: persist
Thread 0: Original URI: daap://192.168.69.25:3689/server-info
Thread 0: Translated URI: /server-info
Thread 0: Preparing to find handler
Thread 0: URI Match!
Thread 0: Time is 1172012251 seconds after epoch
Thread 0: Setting time header
Added *Date=Tue, 20 Feb 2007 22:57:31 GMT*
Added *Connection=keep-alive*
Added *Server=mt-daapd/svn-1498*
Added *Content-Type=text/html*
Added *Content-Language=en_us*
Thread 0: Using non-default handler
in main_auth
Dispatching auth for /server-info to config auth
Added *WWW-Authenticate=Basic realm=”webserver”*
Thread 0: Entering ws_returnerror (401: Unauthorized)
Updating Connection from keep-alive to keep-alive
Added *Content-Length=2*
Emitting reponse header Content-Length: 2
Emitting reponse header WWW-Authenticate: Basic realm=”webserver”
Emitting reponse header Content-Language: en_us
Emitting reponse header Content-Type: text/html
Emitting reponse header Server: mt-daapd/svn-1498
Emitting reponse header Connection: keep-alive
Emitting reponse header Date: Tue, 20 Feb 2007 22:57:31 GMT
Thread 0: Terminating
Thread 0: Freeing request headers
Thread 0: Freeing response headers
Thread 0: Freeing request vars
Thread 0: could not read: Success
Thread 0: Terminating
Thread 0: Freeing request headers
Thread 0: Freeing response headers
Thread 0: Freeing request vars
Thread 0: Closing fd
With thread 0 exiting, 0 are still running
Got shutdown signal.
Stopping gracefully
Stopping rendezvous daemon
Closing database
Done!

this line from the last debu looks suspect.

Checking to see if connection matches close
Nope!