Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows service installing #907

Closed
Vulkanov opened this issue Aug 5, 2019 · 25 comments
Closed

Windows service installing #907

Vulkanov opened this issue Aug 5, 2019 · 25 comments
Assignees
Milestone

Comments

@Vulkanov
Copy link

Vulkanov commented Aug 5, 2019

Good day!
I want to thank the developers for a great product!

In the process of using it, I felt the need to use Windows-based bootstrap. The question is - how can I install windows service? I tried to install using this command:
liquidsoap.exe --install-service --service-name LiquidSoap --service-title "LiquidSoap Service" "C:\Program Files\LiquidSoap\config.liq"

The service is installed, but it starts and stops immediately. He does not see the config.lic file.
I could not find documentation for windows. Please tell me what I'm doing wrong. Thank! Have a nice day!

@Vulkanov Vulkanov added the usage label Aug 5, 2019
@toots toots self-assigned this Aug 5, 2019
@toots
Copy link
Member

toots commented Aug 6, 2019

Hi! Thanks for your feedback and appreciation!

I haven't looked at this part of the system for a while but it looks like you're doing it right. Do you get any log of the error?

@Vulkanov
Copy link
Author

Vulkanov commented Aug 7, 2019

Hi! Thanks for the answer!
Likuidsoap does not write any logs at the start of the service. Only the system window is displayed, which says that the service was started and stopped immediately.
Logs are written if I run it manually, not as a service. Also, if I run it not as a service, then everything works fine.
image

@epstenderup
Copy link

I'm having the same problem on my Windows machine. It starts and stops immediately! Any help would be greatly appreciated! Thanksssss.

@toots toots added this to the 1.4.0 milestone Aug 10, 2019
@toots
Copy link
Member

toots commented Aug 10, 2019

I'm putting this on my TODO for the next release!

@toots
Copy link
Member

toots commented Aug 12, 2019

Hi there,

Do you have any details about the script that y'all are trying to launch? I tried locally with a dummy script and it worked.

Additionally, you could try with the following script:

output.dummy(noise())

and see if it works for y'all as well..

@toots
Copy link
Member

toots commented Aug 26, 2019

Hey guys! Liquidsoap 1.4.0-rc1 is available now with a fresh windows build: https://github.com/savonet/liquidsoap/releases/tag/1.4.0-rc1

Would you be able to give it a quick try and see if you can send me steps to reproduce the issue? I would love to fix it for the final release..

@toots
Copy link
Member

toots commented Sep 8, 2019

Hey guys! Last call to fix this bug before 1.4.0 gets out! Would love to fix it but I can't do it without more information. Let me know!

@tzumbrunnen
Copy link

Just tested the windows version in a CMD. while my .liq script worked in 1.3.7 I get
Fatal error: exception Invalid_argument("Sys.signal: unavailable signal") in 1.4.0.RC1

@Vulkanov
Copy link
Author

Vulkanov commented Sep 9, 2019

Hi!
This is my script. It works fine from CMD.

set("log.stdout",true)
set("log.file",true)
set("frame.audio.samplerate",48000)
set("audio.converter.samplerate.libsamplerate.quality","best")
set("init.allow_root",true)
set("init.daemon",true)

# A HTTP input
s = input.http("http://192.168.3.21:8000/tech_192")

# An output to the local soundcard
#output.ao(fallible=true,s)


# An icecast output in AAC+ format
output.icecast(%fdkaac(bitrate=64, samplerate=48000),
              fallible=true,
	      host="192.168.3.21",
	      port=8000,
	      password="password",
              mount="test",
              s)

I also tried a test script. With it, the service also starts and stops immediately.

output.dummy(noise())

Thanks for answers!

@Vulkanov
Copy link
Author

Vulkanov commented Sep 9, 2019

I tried 1.4.0-rc1, it does not work at all with this version. Even from CMD

@toots
Copy link
Member

toots commented Sep 9, 2019

Thks guys. I think @tzumbrunnen's issue seems pretty clear, I should be able to fix it soon and send y'all a new build to try. Much appreciated!

@toots
Copy link
Member

toots commented Sep 14, 2019

