Error: Could not connect: [111] Connection refused

So, on Friday, I turned on substream viewing for live playback on all 4 cameras. The next time I tried to login, I got the message: Could not connect: [111] Connection refused after logging in. I have already tried restarting the server, and making sure all server updates are installed (via apt). So far, neither option has had any success. I might try unplugging the cameras temporarily.

Update: according to the logs, I’m getting a segfault. I tried ‘systemctl restart bluecherrt.service’, but it segfaults immediately again.

Jul 11 03:01:42 cameras bc-server[548]: I(): Status reports are served at /tmp/bluecherry_status
Jul 11 03:01:42 cameras bc-server[548]: I(): Status reports are served at /tmp/bluecherry_trigger
Jul 11 03:01:42 cameras bc-server[548]: I(): Started bc-server 3.1.0 (toolchain 9.3.0) v2.7.6-552-g67b454d1 heads/master
Jul 11 03:01:42 cameras bc-server[548]: I(): HLS server started listen to port: 7003 (SSL=0)
Jul 11 03:01:42 cameras bc-server[548]: I(): SQL database connection opened
Jul 11 03:01:42 cameras bc-server[548]: I(): Initialized render node /dev/dri/renderD128 for VAAPI hardware acceleration
Jul 11 03:01:42 cameras bc-server[548]: I(): Determined oldest media time: 2021/05/14 02-46-48
Jul 11 03:01:42 cameras bc-server[548]: I(): Initial media cleanup finished: removed(0), archived(0), errors(0), others(42722)
Jul 11 03:01:42 cameras bc-server[548]: I(): v3license server started
Jul 11 03:01:42 cameras bc-server[548]: I(1/Front): Setting up device
Jul 11 03:01:42 cameras bc-server[548]: BUG: Segment violation at 0x0000000000000000
Jul 11 03:01:42 cameras bc-server[548]: Call trace:
Jul 11 03:01:42 cameras bc-server[548]: [0x000056178aeb222b]  @ /usr/sbin/bc-server
Jul 11 03:01:42 cameras bc-server[548]: [0x00007f0b91f8d210]  @ /lib/x86_64-linux-gnu/libc.so.6
Jul 11 03:01:42 cameras bc-server[548]: [0x00007f0b93c0a7d2] _Z14bc_handle_freeP9bc_handle+0x00000000 @ /usr/lib/libbluecherry.so.0
Jul 11 03:01:42 cameras bc-server[548]: [0x00007f0b93c0a9a7] _Z13bc_handle_getPv+0x00000000 @ /usr/lib/libbluecherry.so.0
Jul 11 03:01:42 cameras bc-server[548]: [0x000056178ae9e7ce]  @ /usr/sbin/bc-server
Jul 11 03:01:42 cameras bc-server[548]: [0x000056178ae99cbe]  @ /usr/sbin/bc-server
Jul 11 03:01:42 cameras bc-server[548]: [0x00007f0b91f6e0b3] __libc_start_main+0x00000000 @ /lib/x86_64-linux-gnu/libc.so.6
Jul 11 03:01:42 cameras bc-server[548]: [0x000056178ae9ae5e]  @ /usr/sbin/bc-server

Which distribution / release are you using?

Ubuntu 20.04.2 in an LXC environment.

I’m using Proxmox as the hypervisor, btw.

try this package:

wget http://lizard.bluecherry.net/~curt/releases/focal/bluecherry_3.1.0-rc3_amd64.deb ; sudo dpkg -i bluecherry_3.1.0-rc3_amd64.deb

1 Like

Thank you, sir! That got the service to stay up, allowing me to realize: I didn’t have a substream URL configured for one of my Cameras, but I told the system to use it for live streaming. D’oh!

This worked for me too.

Hi. I got the same message, and applied the mentioned package.
After 2 days, the error reappeared,

what i’ve seen in the logs are:
Sep 15 04:01:11 zeno bc-server[781]: [0x00005615d65420aa] @ /usr/sbin/bc-server
Sep 15 04:01:11 zeno bc-server[781]: [0x00005615d655bf2d] @ /usr/sbin/bc-server
Sep 15 04:01:11 zeno bc-server[781]: [0x00007f6c280d3de4] @ /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Sep 15 04:01:11 zeno bc-server[781]: [0x00007f6c27c85609] @ /lib/x86_64-linux-gnu/libpthread.so.0
Sep 15 04:01:11 zeno bc-server[781]: [0x00007f6c27dc1293] clone+0x00000000 @ /lib/x86_64-linux-gnu/libc.so.6
Sep 15 08:50:05 zeno bc-server[63451]: I(): Status reports are served at /tmp/bluecherry_status
Sep 15 08:50:06 zeno bc-server[63451]: I(): Status reports are served at /tmp/bluecherry_trigger
Sep 15 08:50:06 zeno bc-server[63451]: I(): Started bc-server 3.1.0 (toolchain 9.3.0) v2.7.6-633-ga27a92ff heads/master

so around 4AM server hanged. I’m running the dvr server on ubuntu headless
Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-84-generic x86_64)

Additional note. When motion detection is turned off, the server sun stable for days. With motion detection on, the server hangs every day between 2 and 4 AM.
It’s a bit strange behaviour.

Thanks. Can you please run this command in the evening and include /var/log/bluecherry.log. This will run the server is debug mode and hopefully provide better logging of what is happening.

sudo service bluecherry stop
sudo /usr/sbin/bc-server -l d

Ok, I’ve started the server like this.
Sidenote, i’ve still had the issue even after updated to the latest version.

2021/10/14 08:50:09 [error] 852#852: *167 FastCGI sent in stderr: “PHP message: PHP Warning: socket_connect(): unable to connect [111]: Connection refused in /usr/share/bluecherry/www/lib/bc_license_wrapper.php on line 185” while reading response header from upstream, client: 10.8.0.6, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.4-fpm.sock:”, host: “<:…>7001”, referrer: “https://<…>:7001/login”

Thanks. Does sudo service nginx restart fix this?

no clue. I’ve reinstalled my box to ubuntu 21.10. now i cannot install bluecherry. :slight_smile:

performed a clean isntall to my box, and now its working.