Liquidsoap 1.3.1 - 正在使用的挂载点

时间:2017-09-12 15:07:37

标签: icecast liquidsoap

当我关闭我的Icecast服务器时,有时会重新启动它,这会迫使我重新启动计算机。

日志看起来像这样

14:52:22 soap.1 | started with pid 9817
14:52:22 soap.1 | Warning: ignored expression at line 12, char 20-96.
14:52:22 soap.1 | 2017/09/12 14:52:22 >>> LOG START
14:52:22 soap.1 | 2017/09/12 14:52:22 [main:3] Liquidsoap 1.3.1 (git://github.com/savonet/liquidsoap.git@3adeff73df0cd369401c7b46caaab058ef80880b:20170608:111503)
14:52:22 soap.1 | 2017/09/12 14:52:22 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.2.3 dtools=0.3.3 duppy=0.6.0 duppy.syntax=0.6.0 cry=0.5.0 mm=0.3.0 xmlplaylist=0.1.4 lastfm=0.3.1 ogg=0.5.1 opus=0.1.2 speex=0.2.1 mad=0.4.5 flac=0.1.2 flac.ogg=0.1.2 dynlink=[distributed with Ocaml] lame=0.3.3 gstreamer=0.2.2 fdkaac=0.2.1 theora=0.3.1 bjack=0.1.5 alsa=0.2.3 ao=0.2.1 samplerate=0.1.4 taglib=0.3.3 camomile=0.8.5 faad=0.3.3 soundtouch=0.1.8 portaudio=0.2.1 pulseaudio=0.1.3 ladspa=0.1.5 dssi=0.1.2 lo=0.1.1
14:52:22 soap.1 | 2017/09/12 14:52:22 [gstreamer.loader:3] Loaded GStreamer 1.2.4 0
14:52:22 soap.1 | 2017/09/12 14:52:22 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
14:52:22 soap.1 | 2017/09/12 14:52:22 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
14:52:22 soap.1 | 2017/09/12 14:52:22 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
14:52:22 soap.1 | 2017/09/12 14:52:22 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
14:52:22 soap.1 | 2017/09/12 14:52:22 [threads:3] Created thread "generic queue #1".
14:52:22 soap.1 | 2017/09/12 14:52:22 [threads:3] Created thread "generic queue #2".
14:52:22 soap.1 | 2017/09/12 14:52:22 [threads:3] Created thread "non-blocking queue #1".
14:52:22 soap.1 | 2017/09/12 14:52:22 [threads:3] Created thread "non-blocking queue #2".
14:52:22 soap.1 | 2017/09/12 14:52:22 [ogr:3] Connecting mount ogr for source@localhost...
14:52:22 soap.1 | 2017/09/12 14:52:22 [ogr:2] Connection failed: 403, Mountpoint in use (HTTP/1.0)
14:52:22 soap.1 | 2017/09/12 14:52:22 [ogr:3] Will try again in 3.00 sec.
14:52:22 soap.1 | strange error flushing buffer ... 
14:52:22 soap.1 | strange error flushing buffer ... 
14:52:22 soap.1 | 2017/09/12 14:52:22 [threads:3] Created thread "wallclock_main" (1 total).
14:52:22 soap.1 | 2017/09/12 14:52:22 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
14:52:22 soap.1 | 2017/09/12 14:52:22 [fallback_9219:3] Switch to sine_9218.

我的猜测是,有时当它关闭时,旧的挂载点可能不会被移除。

有没有办法手动删除此挂载点,或其他一些方法来解决这个问题?

非常感谢。

1 个答案:

答案 0 :(得分:1)

有时我也会遇到同样的问题。无论出于何种原因,第一个实例都无法干净退出,并且仍在侦听安装点的addr / port组合,从而阻止了新实例绑定到该实例。您可以修复它而无需重新启动,您需要找到导致问题的过程,然后将其杀死。

例如,假设您的挂载点正在监听端口8800,则可以使用lsof命令来识别旧进程。添加-i选项并指定要为其返回结果的接口/端口,您将得到如下内容:

lsof -i:8800

COMMAND     PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
liquidsoa 30511 liquid   20u  IPv4 947691      0t0  TCP 192.168.1.5:8800 (LISTEN)

因此,这里有问题的pid是30511,如果您杀死了kill -9 30511,那么Liquidsoap应该可以正常重启。

这是涵盖的基本概念,现在让它成为一个衬里。

我们可以添加t来将简要选项添加到混合中,告诉lsof丢弃不需要的位,并仅向我们提供我们感兴趣的信息pid(s ),我们想杀死:

lsof -ti:8800

30511

我们的命令现在仅返回pid。完美,让我们用管道传输:

lsof -ti:8800 | xargs kill -9

工作完成。 lsof -ti:8800现在应该什么也不返回,并且liquidsoap / icecast /无论什么都可以正常启动。