Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

502 Bad Gateway - No streaming #19

Open
viperman1271 opened this issue Apr 14, 2019 · 7 comments
Open

502 Bad Gateway - No streaming #19

viperman1271 opened this issue Apr 14, 2019 · 7 comments

Comments

@viperman1271
Copy link

After using the latest docker image, it appears that Kerberos doesn't work. Adding an IP camera provides nothing and a message with "No stream, is the machinery running?" After using the console inside Chrome to inspect potential issues, the result was: GET http://whirlpool/stream 502 (Bad Gateway).

The docker container was created using docker run --name camera1 -p 80:80 -p 8889:8889 -d kerberos/kerberos after executing docker pull kerberos/kerberos:latest

@maleszbacsi
Copy link

I have same problem!

@cedricve
Copy link
Member

cedricve commented Jan 2, 2020

@maleszbacsi can you provide your logs, I'm not aware of an issue. So it might be you cannot connect to your IP camera properly.

@maleszbacsi
Copy link

@cedricve
I can play the RTSP stream in my VLC via internet.
`- expositors.Rectangle.region.x1 = 0

  • expositors.Rectangle.region.x2 = 800
  • expositors.Rectangle.region.y1 = 0
  • expositors.Rectangle.region.y2 = 600
  • heuristic = Sequence
  • heuristics.Counter.appearance = 3
  • heuristics.Counter.markers = 100,100|100,200|200,100|200,200
  • heuristics.Counter.maxDistance = 140
  • heuristics.Counter.minArea = 200
  • heuristics.Counter.minimumChanges = 20
  • heuristics.Counter.noMotionDelayTime = 100
  • heuristics.Counter.onlyTrueWhenCounted = true
  • heuristics.Sequence.minimumChanges = 20
  • heuristics.Sequence.minimumDuration = 2
  • heuristics.Sequence.noMotionDelayTime = 1000
  • io = Video
  • ios.Disk.directory = /etc/opt/kerberosio/capture/
  • ios.Disk.fileFormat = timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg
  • ios.Disk.markWithTimestamp = false
  • ios.Disk.privacy = false
  • ios.Disk.throttler = 0
  • ios.Disk.timestampColor = white
  • ios.GPIO.periodTime = 100000
  • ios.GPIO.periods = 1
  • ios.GPIO.pin = 17
  • ios.GPIO.throttler = 0
  • ios.MQTT.clientId =
  • ios.MQTT.password =
  • ios.MQTT.port = 1883
  • ios.MQTT.secure = false
  • ios.MQTT.server = 127.0.0.1
  • ios.MQTT.throttler = 0
  • ios.MQTT.topic = kios/mqtt
  • ios.MQTT.username =
  • ios.MQTT.verifycn = false
  • ios.Pushbullet.throttler = 10
  • ios.Pushbullet.token = o.mC5LPVCvPCphtSsEgWZQpFM86w9ciWQ3
  • ios.Pushbullet.url = https://api.pushbullet.com
  • ios.Script.path = /etc/opt/kerberosio/scripts/run.sh
  • ios.Script.throttler = 0
  • ios.TCPSocket.message = motion-detected
  • ios.TCPSocket.port = 1337
  • ios.TCPSocket.server = 127.0.0.1
  • ios.TCPSocket.throttler = 0
  • ios.Video.codec = h264
  • ios.Video.directory = /etc/opt/kerberosio/capture/
  • ios.Video.enableHardwareEncoding = true
  • ios.Video.extension = mp4
  • ios.Video.fileFormat = timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token
  • ios.Video.fps = 30
  • ios.Video.hardwareDirectory = /etc/opt/kerberosio/h264/
  • ios.Video.markWithTimestamp = false
  • ios.Video.maxDuration = 30
  • ios.Video.privacy = false
  • ios.Video.recordAfter = 5
  • ios.Video.throttler = 0
  • ios.Video.timestampColor = white
  • ios.Webhook.throttler = 0
  • ios.Webhook.url = http://localhost/api/v1/webhook
  • logging = true
  • name = frontdoor
  • stream = Mjpg
  • streams.Mjpg.enabled = true
  • streams.Mjpg.fps = 15
  • streams.Mjpg.password =
  • streams.Mjpg.quality = 75
  • streams.Mjpg.streamPort = 8889
  • streams.Mjpg.username =
  • timezone = Europe-Brussels
    02/01/2020 14:17:30.417 INFO [trivial] Logging is set to verbose
    02/01/2020 14:17:30.417 INFO [trivial] Capture: Stop capture device
    02/01/2020 14:17:30.417 INFO [trivial] Capture: Start capture device: IPCamera
    02/01/2020 14:17:30.417 INFO [trivial] Capture: Trying to open IP camera.
    02/01/2020 14:17:30.417 INFO [trivial] Capture: (Warning) You can change the capture device with the configuration files.
    02/01/2020 14:17:34.643 ERROR [trivial] OpenCV : can't open url of ip camera
    02/01/2020 14:17:37.643 INFO [trivial] Reading configuration file: /etc/opt/kerberosio/config/config.xml
    02/01/2020 14:17:37.645 INFO [trivial] Final configuration:
  • algorithm = DifferentialCollins
  • algorithms.BackgroundSubtraction.dilate = 7
  • algorithms.BackgroundSubtraction.erode = 5
  • algorithms.BackgroundSubtraction.history = 15
  • algorithms.BackgroundSubtraction.nmixtures = 5
  • algorithms.BackgroundSubtraction.ratio = 1
  • algorithms.BackgroundSubtraction.shadows = false
  • algorithms.BackgroundSubtraction.threshold = 10
  • algorithms.DifferentialCollins.erode = 5
  • algorithms.DifferentialCollins.threshold = 15
  • capture = IPCamera
  • captures.IPCamera.angle = 0
  • captures.IPCamera.delay = 500
  • captures.IPCamera.frameHeight = 720
  • captures.IPCamera.frameWidth = 1280
  • captures.IPCamera.url = rtsp://admin:******@92.249.215.209:554/onvif1
  • captures.RaspiCamera.angle = 0
  • captures.RaspiCamera.brightness = 50
  • captures.RaspiCamera.contrast = 0
  • captures.RaspiCamera.delay = 500
  • captures.RaspiCamera.frameHeight = 480
  • captures.RaspiCamera.frameWidth = 640
  • captures.RaspiCamera.framerate = 20
  • captures.RaspiCamera.saturation = 0
  • captures.RaspiCamera.sharpness = 0
  • captures.USBCamera.angle = 0
  • captures.USBCamera.delay = 500
  • captures.USBCamera.deviceNumber = 0
  • captures.USBCamera.fourcc = MJPG
  • captures.USBCamera.frameHeight = 480
  • captures.USBCamera.frameWidth = 640
  • captures.VideoCapture.angle = 0
  • captures.VideoCapture.delay = 500
  • captures.VideoCapture.frameHeight = 480
  • captures.VideoCapture.frameWidth = 640
  • captures.VideoCapture.path = 0
  • cloud = S3
  • clouds.S3.bucket =
  • clouds.S3.folder =
  • clouds.S3.privateKey =
  • clouds.S3.publicKey =
  • condition = Enabled
  • conditions.Enabled.active = false
  • conditions.Enabled.delay = 5000
  • conditions.Time.delay = 10000
  • conditions.Time.times = 0:01,23:59-0:01,23:59-0:01,23:59-0:01,23:59-0:01,23:59-0:01,23:59-0:01,23:59
  • configuration = /etc/opt/kerberosio/config/config.xml
  • expositor = Hull
  • expositors.Hull.region = 779,588|781,28|588,48|377,31|208,63|32,45|33,625|191,591|347,600|456,572|556,601|659,629
  • expositors.Rectangle.region.x1 = 0
  • expositors.Rectangle.region.x2 = 800
  • expositors.Rectangle.region.y1 = 0
  • expositors.Rectangle.region.y2 = 600
  • heuristic = Sequence
  • heuristics.Counter.appearance = 3
  • heuristics.Counter.markers = 100,100|100,200|200,100|200,200
  • heuristics.Counter.maxDistance = 140
  • heuristics.Counter.minArea = 200
  • heuristics.Counter.minimumChanges = 20
  • heuristics.Counter.noMotionDelayTime = 100
  • heuristics.Counter.onlyTrueWhenCounted = true
  • heuristics.Sequence.minimumChanges = 20
  • heuristics.Sequence.minimumDuration = 2
  • heuristics.Sequence.noMotionDelayTime = 1000
  • io = Video
  • ios.Disk.directory = /etc/opt/kerberosio/capture/
  • ios.Disk.fileFormat = timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg
  • ios.Disk.markWithTimestamp = false
  • ios.Disk.privacy = false
  • ios.Disk.throttler = 0
  • ios.Disk.timestampColor = white
  • ios.GPIO.periodTime = 100000
  • ios.GPIO.periods = 1
  • ios.GPIO.pin = 17
  • ios.GPIO.throttler = 0
  • ios.MQTT.clientId =
  • ios.MQTT.password =
  • ios.MQTT.port = 1883
  • ios.MQTT.secure = false
  • ios.MQTT.server = 127.0.0.1
  • ios.MQTT.throttler = 0
  • ios.MQTT.topic = kios/mqtt
  • ios.MQTT.username =
  • ios.MQTT.verifycn = false
  • ios.Pushbullet.throttler = 10
  • ios.Pushbullet.token = o.mC5LPVCvPCphtSsEgWZQpFM86w9ciWQ3
  • ios.Pushbullet.url = https://api.pushbullet.com
  • ios.Script.path = /etc/opt/kerberosio/scripts/run.sh
  • ios.Script.throttler = 0
  • ios.TCPSocket.message = motion-detected
  • ios.TCPSocket.port = 1337
  • ios.TCPSocket.server = 127.0.0.1
  • ios.TCPSocket.throttler = 0
  • ios.Video.codec = h264
  • ios.Video.directory = /etc/opt/kerberosio/capture/
  • ios.Video.enableHardwareEncoding = true
  • ios.Video.extension = mp4
  • ios.Video.fileFormat = timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token
  • ios.Video.fps = 30
  • ios.Video.hardwareDirectory = /etc/opt/kerberosio/h264/
  • ios.Video.markWithTimestamp = false
  • ios.Video.maxDuration = 30
  • ios.Video.privacy = false
  • ios.Video.recordAfter = 5
  • ios.Video.throttler = 0
  • ios.Video.timestampColor = white
  • ios.Webhook.throttler = 0
  • ios.Webhook.url = http://localhost/api/v1/webhook
  • logging = true
  • name = frontdoor
  • stream = Mjpg
  • streams.Mjpg.enabled = true
  • streams.Mjpg.fps = 15
  • streams.Mjpg.password =
  • streams.Mjpg.quality = 75
  • streams.Mjpg.streamPort = 8889
  • streams.Mjpg.username =
  • timezone = Europe-Brussels
    02/01/2020 14:17:37.646 INFO [trivial] Logging is set to verbose
    02/01/2020 14:17:37.646 INFO [trivial] Capture: Stop capture device
    02/01/2020 14:17:37.646 INFO [trivial] Capture: Start capture device: IPCamera
    02/01/2020 14:17:37.646 INFO [trivial] Capture: Trying to open IP camera.
    02/01/2020 14:17:37.646 INFO [trivial] Capture: (Warning) You can change the capture device with the configuration files.`

@cedricve
Copy link
Member

could be related to the dns name you provided whirlpool.. Did you tried accessing through the IP address?

@TomNeutrino
Copy link

I am having the same problem. Chromium console says "Failed to load resource: the server responded with a status of 502 stream:1 (Bad Gateway). Using a RPi4. But I can see the IP camera stream in the browser. How is kerberos.io supposed to know the cameras local network address?

@cedricve
Copy link
Member

hey @TomNeutrino, did you update the setting page? when accessing the web app you can see the settings page at the top.

@daviscodesbugs
Copy link

Experiencing the same issue. I am able to access the stream via <ip_address>/stream but every other endpoint I've tried has an nginx 502 message

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

No branches or pull requests

5 participants