Hi all! I've updated the 1.4.0-rc1 release with a fixed build for windows: https://github.com/savonet/liquidsoap/releases/tag/1.4.0-rc1

Would you guys mind trying it ? I think the best would be test the service install with:

  • A minimal script like: output.dummy(noise())
  • Your own script
    And report. If it works for the minimal script but not for your script, it would help a lot to include it, or as much as you can of it so I can try to reproduce on my end and see if I can fix.

Thanks for the help y'all!

@tzumbrunnen
Copy link

tzumbrunnen commented Sep 14, 2019

@toots I just tested my own simple transcoding script in a CMD which worked in 1.3.7

1. Transcoding a 192kbit mp3 to output.icecast(%mp3(msg="",mono=true,bitrate=64) returns the following output/errors :
C:\Users\zumbi>E:__downloads\liquidsoap-1.4.0-rc1-win64\liquidsoap.exe D:\nextcloud\Applikations\liquidsoap-1.4.0-rc1\SWATCH_TEST.liq
Warning: illegal backslash escape in string.
2019/09/14 09:45:04 >>> LOG START
2019/09/14 09:45:04 [main:3] Liquidsoap 1.4.0+git@259cb26
2019/09/14 09:45:04 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.4.1 sedlex=2.1 menhirLib=20181113 dtools=0.4.0 duppy=0.8.0 cry=0.6.4 mm=0.5.0 ogg=0.5.2 vorbis=0.7.1 opus=0.1.2 speex=0.2.1 mad=0.4.6 flac=0.1.5 flac.ogg=0.1.5 dynlink=[distributed with Ocaml] lame=0.3.3 gstreamer=0.3.0 theora=0.3.1 ao=0.2.1 samplerate=0.1.4 taglib=0.3.5 ssl=0.5.9 camomile=1.0.1 yojson=1.6.0 faad=0.4.0 portaudio=0.2.1 winsvc=0.1.1
2019/09/14 09:45:04 [main:3]
2019/09/14 09:45:04 [main:3] DISCLAIMER: This version of Liquidsoap has been
2019/09/14 09:45:04 [main:3] compiled from a snapshot of the development code.
2019/09/14 09:45:04 [main:3] As such, it should not be used in production
2019/09/14 09:45:04 [main:3] unless you know what you are doing!
2019/09/14 09:45:04 [main:3]
2019/09/14 09:45:04 [main:3] We are, however, very interested in any feedback
2019/09/14 09:45:04 [main:3] about our development code and committed to fix
2019/09/14 09:45:04 [main:3] issues as soon as possible.
2019/09/14 09:45:04 [main:3]
2019/09/14 09:45:04 [main:3] If you are interested in collaborating to
2019/09/14 09:45:04 [main:3] the development of Liquidsoap, feel free to
2019/09/14 09:45:04 [main:3] drop us a mail at savonet-devl@lists.sf.net
2019/09/14 09:45:04 [main:3] or to join the slack chat at http://slack.liquidsoap.info.
2019/09/14 09:45:04 [main:3]
2019/09/14 09:45:04 [main:3] Please send any bug report or feature request
2019/09/14 09:45:04 [main:3] at https://github.com/savonet/liquidsoap/issues.
2019/09/14 09:45:04 [main:3]
2019/09/14 09:45:04 [main:3] We hope you enjoy this snapshot build of Liquidsoap!
2019/09/14 09:45:04 [main:3]
2019/09/14 09:45:04 [gstreamer.loader:3] Loaded GStreamer 1.16.0 0
2019/09/14 09:45:04 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2019/09/14 09:45:04 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2019/09/14 09:45:04 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2019/09/14 09:45:04 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2019/09/14 09:45:04 [sandbox:3] Could not find binary bwrap, disabling sandboxing..
2019/09/14 09:45:04 [video.converter:3] Couldn't find preferred video converter: gavl.
2019/09/14 09:45:04 [audio.converter:3] Using preferred samplerate converter: libsamplerate.
2019/09/14 09:45:04 [DMD2TEST:3] Connecting mount 20minuten.radio.128k.mp3 for source@device01.dmd2.ch...
2019/09/14 09:45:05 [DMD2TEST:3] Connection setup was successful.
2019/09/14 09:45:05 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2019/09/14 09:45:05 [DMD2TEST:3] Source failed (no more tracks) stopping output...
strange error flushing buffer ...
strange error flushing buffer ...
2019/09/14 09:45:05 [DMD2TEST:3] Closing connection...
2019/09/14 09:45:05 [decoder:3] Method "MAD" accepted "audio/mpeg".
2019/09/14 09:45:05 [http_8045:3] Decoding...
2019/09/14 09:45:05 [http_8045:3] New metadata chunk: ? -- Sara Bareilles - I Didn't Plan It..
2019/09/14 09:45:05 [DMD2TEST:3] Connecting mount 20minuten.radio.128k.mp3 for source@device01.dmd2.ch...
2019/09/14 09:45:05 [DMD2TEST:3] Connection setup was successful.
2019/09/14 09:45:05 [http_8045:3] Incorrect stream type!
2019/09/14 09:45:05 [DMD2TEST:3] Source failed (no more tracks) stopping output...
strange error flushing buffer ...
strange error flushing buffer ...
2019/09/14 09:45:05 [DMD2TEST:3] Closing connection...
2019/09/14 09:45:05 [http_8045:2] Feeding stopped: the decoded stream was not of the right type. The typical situation is when you expect a stereo stream whereas the stream is mono (in this case the situation can easily be solved by using the audio_to_stereo operator to convert the stream to a stereo one).
2019/09/14 09:45:07 [decoder:3] Method "MAD" accepted "audio/mpeg".
2019/09/14 09:45:07 [http_8045:3] Decoding...
2019/09/14 09:45:07 [http_8045:3] New metadata chunk: ? -- Sara Bareilles - I Didn't Plan It..
2019/09/14 09:45:07 [DMD2TEST:3] Connecting mount 20minuten.radio.128k.mp3 for source@device01.dmd2.ch...
2019/09/14 09:45:07 [DMD2TEST:3] Connection setup was successful.
2019/09/14 09:45:07 [http_8045:3] Incorrect stream type!
2019/09/14 09:45:07 [DMD2TEST:3] Source failed (no more tracks) stopping output...
strange error flushing buffer ...
strange error flushing buffer ...
2019/09/14 09:45:07 [DMD2TEST:3] Closing connection...

2. Transcoding a 192kbit mp3 to output.icecast(%fdkaac(channels=2,bitrate=48) returns the following output/errors :
C:\Users\zumbi>E:__downloads\liquidsoap-1.4.0-rc1-win64\liquidsoap.exe D:\nextcloud\Applikations\liquidsoap-1.4.0-rc1\SWATCH_TEST.liq
Warning: illegal backslash escape in string.
At line 32, char 15-45:
Error 12: Unsupported format!
You must be missing an optional dependency.

where as line 32 start with : output.icecast(%fdkaac(channels=2,bitrate=48)

here's the scripts :
channelid = "TEST"
channelname = "test.radio.128k"
channelurl1 = "https://test.fm"
availcheck = "LPOppVSMug"

set("log.stdout",true)
set("log.file.append",false)
set("log.file",true)
set("log.file.path","E:#{channelid}.txt")
set("log.level",3)

s = (input.http("http://ip:8080/test_region4_hi"))
output.icecast(%mp3(msg="",mono=true,bitrate=64),name=channelid,url=channelurl1,fallible=true,description=channelid,genre="#{availcheck}",mount="#{channelname}.mp3",host="device01.test.ch",port=80,password="test",s)
output.icecast(%fdkaac(channels=2,bitrate=48),name=channelid,url=channelurl1,fallible=true,description=channelid,genre="#{availcheck}",mount="#{channelname}.aacp",host="device01.test.ch",port=80,password="test",s)

@toots
Copy link
Member

toots commented Sep 17, 2019

Hi @tzumbrunnen ! Thanks for testing. Your first issue, with %mp3, is a script issue I believe, you should use mean on your source to make sure that it is converted to mono.

The second issue was because fdkaac was missing from the build. I've just added it back and uploaded a new build so this one should be fixed as well now.

Let me know if that helps!

@tzumbrunnen
Copy link

@toots uuuuh - Sorry you're right the I missed monosource = mean (s) . mp3 and fdkaac works now. but only if i uncomment the log.file.path. I get the following error If I set set("log.file.path","Z:\temp\test.log")

C:\Users\zumbi>Z:__downloads\liquidsoap-1.4.0-rc1-win64\liquidsoap.exe C:\Users\zumbi\nextcloud\SWATCH_TEST.liq
init: exception encountered during start phase:
Sys_error("Z:\temp\test.log: Invalid argument")

I seems like LIQ is not able to write the log file. which works on 1.3.7

@toots
Copy link
Member

toots commented Sep 19, 2019

Are you sure that the path exits? I just tested this script:

set("log.file.path","C:\\Users\\IEUser\\Desktop\\liquidsoap-1.4.0-rc1-win64\\liq.log")

output.dummy(noise())

And it worked..

With 1.4.0 you need the double \\ but it also worked with single \ though it raised a warning. Have you tried a different path for the log file?

@tzumbrunnen
Copy link

I was not aware that we need a \\ starting from 1.4.0 , since it was working in the previouse version Anway, Log writing works now.

Nevertheless the following output will stop the liq file if %fdaac is used.
Input is a 192kbit mp3 stereo
s = (input.http("http://<domain>:8080/test_region4_hi"))

output.icecast(%fdkaac(channels=2,bitrate=48),name=channelid,url=channelurl1,fallible=true,description=channelid,genre="#{availcheck}",mount="#{channelname}.aacp",host="<domain>",port=80,password="PASSWORD",s)

@toots
Copy link
Member

toots commented Sep 22, 2019

@tzumbrunnen What's the log of the issue? If that's a separate issue, it would be nice to fill a secondary ticket with logs and description of the problem. My concern here is to know if the service install mechanism is working 😉

@tzumbrunnen
Copy link

the log issue seems to be solved. I'll open another ticket for the %fdaac i'm currently facing. thanx anway.

@toots
Copy link
Member

toots commented Sep 22, 2019

Ok thanks. How's the service install part? Is it working for you?

@yogur
Copy link

yogur commented Feb 14, 2020

@toots Service install is still not working for me.

Service gets installed but is not running. If I start it manually from Windows services it stops immediately.

liquidsoap.exe --install-service --service-name "Radio" --service-title "Radio" radio.liq

If I run the file radio.liq from cmd it works fine.

I'm using version 1.4.0 for win64 from releases.

@toots
Copy link
Member

toots commented Jul 5, 2020

Hi there! I'd like to try to fix that again for 1.4.3. We now have windows build for each commit on the pre-release branch so testing should be easier! Would y'all be able to grab the latest build at https://github.com/savonet/liquidsoap/releases/tag/v1.4.3-pre-release and confirm that service install doesn't work with it? Thanks!

@toots toots modified the milestones: 1.4.1, 1.4.3 Jul 23, 2020
@tzumbrunnen
Copy link

Just tested this with the latest 1.4.3. Pre as of today.
Service gets installed but is not running. If I start it manually from Windows services it stops immediately. No log Files written.
Input
D:\nextcloud\Applikations\liquidsoap-v1.4.3-pre-release-win64\liquidsoap.exe --install-service --service-name LiquidSoaptest --service-title "LiquidSoap Test" "D:\nextcloud\Applikations\liquidsoap-v1.4.3-pre-release-win64\20min_transcode_2nd.liq"
Output
Installed LiquidSoaptest service with arguments --run-service --service-name LiquidSoaptest --service-title LiquidSoap Test D:\nextcloud\Applikations\liquidsoap-v1.4.3-pre-release-win64\20min_transcode_2nd.liq

@toots
Copy link
Member

toots commented Aug 10, 2020

Quick update on this one: I can reproduce and I have a way to make test builds. Hopefully I should be able to get to the bottom of this soon.

@toots
Copy link
Member

toots commented Aug 14, 2020

Good news, this should be fixed with 705ac36!

@toots toots closed this as completed Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants