packetworks / docker-nxfilter

:whale: Run NxFilter in Docker!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't start tomcat

orientalsniper opened this issue · comments

I keep getting this error no matter how many times I recreate the container.

org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

I tested it a few days ago on a server that's never run the container. Can you provide your complete Docker Run command?

docker run -d --restart unless-stopped --name=nxfilter -p 10.0.0.45:80:80 -p 10.0.0.45:443:443 -p 10.0.0.12:53:53/udp packetworks/nxfilter-base:latest

I haven't seen this issue yet, and i don't think this step will work, but did you try running it with a TTY? Use -dt instead of -d. I don't have a laptop nearby to test with.

No, it didn't work, how can I reinstall tomcat inside the container and see if that works?

Nothing.

 INFO [08-10 23:02:24] - MM, Starting Tomcat.
Aug 10, 2019 11:02:25 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Aug 10, 2019 11:02:25 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Aug 10, 2019 11:02:25 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-443"]
Aug 10, 2019 11:02:25 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Aug 10, 2019 11:02:25 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Aug 10, 2019 11:02:25 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
INFO: No global web.xml found
Aug 10, 2019 11:02:26 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-80"]
Aug 10, 2019 11:02:26 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-443"]

Looks like it's working just fine and i get the same errors.

 INFO [08-11 01:56:28] - QDi, Loading user_quota.
 INFO [08-11 01:56:28] - MM, RequestHandler started.
 INFO [08-11 01:56:28] - MM, UdpServer started.
 INFO [08-11 01:56:28] - MM, Starting TCP DB.
 INFO [08-11 01:56:28] - MM, Starting Tomcat.
Aug 11, 2019 1:56:29 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Aug 11, 2019 1:56:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Aug 11, 2019 1:56:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-443"]
Aug 11, 2019 1:56:29 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Aug 11, 2019 1:56:29 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Aug 11, 2019 1:56:29 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
INFO: No global web.xml found
Aug 11, 2019 1:56:30 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-80"]
Aug 11, 2019 1:56:30 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-443"]
 INFO [08-11 01:56:31] - MHMrU, Doing remote update for Jahaslist.
 INFO [08-11 01:56:31] - JahasUpdate.remoteRecatTxt, Processing /nxfilter/tmp/www_nxfilter_org_jahaslist_recatlist_txt/recatlist.txt
 INFO [08-11 01:56:32] - JahasUpdate.remoteRecatTxt, oldVer = 0, newVer = 929.
 INFO [08-11 01:56:32] - JahasUpdate.remoteRecatTxt, Downloading http://www.nxfilter.org/jahaslist/recatlist.txt

I believe this is a performance enhancing library and does not affect the normal operation of nxfilter. You should see the following webpage on a default install. Give it at least 30 secs to download the lists and start serving HTTP.
image

That's weird, I only opened issue because the page was not loading, getting ERR_CONNECTION_TIMED_OUT in my browser.

And 10.0.0.45 is pingable.

Do you have anything else listening on 80 or 443 or 53 on that machine? Maybe try simplifying things by removing the IP's from your run command. You should also be using Docker Volumes so any changes to the NXfilter config get saved when removing the container. Add this -v nxfilter-conf:/nxfilter/conf -v nxfilter-log:/nxfilter/log -v nxfilter-db:/nxfilter/db to your command once you get the webpage to display.

Solved, there was nothing wrong with the container, had some routing issues involving multiple nic's, had to set up some ip rules and routes.

Though it would be great to supress the tomcat error messages.

If you can nail down what we need to do besides apk add apr then I can make the change. I'm just not familiar enough with Tomcat. See here for how they fixed it. docker-library/tomcat#29

I installed apr and tomcat-native in the docker container. APR didn't do anything, even though it was installed to the correct path, and installing tomcat-native just breaks everything.

Sorry, wished I could help.