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

Custom SSL Certificate causing restreamer to crash #425

Closed
x390 opened this issue Oct 10, 2022 · 4 comments
Closed

Custom SSL Certificate causing restreamer to crash #425

x390 opened this issue Oct 10, 2022 · 4 comments
Assignees
Labels
bug Program error or software error or software anomaly.

Comments

@x390
Copy link

x390 commented Oct 10, 2022

Restreamer crashes when attempting to use a custom ssl certificate from acme.sh.

restreamer    | ts=2022-10-10T11:27:50Z level=INFO component="Import" msg="Database import" version="v1"
restreamer    | ts=2022-10-10T11:27:50Z level=INFO component="Import" msg="Checking for database ..." version="v1"
restreamer    | ts=2022-10-10T11:27:50Z level=INFO component="Import" msg="Database doesn't exist and nothing will be imported" database="/core/config/v1.json" version="v1"
restreamer    | ts=2022-10-10T11:27:50Z level=INFO component="Core" application="datarhei-core" arch="linux/amd64" branch="main" build="2022-09-30T13:54:39Z" commit="bae68f8d31c07f403fd3ca7f350a1e0a7dbe7836" compiler="go1.18.6" license="Apache License Version 2.0" repository="https://github.com/datarhei/core" version="16.10.1"
restreamer    | ts=2022-10-10T11:27:50Z level=INFO component="HTTPS" msg="Server started" address=":8181"
restreamer    | ts=2022-10-10T11:27:50Z level=INFO component="RTMP" msg="Server started" address=":1935"
restreamer    | panic: runtime error: invalid memory address or nil pointer dereference
restreamer    |         panic: runtime error: invalid memory address or nil pointer dereference
restreamer    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xd41be5]
restreamer    | 
restreamer    | goroutine 23 [running]:
restreamer    | github.com/datarhei/core/v16/app/api.(*api).start.func7.1()
restreamer    |         /dist/core/app/api/api.go:1004 +0x25
restreamer    | panic({0xe0d420, 0x1f35480})
restreamer    |         /usr/local/go/src/runtime/panic.go:838 +0x207
restreamer    | github.com/datarhei/core/v16/app/api.(*api).start.func7()
restreamer    |         /dist/core/app/api/api.go:1012 +0xe0
restreamer    | created by github.com/datarhei/core/v16/app/api.(*api).start
restreamer    |         /dist/core/app/api/api.go:1000 +0x588c
restreamer exited with code 2

What I have tried to do to fix the issue:

  1. Setting host.name to my domain name
  2. setting host.auto to false
  3. Checking if the permissions are correct
  4. Using the openssl command from the guide in core repo
@x390 x390 added the bug Program error or software error or software anomaly. label Oct 10, 2022
@jstabenow
Copy link
Member

@x390 Should be fixed in dev image. Please try:
datarhei/restreamer:dev

Thx.

@jstabenow
Copy link
Member

@x390 does it work?

@LeXonJe
Copy link

LeXonJe commented Oct 23, 2022

Hey @jstabenow,

I've had the same issue and I can luckily report that RTMPS is working now with a custom certificate as intended using the dev release. The server doesn't crash on startup anymore.

Thank you for the fix. 😄

@LeXonJe
Copy link

LeXonJe commented Oct 23, 2022

A quick follow-up:

RTMPS is functional (Tested with OBS). However, the settings menu for rtmp is now bugged due to it saying "RTMPS server can only be enabled if TLS is enabled" when I try to save a new token, etc. I also can't edit the RTMPS or HTTPS port from the web ui. I think this is happening because "Let's Encrypt certification" is turned off. For now the workaround is to directly edit the config.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Program error or software error or software anomaly.
Projects
None yet
Development

No branches or pull requests

4 participants