mobidata-bw / ipl-orchestration

MobiData-BW Integrationsplattform (IPL), an API platform that provides mobility data for Baden-Württemberg across many domains.
https://api.mobidata-bw.de
European Union Public License 1.2
0 stars 0 forks source link

Lamassu Log Exception: "Caught exception in ForkJoinPool\njava.lang.NullPointerException" #226

Closed AbdullahiFatola closed 3 months ago

AbdullahiFatola commented 3 months ago

For over 2 weeks, the bolded exception below Caught exception in ForkJoinPool\njava.lang.NullPointerException shows every minute in the Logs of the Lamassu Container.

Exception message:

2024-08-22T12:34:51.282694415Z {"serviceContext":{"service":"lamassu"},"message":"Failed to setup subscription, trying again in 60 seconds - systemId=pickebike_fribourg\n","severity":"WARN","reportLocation":{"filePath":"org.entur.lamassu.leader.FeedUpdater","lineNumber":"172","functionName":"createSubscription"}}

2024-08-22T12:35:02.637997930Z {"serviceContext":{"service":"lamassu"},"message":"Caught exception in ForkJoinPool\njava.lang.NullPointerException: null\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)\n\tat java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:542)\n\tat java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:567)\n\tat java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:670)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)\n\tat java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)\n\tat java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765)\n\tat org.entur.gbfs.GbfsSubscriptionManager.lambda$update$0(GbfsSubscriptionManager.java:91)\n\tat java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)\n\tat java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)\n\tat java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)\n\tat java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)\n\tat java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)\n\tat java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)\nCaused by: java.lang.NullPointerException: null\n","severity":"WARN","reportLocation":{"filePath":"org.entur.lamassu.leader.FeedUpdater","lineNumber":"107","functionName":"lambda$start$0"}}

2024-08-22T12:35:11.286915622Z {"serviceContext":{"service":"lamassu"},"message":"Failed to setup subscription, trying again in 60 seconds - systemId=tier_mannheim-ludwigshafen\n","severity":"WARN","reportLocation":{"filePath":"org.entur.lamassu.leader.FeedUpdater","lineNumber":"172","functionName":"createSubscription"}}

Steps to reproduce:

The errors before and after the bolded exception are as a result of problems from the provider data sources. It is however unclear if the data source errors have link to the exception. Therefore, I could not reproduce the problem.

Any Idea on what the cause is and how to resolve this exception?

hbruch commented 3 months ago

This exception is caused by #149. The nextbike_eh feed is missing a form_factor for a vehicle_type. This issue also includes a suggestion how to resolve the exception.

To more easily figure out which feed causes an exception, lamassu's https://github.com/entur/lamassu/pull/518/ will add the system_id in the log output.

Nevertheless, to figure out problematic feeds, have a look into the grafana dashboard. The problematic feed shows up ther already. By reducing the feedproviders.yml to just the few failing feeds, you should be able to figure out, which specific feed is causing the issue.

Closing this issue as duplicate of #149.