turboaaa/docker-nxfilter

nxfilter does not run

Closed this issue · 14 comments

nxfilter does not run - it fails with

docker logs -f nxfilter
Exception in thread "main" java.lang.NullPointerException
        at nxd.Main.<init>(Unknown Source)
        at nxd.Main.main(Unknown Source)
Exception in thread "Thread-0" java.lang.NullPointerException
        at nxd.o.run(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
        at nxd.Main.<init>(Unknown Source)
        at nxd.Main.main(Unknown Source)
Exception in thread "Thread-0" java.lang.NullPointerException
        at nxd.o.run(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
        at nxd.Main.<init>(Unknown Source)
        at nxd.Main.main(Unknown Source)
Exception in thread "Thread-0" java.lang.NullPointerException
        at nxd.o.run(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
        at nxd.Main.<init>(Unknown Source)
        at nxd.Main.main(Unknown Source)
Exception in thread "Thread-0" java.lang.NullPointerException
        at nxd.o.run(Unknown Source)

i ran it like so docker run -dit --name nxfilter -v /opt/nxfilter/conf:/nxfilter/conf -v /opt/nxfilter/log:/nxfilter/log -v /opt/nxfilter/db:/nxfilter/db -p 7180:80 -p 7443:443 -p 53:53/udp -p 19002-19004:19002-19004 --restart always nxfilter:latest

The funny thing is last night I was dreaming that something had stopped working and my boss was complaining.

This should be caused by lines 10-12 in the dockerfile. I wanted java to run without root privileges, but at some point an update to either CentOS or Docker is preventing this from working as expected. Will look into this.

its not the persistent volume mapping to /nxfilter/conf as per https://forums.unraid.net/topic/77848-install-a-docker-thats-not-in-apps/ ?

Possibly. Honestly I have not used this container in a while, sometime last year I went back to it and found that it failed to start. When messing with it for a while I found running java as root fixed the issue, which defeats the purpose of my container.

Will take a look at both issues. At this point I am beyond bored isolating myself at home. My boss has said to stop all projects so I have nothing to do. You have given me purpose today, thank you! :-)

confirmed. the conf directory needs to be populated first

That can only mean one thing, I never tested this on a clean installation. Shame on me! Should be an easy fix.

@marafa I did some housekeeping to the docker file, then added a startup script that should take care of things. Test and let me know
https://github.com/turboaaa/docker-nxfilter/tree/turboaaa-patch-4

Technically you could use cat to write the file contents in a RUN statement in the dockerfile. Enough of my containers have complex variables that I find it easier to maintain a separate "run.sh" file, instead of editing the dockerfile each time. That's just me.

built and ran it .. failed

Sadly I am unable to further test at this point because the deepwoods repo is having problems. Seen this all day. Was there a specific error you encountered?

same error
and if i start it with the directory populated it says unable to populate db

Are you running with selinux? If so, make sure to use the Z flag on the bind. https://docs.docker.com/storage/bind-mounts/

If not then I will continue to attempt reproducing on my end. Just need the repo to come back online.

I have reached out on the forums about the repo. It's still denying me access.

Ok, the repo was suddenly blocked by pihole and I had to whitelist. I did omit a line that moves the files to a staging area which would cause the failure. I made the appropriate changes, re-downloaded the files, and tested.