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

Wowza restart needed ...? #7

Open
ChR-iSz opened this issue Jan 18, 2023 · 11 comments
Open

Wowza restart needed ...? #7

ChR-iSz opened this issue Jan 18, 2023 · 11 comments

Comments

@ChR-iSz
Copy link

ChR-iSz commented Jan 18, 2023

Hello,

is a wowza restart needed after renew certs ?
I have actually the problem, that i must restart wowza every time i update the certificates...

@cowanmax
Copy link

Yes, you need. You can use sh script in crontab.

@ChR-iSz
Copy link
Author

ChR-iSz commented Jan 18, 2023

Thanks for answere.

Yes, i know, but this interrupt my recordings every time...

@robymus
Copy link
Owner

robymus commented Mar 2, 2023

Oh, is a restart needed now? I haven't kept an eye on this for a while, things might have changed, but at Wowza 4.5.0 restart was not needed, when using the keymap file in the configs, only when referencing the jks files directly. That's why I created this project in the first place, I was so glad for this loophole, to update certificate without restarting.

@ChR-iSz
Copy link
Author

ChR-iSz commented Mar 2, 2023

Keymap in configs?

Do you habe a code snipped from the config part? Then i can test with the latest wowza version...

@robymus
Copy link
Owner

robymus commented Mar 2, 2023

See fragment for ssl configuration in VHost.xml with keymaps (note: this might be slightly outdated). This is Wowza's way to support multiple domains with ssl, and as a side effect it supports dymanic reloading of certs/keys when the jksmap file changes.

				<SSLConfig>
					<DomainToKeyStoreMapPath>/path/jksmap.txt</DomainToKeyStoreMapPath>
					<SSLProtocol>TLS</SSLProtocol>
					<Algorithm>SunX509</Algorithm>
					<CipherSuites></CipherSuites>
					<Protocols></Protocols>
					<AllowHttp2>false</AllowHttp2>
				</SSLConfig>

@ChR-iSz
Copy link
Author

ChR-iSz commented Mar 3, 2023

Mhh,

i see you use the DomainToKeyStoreMapPath instead KeyStorePath and KeyStorePassword.
It would be great if we could get rid of the wowza restart as it really sucks to have to restart wowza every 2 months....

Can you please show us briefly how your /path/jksmap.txt is constructed? And what is with the params:
KeyStorePassword, KeyStoreType? I don't see that in your config part...

<SSLConfig>
        <KeyStorePath>${com.wowza.wms.context.VHostConfigHome}/conf/domain.jks</KeyStorePath>
        <KeyStorePassword>SecretPasswordHere</KeyStorePassword>
        <KeyStoreType>JKS</KeyStoreType>
        <DomainToKeyStoreMapPath></DomainToKeyStoreMapPath>
        <SSLProtocol>TLS</SSLProtocol>
        <Algorithm>SunX509</Algorithm>
        <CipherSuites></CipherSuites>
        <AllowHttp2>false</AllowHttp2>
</SSLConfig>

Do you have a little HowTo ?

@ChR-iSz
Copy link
Author

ChR-iSz commented Mar 3, 2023

Edit: I found a tutorial here:

https://www.wowza.com/docs/how-to-configure-multiple-ssl-certificates-per-domain-on-a-single-host-port-sni

Okay, then last step, can you tell us, how you refresh the certificate, WITHOUT Wowza restart ?

@robymus
Copy link
Owner

robymus commented Mar 3, 2023 via email

@ChR-iSz
Copy link
Author

ChR-iSz commented Mar 3, 2023

Thanks,

I have now changed to DomainToKeyStoreMapPath instead KeyStorePath, but I don't think this should solve my problem.

Just for understanding. Even with an expired certificate, Wowza continues to record and is operable. However, I can no longer output streams via HLS.

I'm curious to see if it works now. To test it, I would just have to expire my current certificate... Let's see how I can do that...

@ChR-iSz
Copy link
Author

ChR-iSz commented Apr 17, 2023

Mhh,same issue with your SSLCOnfig. Today i got again the same issue with expired certificate.

@ChR-iSz
Copy link
Author

ChR-iSz commented Apr 17, 2023

Can you show us please your cron, to renew your cert. Looks like my issue is on the renew-hook.
If i call

/usr/local/WowzaStreamingEngine/java/bin/java -jar /usr/local/WowzaStreamingEngine/lib/wowza-letsencrypt-converter-0.1.jar -v /usr/local/WowzaStreamingEngine/conf/ /etc/letsencrypt/live/manually, i don't need a wowza restart.

Here is my cron.d/certbot:
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --renew-hook '/usr/local/WowzaStreamingEngine/java/bin/java -jar /usr/local/WowzaStreamingEngine/lib/wowza-letsencrypt-converter-0.1.jar -v /usr/local/WowzaStreamingEngine/conf/ /etc/letsencrypt/live/'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants