SecureSECO / SearchSECODatabaseAPI

GNU Affero General Public License v3.0
0 stars 3 forks source link

run-time errors #19

Open z1gz opened 2 years ago

z1gz commented 2 years ago

With the new Dockerfile from #16, the project now builds successfully with docker but I have yet to experience what looks like success running it. (and not certain what successfully working looks like, in its current state). There are errors in the docker-compose up output that indicate issues, described below. With the new docker build/run now working, these issues are easy to replicate.

Can't connect to the database or create new one locally

What should SEEDS in .env be set to?

  1. for running completely locally with new/fresh database?
  2. for connecting and syncing from "official" database?

If SEEDS is left unconfigured (SEEDS=), the docker api service fails.

If set from API_IPS in searchseco/controller:latest like this SEEDS=131.211.31.179,131.211.31.176, then the api service complains that it can't connect to the database:

api             | Starting the API.
api             | Unable to open statistics file.
api             | Connecting to the database. With keyspace: projectdata
api             | Could not connect to the database.
api             | Retrying after 45 seconds have elapsed..

Note: inconveniently, SEEDS must be set in .env and the docker image itself rebuilt with it (see #17 for suggested improvement).

exporter errors

exporter        | [main] INFO com.criteo.nosql.cassandra.exporter.Config - Loading yaml config from /tmp/config.yml
exporter        | [main] ERROR com.criteo.nosql.cassandra.exporter.JmxScraper - Cannot retrieve the datacenter name information for the node
exporter        | javax.management.RuntimeMBeanException: java.lang.NullPointerException
exporter        |   at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(Unknown Source)
exporter        |   at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(Unknown Source)
exporter        |   at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
exporter        |   at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
exporter        |   at java.base/java.security.AccessController.doPrivileged(Native Method)
exporter        |   at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
exporter        |   at java.base/java.security.AccessController.doPrivileged(Native Method)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
exporter        |   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
exporter        |   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
exporter        |   at java.base/java.lang.Thread.run(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
exporter        |   at java.rmi/sun.rmi.server.UnicastRef.invoke(Unknown Source)
exporter        |   at jdk.remoteref/jdk.jmx.remote.internal.rmi.PRef.invoke(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(Unknown Source)
exporter        |   at com.criteo.nosql.cassandra.exporter.JmxScraper$NodeInfo.getNodeInfo(JmxScraper.java:440)
exporter        |   at com.criteo.nosql.cassandra.exporter.JmxScraper.run(JmxScraper.java:195)
exporter        |   at com.criteo.nosql.cassandra.exporter.Main.start(Main.java:44)
exporter        |   at com.criteo.nosql.cassandra.exporter.Main.main(Main.java:30)
exporter        | Caused by: java.lang.NullPointerException
exporter        |   at org.apache.cassandra.service.StorageService.getLocalHostId(StorageService.java:2218)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
exporter        |   at sun.reflect.misc.Trampoline.invoke(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
exporter        |   at java.base/sun.reflect.misc.MethodUtil.invoke(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.PerInterface.getAttribute(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(Unknown Source)
exporter        |   at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source)
exporter        |   at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
exporter        |   at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
exporter        |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
exporter        |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
exporter        |   at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
exporter        |   at java.base/java.security.AccessController.doPrivileged(Native Method)
exporter        |   at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
exporter        |   at java.base/java.security.AccessController.doPrivileged(Native Method)
exporter        |   at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
exporter        |   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
exporter        |   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
exporter        |   at java.base/java.lang.Thread.run(Unknown Source)