分类
开发计划

调试owntone不运行(网口没有获取到IP)的问题

OwnTone 本身是一个音频流的发送端(Sender),用于将音频内容推送到其他设备播放。如果您希望将某个设备(如老式音响)变成 AirPlay 的接收端(Receiver),可以考虑使用 Shairport Sync 等工具来实现。

在串口工具中执行:

/rom/usr/sbin/owntone -c /etc/owntone.conf

输出内容:

[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: OwnTone version 28.12 taking off
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: Built with:
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - ffmpeg
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - Spotify
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - librespot-c
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - LastFM
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - Without Chromecast
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - MPD
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - Without websockets
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - ALSA
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - Without webinterface
[2025-04-27 14:54:57] [  LOG] [            (-1)]     main: - Regex

利用mkdir手动创建路径:

/srv/music
/var/cache/owntone

网络不通:

执行:swconfig dev switch0 show

swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        alternate_vlan_disable: 0
        bc_storm_protect: 0
        led_frequency: 0
Port 0:
        disable: 0
        doubletag: 0
        untag: 1
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 514
        tr_bad: 0
        tr_good: 130
        pvid: 1
        link: port:0 link:up speed:100baseT full-duplex
Port 1:
        disable: 0
        doubletag: 0
        untag: 0
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 1883
        tr_bad: 0
        tr_good: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        disable: 0
        doubletag: 0
        untag: 0
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 0
        link: port:2 link:down
Port 3:
        disable: 0
        doubletag: 0
        untag: 0
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 0
        link: port:3 link:down
Port 4:
        disable: 0
        doubletag: 0
        untag: 0
        led: 5
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        disable: 1
        doubletag: 0
        untag: 0
        led: ???
        lan: 1
        recv_bad: 0
        recv_good: 0
        tr_bad: 0
        tr_good: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        disable: 0
        doubletag: 0
        untag: 0
        led: ???
        lan: ???
        recv_bad: ???
        recv_good: ???
        tr_bad: ???
        tr_good: ???
        pvid: 1
        link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
        ports: 0 6t

当前配置解读

项目 状态
有线连接的物理端口 ✅ Port 0:link: up
Port 0 当前 VLAN ✅ 属于 VLAN 1
VLAN 1 是否绑定了 CPU 接口 ✅ Port 6t(即 eth0)
结果 当前 Port 0 是 LAN 口的一部分,不是 WAN

我们要做的是:

✅ 把 Port 0 从 VLAN 1 移到 VLAN 2,使其作为 WAN 接口绑定到 eth0.2

完整 /etc/config/network 示例模板

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdfd:9b14:219e::/48'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.8.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 6t'  # LAN ports

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 6t'        # WAN port: Port 0

⚠️ VLAN 1 原来是 0 6t,现在变成 1 2 3 4 6t(LAN)。
⚠️ VLAN 2 是新增的,用来绑定 Port 0 到 eth0.2(WAN)。

/etc/init.d/network restart
修改/etc/owntone.conf
把log级别修改为debug,可以看到更多信息:
cat /var/log/owntone.log
 main: OwnTone version 28.12 taking off
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: Built with:
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - ffmpeg
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - Spotify
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - librespot-c
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - LastFM
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - Without Chromecast
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - MPD
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - Without websockets
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - ALSA
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - Without webinterface
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: - Regex
[2025-04-27 15:42:29] [ INFO] [            (-1)]     main: Initialized with ffmpeg 4.3.3
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     main: Initialized with gcrypt 1.8.8
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     main: PID: 1120
[2025-04-27 15:42:29] [  LOG] [            (-1)]     main: mDNS init
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Initializing Avahi mDNS
[2025-04-27 15:42:29] [  LOG] [            (-1)]     mdns: Avahi state change: Client registering
[2025-04-27 15:42:29] [ INFO] [            (-1)]     main: Initializing database
[2025-04-27 15:42:29] [ INFO] [            (-1)]       db: Configured to use database file '/var/cache/owntone/songs3.db'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'schema_version_major';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'schema_version_minor';'
[2025-04-27 15:42:29] [  LOG] [            (-1)]       db: Now vacuuming database, this may take some time...
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Playlist title for config item 'name_library' set with query 'UPDATE playlists SET title = 'Library' WHERE type = 0 AND special_id = 0;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Playlist title for config item 'name_music' set with query 'UPDATE playlists SET title = 'Music' WHERE type = 0 AND special_id = 6;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Playlist title for config item 'name_movies' set with query 'UPDATE playlists SET title = 'Movies' WHERE type = 0 AND special_id = 4;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Playlist title for config item 'name_tvshows' set with query 'UPDATE playlists SET title = 'TV Shows' WHERE type = 0 AND special_id = 5;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Playlist title for config item 'name_podcasts' set with query 'UPDATE playlists SET title = 'Podcasts' WHERE type = 0 AND special_id = 1;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Playlist title for config item 'name_audiobooks' set with query 'UPDATE playlists SET title = 'Audiobooks' WHERE type = 0 AND special_id = 7;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT COUNT(*) FROM playlists p WHERE p.disabled = 0;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'INSERT OR REPLACE INTO admin (key, value) VALUES ('start_time', '1745739749');'
[2025-04-27 15:42:29] [  LOG] [            (-1)]       db: Database OK with 0 active files and 6 active playlists
[2025-04-27 15:42:29] [ INFO] [            (-1)]    cache: Cache thread init
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'player_mode_repeat';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: No results
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'player_mode_shuffle';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: No results
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'player_mode_consume';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: No results
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'RAOP timing' bound to 0.0.0.0, port 38029, socket 60
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'RAOP control' bound to 0.0.0.0, port 46854, socket 61
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service browser for type _raop._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'AirPlay timing' bound to 0.0.0.0, port 36822, socket 62
[2025-04-27 15:42:29] [DEBUG] [            (-1)]    cache: Cache opened
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'BEGIN TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'queue_version';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM queue where id <> 0;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'INSERT OR REPLACE INTO admin (key, value) VALUES ('queue_version', '2');'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'END TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'AirPlay control' bound to 0.0.0.0, port 51710, socket 64
[2025-04-27 15:42:29] [ INFO] [            (-1)]  airplay: AirPlay events thread init
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service browser for type _airplay._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service browser for type _roku-rcp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM inotify;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT d.id FROM directories d WHERE d.virtual_path = '/file:/srv';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'UPDATE directories SET virtual_path = TRIM('/file:/srv'), db_timestamp = 1745739749, disabled = 0, parent_id = 2, path = TRIM('/srv'), scan_kind = 1 WHERE id = 5;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Updated directory '/file:/srv' with id 5
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'BEGIN TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     scan: Processing directory /srv/music (flags = 0x1)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT d.id FROM directories d WHERE d.virtual_path = '/file:/srv/music';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'UPDATE directories SET virtual_path = TRIM('/file:/srv/music'), db_timestamp = 1745739749, disabled = 0, parent_id = 5, path = TRIM('/srv/music'), scan_kind = 1 WHERE id = 6;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Updated directory '/file:/srv/music' with id 6
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'INSERT INTO inotify (wd, cookie, path) VALUES (1, 0, '/srv/music');'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'END TRANSACTION;'
[2025-04-27 15:42:29] [  LOG] [            (-1)]     scan: Bulk library scan completed in 0 sec
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'spotify_refresh_token';'
[2025-04-27 15:42:29] [ INFO] [            (-1)]   laudio: Available ALSA playback mixer(s) on hw:0 CARD=I2S (MTK APSoC I2S): 'Headphone' 'Speaker'
[2025-04-27 15:42:29] [ INFO] [            (-1)]   laudio: Adding ALSA device 'default' with name 'Computer'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND f.data_kind = 3;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: No results
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM files WHERE path LIKE 'spotify:%%';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Starting query 'SELECT f.* FROM files f WHERE f.disabled = 0 AND f.data_kind = 3   ;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: End of query results
[2025-04-27 15:42:29] [DEBUG] [            (-1)]    httpd: Starting web server with root directory '/usr/share/owntone/htdocs'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'httpd init' bound to 0.0.0.0, port 3689, socket 82
[2025-04-27 15:42:29] [ INFO] [            (-1)]   stream: Streaming quality: 44100/16/2 @ 192kbps
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'mpd' bound to 0.0.0.0, port 6600, socket 96
[2025-04-27 15:42:29] [ INFO] [            (-1)]      mpd: mpd thread init
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'lastfm_sk';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: No results
[2025-04-27 15:42:29] [DEBUG] [            (-1)] scrobble: lastfm: No valid LastFM session key
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'listenbrainz_token';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: No results
[2025-04-27 15:42:29] [DEBUG] [            (-1)] scrobble: lbrainz: No valid ListenBrainz token
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service browser for type _touch-remote._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT s.selected, s.volume, s.name, s.auth_key, s.format FROM speakers s WHERE s.id = 0;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]   player: Status update - status: 2, events: 12, caller: device_add
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      mpd: Asynchronous listener callback called with event type 12.
[2025-04-27 15:42:29] [ INFO] [            (-1)]     main: Registering rendezvous names
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key txtvers=1
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Database ID=545E1E49
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Machine ID=545E1E49
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Machine Name=My Music on Hiwooya
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key mtd-version=28.12
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key iTSh Version=131073
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Version=196610
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Password=false
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key ffid=18375b86
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Processed 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM playlistitems WHERE filepath LIKE 'spotify:%%';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      mpd: Notify clients waiting for idle results: 12
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Processed 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM playlists WHERE path LIKE 'spotify:%%';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Processed 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM directories WHERE virtual_path LIKE '/spotify:/%%';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Processed 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     misc: Service 'httpd' bound to 0.0.0.0, port 3689, socket 102
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'UPDATE directories SET disabled = 4294967296 WHERE virtual_path = '/spotify:' AND disabled <> 4294967296;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Disabled spotify directory
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      lib: Refreshing RSS feeds
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT COUNT(*) FROM playlists f WHERE f.disabled = 0 AND (f.type = 4);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Starting query 'SELECT f.*, COUNT(pi.id), SUM(pi.filepath NOT NULL AND pi.filepath LIKE 'http%') FROM playlists f LEFT JOIN playlistitems pi ON (f.id = pi.playlistid) WHERE f.disabled = 0 AND (f.type = 4) GROUP BY f.id ORDER BY f.type, f.parent_id, f.special_id, f.title ;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: End of query results
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      lib: Purging old library content
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'BEGIN TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running purge query 'DELETE FROM playlistitems WHERE playlistid IN (SELECT p.id FROM playlists p WHERE p.type <> 0 AND p.db_timestamp < 1745739749);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM playlistitems WHERE playlistid IN (SELECT p.id FROM playlists p WHERE p.type <> 0 AND p.db_timestamp < 1745739749);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Purged 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running purge query 'DELETE FROM playlistitems WHERE filepath IN (SELECT f.path FROM files f WHERE -1 <> 0 AND f.db_timestamp < 1745739749);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM playlistitems WHERE filepath IN (SELECT f.path FROM files f WHERE -1 <> 0 AND f.db_timestamp < 1745739749);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key txtvers=1
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Database ID=545E1E49
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Machine ID=545E1E49
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Machine Name=My Music on Hiwooya
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key mtd-version=28.12
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key iTSh Version=131073
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Version=196610
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Password=false
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key ffid=18375b86
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Purged 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running purge query 'DELETE FROM playlists WHERE type <> 0 AND db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM playlists WHERE type <> 0 AND db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Purged 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running purge query 'DELETE FROM files WHERE -1 <> 0 AND db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM files WHERE -1 <> 0 AND db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Purged 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running purge query 'DELETE FROM directories WHERE id >= 5 AND db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM directories WHERE id >= 5 AND db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Purged 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'END TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'BEGIN TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM groups WHERE type = 1 AND NOT persistentid IN (SELECT songalbumid from files WHERE disabled = 0);'
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_rsp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Removed album group-entries: 0
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM groups WHERE type = 2 AND NOT persistentid IN (SELECT songartistid from files WHERE disabled = 0);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Removed artist group-entries: 0
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'END TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'BEGIN TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'queue_version';'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'DELETE FROM queue WHERE NOT file_id IN (SELECT id from files WHERE disabled = 0);'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'END TRANSACTION;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      lib: Purging old artwork content
[2025-04-27 15:42:29] [DEBUG] [            (-1)]    cache: Running purge query 'DELETE FROM artwork WHERE db_timestamp < 1745739749;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]    cache: Purged 0 rows
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      lib: Running post library scan jobs
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running post-scan DB maintenance tasks...
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Running query 'ANALYZE;'
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key txtvers=1
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Database ID=545E1E49
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Machine ID=545E1E49
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Machine Name=My Music on Hiwooya
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key mtd-version=28.12
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key iTSh Version=131073
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Version=196610
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Password=false
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key ffid=18375b86
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_daap._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_rsp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]       db: Done with post-scan DB maintenance
[2025-04-27 15:42:29] [  LOG] [            (-1)]      lib: Library init scan completed in 0 sec (0 changes)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      mpd: Asynchronous listener callback called with event type 128.
[2025-04-27 15:42:29] [DEBUG] [            (-1)]      mpd: Notify clients waiting for idle results: 128
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key txtvers=1
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Ver=131077
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key DbId=1
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key OSsi=0x2012E
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service iTunes_Ctrl_E17F54778B163298/_dacp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_daap._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_rsp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key txtvers=1
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key DbId=E17F54778B163298
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key DvTy=iTunes
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key DvSv=2306
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key Ver=131073
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key OSsi=0x1F5
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Added key CtlN=My Music on Hiwooya
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service E17F54778B163298/_touch-able._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service iTunes_Ctrl_E17F54778B163298/_dacp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_daap._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_rsp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_mpd._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service E17F54778B163298/_touch-able._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service iTunes_Ctrl_E17F54778B163298/_dacp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_daap._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_rsp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [ INFO] [            (-1)]     mdns: Re-registering mDNS groups (services and records)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding CNAME record owntone.local
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_mpd._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service E17F54778B163298/_touch-able._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service iTunes_Ctrl_E17F54778B163298/_dacp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_daap._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_rsp._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Adding service My Music on Hiwooya/_http._tcp
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Avahi Browser (_raop._tcp): no more results (CACHE_EXHAUSTED)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Avahi Browser (_airplay._tcp): no more results (CACHE_EXHAUSTED)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Avahi Browser (_roku-rcp._tcp): no more results (CACHE_EXHAUSTED)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Avahi Browser (_touch-remote._tcp): no more results (CACHE_EXHAUSTED)
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group uncommitted
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group uncommitted
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group uncommitted
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group uncommitted
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group uncommitted
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group uncommitted
[2025-04-27 15:42:29] [DEBUG] [            (-1)]     mdns: Group registering
[2025-04-27 15:42:30] [DEBUG] [            (-1)]     mdns: Avahi Browser (_raop._tcp): no more results (ALL_FOR_NOW)
[2025-04-27 15:42:30] [DEBUG] [            (-1)]     mdns: Avahi Browser (_airplay._tcp): no more results (ALL_FOR_NOW)
[2025-04-27 15:42:30] [DEBUG] [            (-1)]     mdns: Avahi Browser (_roku-rcp._tcp): no more results (ALL_FOR_NOW)
[2025-04-27 15:42:30] [DEBUG] [            (-1)]     mdns: Avahi Browser (_touch-remote._tcp): no more results (ALL_FOR_NOW)
[2025-04-27 15:42:36] [DEBUG] [            (-1)]     mdns: Successfully added mDNS services

