-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Git cloned latest version of rtsp2mjpg, modified docker-compose.yaml:
version: '3'
services:
rtsp2mjpg:
image: eroji/rtsp2mjpg
restart: always
expose:
- "8090"
volumes:
- /etc/localtime:/etc/localtime:ro
# Uncomment below if you want to override default ffserver.conf
# - ./ffserver.conf:/etc/ffserver.conf:ro
environment:
# Override the env vars below as needed
RTSP_URL: rtsp://192.168.1.116:8554/unicast
FFSERVER_LOG_LEVEL: error
FFMPEG_LOG_LEVEL: warning
FFMPEG_INPUT_OPTS: -use_wallclock_as_timestamps 1
FFMPEG_OUTPUT_OPTS: -async 1 -vsync 1
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8090/still.jpg --max-time 1 --outpu interval: 15s
timeout: 1s
retries: 3
logging:
options:
max-size: "10m"
max-file: "3"
nginx:
image: nginx:alpine
restart: always
links:
- rtsp2mjpg
ports:
- "8082:8082"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
# - ./nginx/default.conf:/etc/nginx/nginx.conf:ro
I changed "ports" to 8082 because at 80 kept getting this error:
ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on endpoint rtsp2mjpg_nginx_1 (fec7b0b159d1b48ea6db91d705266526e52642f61c8ac0997de657f19052e6d6): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.
Also tried to modify nginx/default.conf because /etc/nginx/nginx.conf is actually where my nginx.conf file is located. This generated errors so switched back to default.
root@ToshibaWin7-Ubuntu:/home/ron/docker/rtsp2mjpg# docker-compose up
Starting rtsp2mjpg_rtsp2mjpg_1 ... done
Recreating rtsp2mjpg_nginx_1 ... done
Attaching to rtsp2mjpg_rtsp2mjpg_1, rtsp2mjpg_nginx_1
nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: using the "epoll" event method
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: nginx/1.21.1
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: built by gcc 10.3.1 20210424 (Alpine 10.3.1_git20210424)
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: OS: Linux 5.8.0-59-generic
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: start worker processes
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: start worker process 24
nginx_1 | 2021/07/12 21:17:02 [notice] 1#1: start worker process 25
rtsp2mjpg_1 | Past duration 0.691490 too large
rtsp2mjpg_1 | Past duration 0.720833 too large
rtsp2mjpg_1 | Past duration 0.629829 too large
rtsp2mjpg_1 | Past duration 0.859993 too large
rtsp2mjpg_1 | Past duration 0.990318 too large
The "past duration too large" warning just repeats itself without end.
Project appears to be running, but cannot access stream via browser. Also tried these commands:
root@ToshibaWin7-Ubuntu:/home/ron/docker/rtsp2mjpg# curl -f http://localhost:8090/still.jpg
curl: (7) Failed to connect to localhost port 8090: Connection refused
root@ToshibaWin7-Ubuntu:/home/ron/docker/rtsp2mjpg# curl -f http://localhost:8082/still.jpg
curl: (56) Recv failure: Connection reset by peer
Tested rtsp://192.168.1.116:8554/unicast in vlc and it is up and running.
Any suggestions?