404 - 找不到您请求的文件

时间:2018-01-11 11:33:40

标签: icecast liquidsoap

我的icecast2服务器正在运行,我可以看到我的管理员。我的配置文件也使用普通的挂载设置。我的源客户端是liquidsoap,这是我的代码:

#!/usr/bin/liquidsoap
# Log dir
set("log.file.path","/var/log/liquidsoap/basic-radio.log")

jazz = playlist("/var/www/html/stream/audio/mp3/jazz")
popular = playlist.safe("/var/www/html/stream/audio/mp3/popular-music")

radio = fallback(
  [ switch(
  [
  ({ 0h-12h }, jazz),
  ({ 12h01-23h59 }, popular),
  ]),
  jazz])

#radio = random(weights=[1,5],[ jazz, radio ])

# Stream it out
output.icecast(%mp3,
host = "18.221.199.44", port = 8000,
, mount = "ssp-radio",
radio)

我的.liq文件位于/ etc / liquidsoap /中,filename是radio.liq

但是当我尝试从浏览器加载我的http://someserver.com:8000/ssp-radio时出现错误“404 - 找不到您请求的文件!”

我也在错误日志中找到了这些:

[2018-01-10  11:49:21] INFO fserve/fserve_client_create checking for 
file /icecast.png (/etc/icecast2/web/icecast.png)
[2018-01-10  11:49:21] WARN fserve/fserve_client_create req for file 
"/etc/icecast2/web/icecast.png" No such file or directory
[2018-01-10  11:49:23] INFO fserve/fserve_client_create checking for 
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10  17:09:13] INFO fserve/fserve_client_create checking for 
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10  17:22:26] INFO fserve/fserve_client_create checking for 
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10  17:22:28] INFO fserve/fserve_client_create checking for 
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10  18:16:04] INFO sighandler/_sig_die Caught signal 15, 
shutting down...
[2018-01-10  18:16:04] INFO main/main Shutting down
[2018-01-10  18:16:04] INFO fserve/fserve_shutdown file serving stopped
[2018-01-10  18:16:05] INFO slave/_slave_thread shutting down current 
relays
[2018-01-10  18:16:05] INFO slave/_slave_thread Slave thread shutdown 
complete
[2018-01-10  18:16:05] INFO auth/auth_shutdown Auth shutdown
[2018-01-10  18:16:05] INFO yp/yp_shutdown YP thread down
[2018-01-10  18:16:05] INFO stats/stats_shutdown stats thread finished
[2018-01-10  18:16:05] INFO auth/auth_run_thread Authenication thread 
shutting down

当我尝试加载这个时:http://some-ip:8000/admin/listclients?mount=/ssp-radio 它说:     400 - 来源不存在

它正在循环,我无法停止服务器,所以我需要退出终端

这是什么意思?我的管理员中也没有列出挂载点。请帮忙。感谢

更新: 这是liquidsoap的输出:

2018/01/15 13:08:15 [popular-music:3] Successfully loaded a playlist of 
23 tracks.
2018/01/15 13:08:15 [jazz:3] Prepared 
"/var/www/html/mediafiles/audio/jazz/1-14_Let_Me_Be_The_One.mp3" (RID 
3).
2018/01/15 13:08:15 [tea-media:3] Connecting mount tea-media for 
source@my-server-ip-here...
2018/01/15 13:08:15 [tea-media:2] Connection failed: 403, Forbidden 
(HTTP/1.0)
2018/01/15 13:08:15 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer ... 
strange error flushing buffer ... 
2018/01/15 13:08:15 [threads:3] Created thread "wallclock_main" (1 
total).
2018/01/15 13:08:15 [clock.wallclock_main:3] Streaming loop starts, 
synchronized with wallclock.
2018/01/15 13:08:15 [fallback_4970:3] Switch to random_4968.
2018/01/15 13:08:15 [random_4968:3] Switch to jazz.
2018/01/15 13:08:19 [tea-media:3] Connecting mount tea-media for 
source@my-server-ip-here...
2018/01/15 13:08:19 [tea-media:2] Connection failed: 403, Forbidden 
(HTTP/1.0)
2018/01/15 13:08:19 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer ... 
strange error flushing buffer ... 
2018/01/15 13:08:23 [tea-media:3] Connecting mount tea-media for 
source@my-server-ip-here...
2018/01/15 13:08:23 [tea-media:2] Connection failed: 403, Forbidden 
(HTTP/1.0)
2018/01/15 13:08:23 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer ... 
strange error flushing buffer ... 
2018/01/15 13:08:27 [tea-media:3] Connecting mount tea-media for 
source@my-server-ip-here...
2018/01/15 13:08:27 [tea-media:2] Connection failed: 403, Forbidden 

(HTTP / 1.0)     2018/01/15 13:08:27 [tea-media:3]将在3.00秒后再试一次。     奇怪的错误刷新缓冲区。     ......等等

1 个答案:

答案 0 :(得分:0)

从液体日志中可以看出,它显然无法连接:

2018/01/15 13:08:19 [tea-media:2] Connection failed: 403, Forbidden (HTTP/1.0)

很可能你在liquidsoap中提供了错误的用户名或密码,因此liquidsoap无法连接到Icecast服务器。 确保使用正确的源身份验证用户名(通常为source)和密码(在icecast.xml中配置为源密码)。