connect ECONNREFUSED 127.0.0.1:8554 - Reolink - RPi2



  • Hi

    I’ve set up a Raspberry Pi 2 as a proxy server for my Reolink RLC-410. I’ve installed the gateway and everything seems fine during the installation but whenever I try to connect to my camera I get the following error: PROXY ENDPOINT ERROR; Error: connect ECONNREFUSED 127.0.0.1:8554.

    I’ve tried the following command and found that port 8554 is not listening.

    pi@raspberrypi:/etc $ nc -zv 127.0.0.1 8554
    nc: connect to 127.0.0.1 port 8554 (tcp) failed: Connection refused

    Any ideas how to fix this?

    Here’s the full message:

    <<TAIL>> LOG FOR THE [MONOCLE-GATEWAY] SERVICE
    – Logs begin at Thu 2016-11-03 17:16:43 GMT. –
    Sep 26 20:36:59 raspberrypi systemd[1]: Started Monocle Gateway Service.
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: ***************************** *************************************
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: * __ __ ___ _ _ ___ ___ _ ___ *
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: * | / |/ _ | \ | |/ _ \ / | | | | *
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: * | |/| | (
    ) | . ` | (
    ) | (
    | || | *
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: * |
    | |
    |_
    /|| _|_/ _|_|| *
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: * *
    Sep 26 20:37:11 raspberrypi monocle-gateway[276]: ***************************** *************************************
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: MONOCLE RUNTIME ENVIRONMENT
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: VERSION = 0.0.3
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: OS/ARCH = linux/arm
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: PROCESS = monocle-gateway (P ID=276)
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: TIMESTAMP = 2018-09-26T19:37:3 9.186Z
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: MONOCLE GATEWAY SERVICE (Version: 0.0.3)
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: [Monocle Starting]
    Sep 26 20:37:39 raspberrypi monocle-gateway[276]: [Monocle Connecting]
    Sep 26 20:37:40 raspberrypi monocle-gateway[276]: [Monocle Started]
    Sep 26 20:37:40 raspberrypi monocle-gateway[276]: [RTSP Server Starting]
    Sep 26 20:37:40 raspberrypi monocle-gateway[276]: [RTSP Server Listening] 0.0.0. 0:8555 (RTSP)
    Sep 26 20:37:40 raspberrypi monocle-gateway[276]: [RTSP Server Listening] 0.0.0. 0:443 (RTSP-TLS)
    Sep 26 20:37:41 raspberrypi monocle-gateway[276]: [RTSP Proxy Started] (PID=510)
    Sep 26 20:37:41 raspberrypi monocle-gateway[276]: [RTSP Server Listening] 0.0.0. 0:8554 (PROXY)
    Sep 26 20:37:41 raspberrypi monocle-gateway[276]: [RTSP Server Started]
    Sep 26 20:37:41 raspberrypi monocle-gateway[276]: [RTSP Proxy Stopped] CODE=0; S IGNAL=SIGSEGV
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: [Monocle Connected]
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: [RTSP Server Registered]
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: MONOCLE RTSP SERVICE - INITIAL IZED
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: FQDN = 06786b17-10bf-47ee-99ae -8e261e5950fc.mproxy.io
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: HOST = 192.168.0.101
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: PORT = 443
    Sep 26 20:37:42 raspberrypi monocle-gateway[276]: ------------------------------ -------------------

    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: INITIALIZE RTSP STREAM: Garde n
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - NAME : Garden
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - LABEL : PRIMARY
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - URL : rtsp://192.168.0.10 0:554/h264Preview_01_sub
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - UUID : STREAM:49bedb9b-896 3-4ed9-a9ac-a8ce57618a29
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - SESS : e104067d-ea39-47d3- 8450-ead70e4fba97
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - MODIF : Wed Sep 26 2018 19: 59:11 GMT+0100 (BST)
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: - TAGS : @proxy
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: ------------------------------ -------------------
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:24.793Z [INFO ] [RTSP PROXY] REGISTERING STREAM [Garden/PRIMARY]; (STREAM:49bedb9b-8963-4ed9- a9ac-a8ce57618a29)
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:24.846Z [ERRO R] Uncaught Exception connect ECONNREFUSED 127.0.0.1:8554
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: [ ‘Uncaught Exception’, ‘conne ct ECONNREFUSED 127.0.0.1:8554’ ]
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:24.901Z [ERRO R] Error: connect ECONNREFUSED 127.0.0.1:8554
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: [ { Error: connect ECONNREFUSE D 127.0.0.1:8554
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: at Object._errnoException (util.js:1031:13)
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: at _exceptionWithHostPort (util.js:1052:20)
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: at TCPConnectWrap.afterCon nect [as oncomplete] (net.js:1195:14)
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: errno: ‘ECONNREFUSED’,
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: code: ‘ECONNREFUSED’,
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: syscall: ‘connect’,
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: address: ‘127.0.0.1’,
    Sep 26 20:55:24 raspberrypi monocle-gateway[276]: port: 8554 } ]

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:27.304Z [INFO ] [192.168.0.50:60861 <BkvVVPYFX>] RTSP CLIENT SOCKET CONNECTED

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:27.413Z [INFO ] [192.168.0.50:60861 <BkvVVPYFX>] RTSP CLIENT ATTACHED TO STREAM: Garden (STRE AM:49bedb9b-8963-4ed9-a9ac-a8ce57618a29)

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:27.497Z [ERRO R] [192.168.0.50:60861 <BkvVVPYFX>] [RTSP ENDPOINT SOCKET ERROR] [192.168.0.50:6 0861 <BkvVVPYFX>] Error: connect ECONNREFUSED 127.0.0.1:8554
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: [ ‘[192.168.0.50:60861 <BkvVVP YFX>]’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: ‘[RTSP ENDPOINT SOCKET ERROR ]’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: ‘[192.168.0.50:60861 <BkvVVP YFX>]’,

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: { Error: connect ECONNREFUSE D 127.0.0.1:8554
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: at Object._errnoException (util.js:1031:13)
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: at _exceptionWithHostPort (util.js:1052:20)
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: at TCPConnectWrap.afterCon nect [as oncomplete] (net.js:1195:14)
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: errno: ‘ECONNREFUSED’,

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: code: ‘ECONNREFUSED’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: syscall: ‘connect’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: address: ‘127.0.0.1’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: port: 8554 } ]
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:27.527Z [ERRO R] PROXY ENDPOINT ERROR; Error: connect ECONNREFUSED 127.0.0.1:8554
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: [ ‘PROXY ENDPOINT ERROR;’,

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: { Error: connect ECONNREFUSE D 127.0.0.1:8554
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: at Object._errnoException (util.js:1031:13)
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: at _exceptionWithHostPort (util.js:1052:20)
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: at TCPConnectWrap.afterCon nect [as oncomplete] (net.js:1195:14)

    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: errno: ‘ECONNREFUSED’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: code: ‘ECONNREFUSED’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: syscall: ‘connect’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: address: ‘127.0.0.1’,
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: port: 8554 } ]
    Sep 26 20:55:27 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:27.531Z [INFO ] [192.168.0.50:60861 <BkvVVPYFX>] RTSP ENDPOINT SOCKET CLOSED [192.168.0.50:60 861 <BkvVVPYFX>]

    Sep 26 20:55:57 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:57.388Z [WARN ] [192.168.0.50:60861 <BkvVVPYFX>] RTSP CLIENT SOCKET TIMEOUT
    Sep 26 20:55:57 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:57.425Z [INFO ] [192.168.0.50:60861 <BkvVVPYFX>] RTSP CLIENT SOCKET CLOSED
    Sep 26 20:55:57 raspberrypi monocle-gateway[276]: 2018-09-26T19:55:57.431Z [INFO ] [192.168.0.50:60861 <BkvVVPYFX>] RTSP CLIENT DETACHED FROM STREAM: Garden (ST REAM:49bedb9b-8963-4ed9-a9ac-a8ce57618a29)



  • @reo

    Have your tried using the @tunnel tag instead of the @proxy tag? The Reolink should work with @tunnel as of version 0.0.3. Also make sure in the Monocle Web portal that your camera’s manufacturer is set to “Reolink”.

    Of course it should also work with the @proxy tag too.
    There is the following error message on startup:

    Sep 26 20:37:41 raspberrypi monocle-gateway[276]: [RTSP Proxy Stopped] CODE=0; S IGNAL=SIGSEGV
    

    So the proxy service is failing to start or crashing for some reason. Can you stop the monocle-gateway service and the manually launch the monocle-proxy executable and see what error is given on screen? /usr/local/bin/monocle-proxy

    Thanks, Robert



  • Hi Robert

    I stopped the service and manually launched the executable but I still get the same error.


    MONOCLE RUNTIME ENVIRONMENT

    VERSION = 0.0.3
    OS/ARCH = linux/arm
    PROCESS = monocle-gateway (PID=857)
    TIMESTAMP = 2018-09-27T22:06:16.806Z


    MONOCLE GATEWAY SERVICE (Version: 0.0.3)

    [Monocle Starting]
    [Monocle Connecting]
    [Monocle Started]
    [RTSP Server Starting]
    [RTSP Server Listening] 0.0.0.0:8555 (RTSP)
    [RTSP Server Listening] 0.0.0.0:443 (RTSP-TLS)
    [RTSP Proxy Started] (PID=866)
    [RTSP Server Listening] 0.0.0.0:8554 (PROXY)
    [RTSP Server Started]
    [RTSP Proxy Stopped] CODE=0; SIGNAL=SIGSEGV
    [Monocle Connected]
    [RTSP Server Registered]


    MONOCLE RTSP SERVICE - INITIALIZED

    FQDN = 06786b17-10bf-47ee-99ae-8e261e5950fc.mproxy.io
    HOST = 192.168.0.101
    PORT = 443

    I’ve tried with @tunnel and the camera manufacturer is set to Reolink but still no luck.

    0_1538086313805_a550edcc-e253-4f51-8729-564c380a56e8-image.png

    I tried the windows version and had no problems so not sure why the Linux version is causing problems.

    Any other suggestions? If not i may have to start from scratch with a clean Raspbian image.

    Thanks



  • @reo ,

    There should be two executables in the /usr/local/bin path

    • /usr/local/bin/monocle-proxy
    • /usr/local/bin/monocle-gateway

    In this case we just want to launch the /usr/local/bin/monocle-proxy executable (opposed to the /usr/local/bin/monocle-gateway executable) to see if any additional error details are provided as it attempts to start.

    Thanks, Robert



  • Hi

    it comes back with the following error

    pi@raspberrypi:/usr/local/bin $ sudo ./monocle-proxy
    Segmentation fault



  • @reo

    Can you please reach out to us using our contact form and we will send you a pre-release build for this platform that should get it working.

    Contact Us: https://monoclecam.com/contact

    Thanks, Robert