jshridha / docker-blueiris

Blueiris in a docker using wine!
Apache License 2.0
106 stars 52 forks source link

The service may not be initializing properly... #53

Open TonyBrobston opened 3 years ago

TonyBrobston commented 3 years ago

I recently decided to make some changes to my Blue Iris setup.

I'm running on the run_as_service branch.

Awhile back I made some file permission changes to my Blue Iris folder on my host machine. This caused problems (as you could probably imagine). I started seeing this error: image After some digging I found a previous conversation where we chmod -R 777 and chown 1000:1000 on /SURVEILLANCE/blue-iris in my case. I ran these commands and everything seemed to be looking good again.

At some point I restarted my container and started getting the same error as above and it seems that no matter what I try I can't get past it. image

It seems as though the service is still running the background because ui3 is still letting me see my cameras and recording with node-deepstackai-trigger is still working, I just can't get to the regular BlueIris Windows application to make changes.

@leonowski any ideas what this might be?

Another separate issue, I tried a fresh install and am seeing two issues I also can't get past.

  1. When I try to enter my license key there is a "Program Error" it gives me an option to "Show Details" but nothing every loads. image

Here is what I see in the logs when I click "Close"; seems to be a stackoverflow at the end:

Process of pid=00e4 has terminated
No process loaded, cannot execute 'echo Modules:'
Cannot get info on module while no process is loaded
No process loaded, cannot execute 'echo Threads:'
process  tid      prio (all id:s are in hex)
00000038 services.exe
  0000003c    0
  00000040    0
  00000054    0
  00000074    0
  00000094    0
  000000c8    0
  000000d0    0
0234:fixme:variant:get_date_format ignoring flags 402
00000044 winedevice.exe
  00000048    0
  0000005c    0
  00000060    0
0000004c explorer.exe
  00000050    0
  00000070    0
  0000008c    0
00000068 plugplay.exe
  0000006c    0
  00000078    0
  0000007c    0
  00000080    0
  000000a8    0
00000084 winedevice.exe
  00000088    0
  0000009c    0
  000000a0    0
  000000a4    0
  000000b0    0
  000000b4    0
000000b8 BlueIris.exe
  000000bc    0
  000000cc    0
  000000d4    0
  000000d8    0
  000000f4    0
  000000f8    0
  000000fc    0
  00000100    0
  00000104    0
  00000108    0
  0000010c    0
  00000110    0
  00000114    0
  00000118    0
  0000011c    0
  00000120    0
  00000124    0
  00000128    0
  0000012c    0
  00000130    0
  00000134    0
  00000138    0
  0000013c    0
  00000140    0
  00000144    0
  00000148    0
  0000014c    0
  00000150    0
  00000154    0
  00000158    0
  0000015c    0
  00000160    0
  00000164    0
  00000168    0
  0000016c    0
  00000170    0
  00000174    0
  00000178    0
  0000017c    0
  00000180    0
  00000184    0
  00000188    0
  0000018c    0
  00000190    0
  00000194    0
  00000198    0
  0000019c    0
  000001a0    0
  000001a4    0
  000001a8    0
  000001ac    0
  000001b0    0
  000001b4    0
  000001b8    0
  000001bc    0
  000001c0    0
  000001c4    0
  000001c8    0
  000001cc    0
  000001d0    0
  000001d4    0
  000001d8    0
  000001dc    0
  000001e0    0
  000001e4    0
  000001e8    0
  000001ec    0
  000001f0    0
  000001fc    0
  00000200    0
  00000204    0
  00000208    0
  0000020c    0
  00000210   -1
  00000214    0
  00000218    0
  0000021c    0
  0000022c    0
  00000230    0
  00000234    1
  00000238    0
  0000023c    0
  00000240    0
  00000244    0
  00000248    0
  0000024c    0
  00000250    0
0278:err:virtual:virtual_setup_exception stack overflow 2864 bytes in thread 0278 addr 0x7bc5a322 stack 0x1204d0 (0x120000-0x121000-0x220000)
  1. If I enter demo mode and "Check for News and Updates", I don't seem to have an internet connection. I think this is a symptom of a bigger issue. image
TonyBrobston commented 3 years ago

I did just try a fresh install against the regular leonowski/docker-blueiris after chmod'ing and chown'ing as mentioned above. I now am able to successfully enter my license key and update Blue Iris.

I was reading some information for the 5th time and I think I have some confusion around this paragraph: "Service mode allows you to run blueiris as a service only. This will disable all the GUI related processes from running. To run in service mode, you first have to run in normal mode, allow an install to happen, and configure your blue iris server the way you need it to be. After you're done and no longer need to make changes, destroy the conatiner and re-launch it with the command -c /etc/supervisor/conf.d/supervisord-service.conf" https://github.com/leonowski/docker-blueiris/tree/run_as_service

I assumed "you first have to run in normal mode" meant to essentially comment this line out: https://github.com/TonyBrobston/tbro-server/blob/3172148d0f8b1a2786a3708c7b5e5d3b180823e0/home-automation/docker-compose.yml#L117 and still run on leonowski/docker-blueiris:run_as_service. But now I'm wondering if @leonowski is meaning to run again leonowski/docker-blueiris:latest? 🤔

TonyBrobston commented 3 years ago

Here are the steps I'm using, that seem to work for a fresh install: mkdir /SURVEILLANCE/test chmod -R 777 /SURVEILLANCE/test chown 1000:1000 /SURVEILLANCE/test

Use docker-compose like this:

version: '3.8'

services:
  blue-iris:
    image: leonowski/docker-blueiris
    restart: unless-stopped
    privileged: true
    init: true
    environment:
    - RESOLUTION=1270x650x24
    - TZ=America/Chicago
    ports:
    - 8082:8080
    volumes:
    - /SURVEILLANCE/test:/home/wineuser/prefix:rw

Then, after doing setup of cameras and other things through the Blue Iris GUI, switch docker-compose to run as a service:

version: '3.8'

services:
  blue-iris:
    image: leonowski/docker-blueiris:run_as_service
    restart: unless-stopped
    init: true
    environment:
    - TZ=America/Chicago
    volumes:
    - /SURVEILLANCE/test:/home/wineuser/prefix:rw
    command: -c /etc/supervisor/conf.d/supervisord-service.conf

Then run docker-compose up -d && docker-compose logs -f blue-iris to recreate the container while reusing the persisted data through the volume mount.

I typically just comment out the differences between the two docker-compose above, since you'll need to switch back and forth: https://github.com/TonyBrobston/tbro-server/blob/3172148d0f8b1a2786a3708c7b5e5d3b180823e0/home-automation/docker-compose.yml#L102-L117

I wish the first couple chmod/chown weren't necessary. This seems to be a common docker issue, typically the host PUID and PGID are passed in as environment variables, which should mostly solve the file permission issues I would think.

I'm also wishing I didn't have to switch between leonowski/docker-blueiris and leonowski/docker-blueiris:run_as_service. But, I suppose all of this is better than having another server running one windows program 🤷‍♂️ .