我的liquidsoap音频流刚刚开始停止播放,每隔几个请求都会显示此错误消息。
Error while sending data: could not write data to host: Broken pipe in write()!
它似乎很快就可以修复,我可以重新开始播放,但是打扰很烦人。
我正在使用的liquidsoap脚本非常基本,可以从数据库中提取一些歌曲。
这是脚本。
def apply_metadata(m) =
title = m["title"]
artist = m["artist"]
log("Now playing: #{title} by #{artist}")
end
def apply_track(m) =
get_process_lines("curl http://localhost/api/v1/liquidsoap/playing")
log("actually playing")
end
def get_request() =
uri = list.hd(default="",get_process_lines("curl http://localhost/api/v1/liquidsoap/next"))
request.create(uri)
end
def my_safe(s) =
security = sine()
fallback(track_sensitive=false,[s,security])
end
s = request.dynamic(id="s",timeout=60.0,get_request)
s = on_metadata(apply_metadata,s)
s = on_track(apply_track,s)
s = crossfade(s)
s = my_safe(s)
# We output the stream to an icecast
# server, in ogg/vorbis format.
output.icecast(
%mp3(id3v2=true,bitrate=128,samplerate=44100),
host = "localhost",
port = 8000,
mount = "ogr",
s
)
这是液体肥皂的记录。
2018/09/15 17:23:04 [lang:3] Now playing: La Sirena by Banyan
2018/09/15 17:23:17 [lang:3] actually playing
2018/09/15 17:23:17 [ogr:3] Metadata update may have failed with error: 400, Bad Request (HTTP/1.0)
2018/09/15 17:23:17 [clock.wallclock_main:2] We must catchup 13.88 seconds!
2018/09/15 17:23:17 [ogr:2] Error while sending data: could not write data to host: Broken pipe in write()!
2018/09/15 17:23:17 [ogr:3] Closing connection...
2018/09/15 17:23:17 [ogr:3] Will try to reconnect in 3.00 seconds.
2018/09/15 17:23:18 [clock.wallclock_main:2] We must catchup 7.12 seconds (we've been late for 100 rounds)!
2018/09/15 17:23:21 [ogr:3] Connecting mount ogr for source@localhost...
2018/09/15 17:23:21 [ogr:3] Connection setup was successful.
我不确定为什么它会开始这样做,因为它在很长一段时间以来一直运行良好,而且我没有做任何更改。
任何建议或帮助,因为我对Liquidsoap的理解是非常基本的。
谢谢。
答案 0 :(得分:0)
在我的情况下,如果其他任何人都遇到此错误消息,则问题不在于液体肥皂本身,而是API请求花费的时间太长,并且导致调度失败。