从日志中可以看到以下关键信息:

OwnTone版本为28.12,使用了ffmpeg 4.3.3
mDNS(Avahi)已成功初始化
数据库已成功初始化,包含0个活跃文件和6个活跃播放列表
服务器正在监听端口3689(DAAP服务)和6600(MPD服务)
服务器名称设置为"My Music on Hiwooya"
所有必要的mDNS服务都已注册,包括:
_daap._tcp(用于iTunes/DAAP客户端)
_rsp._tcp(用于Roku设备)
_http._tcp(用于HTTP访问)
_dacp._tcp(用于远程控制)
_touch-able._tcp(用于Apple Remote应用)
_mpd._tcp(用于MPD客户端)
日志的最后一行显示:mdns: Successfully added mDNS services,这表明所有mDNS服务已成功注册。
Avahi服务正在运行:
ps | grep avahi  
1014 nobody    2240 S    avahi-daemon: registering [Hiwooya.local]  
这表明Avahi守护进程正在运行,并且正在尝试注册服务。

OwnTone服务正在监听正确的端口:

netstat -tulpn  
tcp        0      0 192.168.51.124:3689     0.0.0.0:*               LISTEN      3136/owntone  
tcp        0      0 192.168.51.124:6600     0.0.0.0:*               LISTEN      3136/owntone  
OwnTone正在192.168.51.124上监听3689端口(DAAP)和6600端口(MPD)。

mDNS服务正在运行:

udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1014/avahi-daemon:  
udp        0      0 :::5353                 :::*                                1014/avahi-daemon:  
Avahi守护进程正在监听UDP端口5353,这是mDNS使用的标准端口。