【问题标题】:404 - The file you requested could not be found404 - 找不到您请求的文件
【发布时间】:2018-06-20 17:23:26
【问题描述】:

我的 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/ 中,文件名是 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 秒后重试。 奇怪的错误刷新缓冲区。 ...等等

【问题讨论】:

  • 这里没有足够的信息来解决您的问题。 Liquidsoap 的输出是什么?您是否确认已建立 TCP 连接?您是否尝试启动数据包嗅探器以查看通过网络发送的内容、验证身份验证和流数据?
  • 嗨!我更新了我的帖子并添加了 Liquidsoap 的输出

标签: icecast liquidsoap


【解决方案1】:

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

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

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

【讨论】:

    猜你喜欢
    • 2018-04-18
    • 2018-04-18
    • 2016-01-12
    • 2013-07-06
    • 2012-12-30
    • 2021-07-04
    • 2014-02-16
    • 2018-11-13
    • 1970-01-01
    相关资源
    最近更新 更多