fryfrog / unifi-protect

An Ubuntu based Docker image for Unifi Protect
25 stars 9 forks source link

This doesn't actually work yet... #1

Closed fryfrog closed 5 years ago

fryfrog commented 5 years ago

This doesn't work yet and I'll keep track of my progress here...

fryfrog commented 5 years ago

chrome_1sBoKW4TKB

At this point, I set the name and create an account, but it sits there doing this and spewing to logs.

fryfrog commented 5 years ago

Since it uses many of the same ports as unifi-video, I stopped my Docker container for that and fired this one up w/ all the ports on their Protect ports page correctly set on the right ports. It didn't help.

Next idea is going to be copying the data folder from the working VM, see if that works. Then undo that and try copying just the DB from the working VM. Then copy both, at least narrow down where to look.

fryfrog commented 5 years ago

I'm poking around w/ storing the db externally (which we need to do otherwise its fucked), but running into issues of postgres user (and uid).

fryfrog commented 5 years ago

I've moved this to an Ubuntu + S6 overlay to make running multiple processes (protect and postgres) inside. I've also made the package install at startup to force feeding it via url or file, in case Ubiquity wants to make it not exist easily.

I've also made the db config and db folder external, installing postgress as part of startup too because the post install script is what creates the initial db and protect uses that db instead of its own. :/

It still isn't working though.

fryfrog commented 5 years ago

Screen Shot 2019-05-02 at 1 23 36 PM

I've deleted the Docker hub, but I'll keep this repo around just because.

johntdyer commented 5 years ago

Thank you for keeping this !

fryfrog commented 5 years ago

Screen Shot 2019-05-02 at 1 46 39 PM

There was also this, so I'd expect even if you have the .deb to install, it just flat out won't work at some point.

PrivatePuffin commented 5 years ago

Why delete the dockerhub? Because someone with shady practices "asks" you too? There is nothing illegal if you are not shipping their code.

There was also this, so I'd expect even if you have the .deb to install, it just flat out won't work at some point.

There is also the point of ubiquiti repeatingly lying to our face, so taking that into consideration I consider this just more protect related bullshit. Simply put: The man who cried wolf aka the employee who cried "protect" and "wont work"

Anyhow what is the problem you are hitting? Any logs to share? :)

fryfrog commented 5 years ago

Looks like they've let v1.12.5 into the wild, so I've re-enabled it on Docker Hub and have started poking around w/ it again. Still works fine in a VM, but in Docker it gets stuck at the same thing. :)

glahera commented 5 years ago

I've got a fork I've done this morning, but so far I'm stuck with running it since it seems to depend on some private nodejs repo @ubnt. Also it seems to have deprecated connection with Postgresql.

fryfrog commented 5 years ago

FWIW, I can install just the .deb file on an Ubuntu 18.04 VM and it works fine, so it clearly isn't pulling anything in from their own repos. In my Dockerfile, when it installs the .deb, it also pulls in postgresql and a few other things. It runs and I can see it doing stuff. It kind of seems like the logs are showing things trying to connect to the 172.x.x.x network that Docker uses, so maybe a port forward is missing?

I'm trying to get a macvlan working so it can have its very own IP, but must be doing something wrong there.

glahera commented 5 years ago

I see.... Let me check some stuffs real quick then.

fryfrog commented 5 years ago

Are you using my Dockerfile or do you have your own custom one? If you have a custom one, can you link it for me to look at?

glahera commented 5 years ago

Here's my current image: https://pastebin.com/LfW0Z7Sf

glahera commented 5 years ago

I tried with bionic VM, it is definitely not working. Capture

fryfrog commented 5 years ago

Ah, don't just dkpk install it. Try apt install ./package.deb instead, that'll install all the deps like nodejs and postgresql. And you probably want to be using the unifi-protect.service file via systemctl instead of what ever script you're running.

glahera commented 5 years ago

That is the script generated by the deb itself

fryfrog commented 5 years ago

I figured, but they don't start it that way... they have a bunch of stuff in their environment setup by the systemd .service file.

glahera commented 5 years ago

Still doesn't work.... image

glahera commented 5 years ago

On top I found that sometime a process named unifi-protect does appear but really inconsistent

fryfrog commented 5 years ago

Holy shit, it works w/ macvlan!