kerberos-io / kerberos-docker

Run Kerberos Open Source inside a docker container.
http://doc.kerberos.io/opensource/installation#docker
103 stars 31 forks source link

Dashboard does not show stream, if host streaming port set to anything other than 8889 #36

Closed Obezyana33 closed 2 years ago

Obezyana33 commented 2 years ago

Intro:

I am a subscribed member, with seven cameras currently streaming to kerberos-cloud. I use Podman on RHEL8, with SELINUX enabled.

Issue:

When I configure a single camera and map internal port 8889 to external port 8889, I am able to both see the stream on http://SERVER:8889 and via the Dashboard screen of the web app.

eg. (stream works on port 8889 and in Dashboard)

podman create --name=kerberos-camera5 \
    -p 80:80 \
    -p 8889:8889 \
    --security-opt label=type:kerberos.process \
    -v "/opt/kerberos-camera5/config":"/etc/opt/kerberosio/config":Z \
    -v "/XFS0/kerberos-camera5/capture":"/etc/opt/kerberosio/capture":Z \
    -v "/opt/kerberos-camera5/logs":"/etc/opt/kerberosio/logs":Z \
    -v "/opt/kerberos-camera5/webconfig":"/var/www/web/config":Z \
    docker.io/kerberos/kerberos:latest 

BUT when I set the streaming port to something else (eg. 8885), I am able to see the stream on http://SERVER:8885, but the stream never loads on the dashboard:

eg. (stream works only via port 8885)

podman create --name=kerberos-camera5 \
    -p 85:80 \
    -p 8885:8889 \
    --security-opt label=type:kerberos.process \
    -v "/opt/kerberos-camera5/config":"/etc/opt/kerberosio/config":Z \
    -v "/XFS0/kerberos-camera5/capture":"/etc/opt/kerberosio/capture":Z \
    -v "/opt/kerberos-camera5/logs":"/etc/opt/kerberosio/logs":Z \
    -v "/opt/kerberos-camera5/webconfig":"/var/www/web/config":Z \
    docker.io/kerberos/kerberos:latest 

This issue will affect anyone with more than one camera, who is separating container access by port (as per the documentation).

Workaround

I found that if persistent storage has been configured, then the following workaround can be used:

  1. Assuming that the desired streaming port is 8885, the host and container ports are both be set to 8885:
    podman create --name=kerberos-camera5 \
    -p 85:80 \
    -p 8885:8885 \
    --security-opt label=type:kerberos.process \
    -v "/opt/kerberos-camera5/config":"/etc/opt/kerberosio/config":Z \
    -v "/XFS0/kerberos-camera5/capture":"/etc/opt/kerberosio/capture":Z \
    -v "/opt/kerberos-camera5/logs":"/etc/opt/kerberosio/logs":Z \
    -v "/opt/kerberos-camera5/webconfig":"/var/www/web/config":Z \
    docker.io/kerberos/kerberos:latest 
  2. The container's /etc/opt/kerberosio/config/stream.xml configuration file is modified as follows:
    # Change this:
    <streamPort type="number">8889</streamPort>
    # To this:
    <streamPort type="number">8885</streamPort>
  3. Restart the container and both the 8885 stream and Dashboard stream will now work.
cedricve commented 2 years ago

Exactly @Obezyana33 we will overcome this issue in Open Source v3. Thanks for reporting your solution!

Obezyana33 commented 2 years ago

When can we expect v3? ;-)

cedricve commented 2 years ago

Q1 - January we will make our first stable release. So not very soon, but it will be an amazing improvement. That’s for sure.

On 14 Jul 2021, at 07:14, Obezyana33 @.***> wrote:

When can we expect v3? ;-)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kerberos-io/kerberos-docker/issues/36#issuecomment-879597155, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZUGYDZUDAKXRKAESWL33TXUMLJANCNFSM5AKV6DJQ.

Obezyana33 commented 2 years ago

Very much looking forward to it!