Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photon compilation #427

Closed
timautin opened this issue Jul 12, 2019 · 9 comments
Closed

Photon compilation #427

timautin opened this issue Jul 12, 2019 · 9 comments

Comments

@timautin
Copy link

Hello,

I'm trying to compile Photon to get the latest features (mostly the bbox). I simply cloned the master branch and ran the following comands:

mvn compile
mvn generate-test-resources
java -jar photon-*.jar

When going to http://locahost:2322/api/?q=berlin, I get a 500 error: org.elasticsearch.index.IndexNotFoundException: no such index

I guess that it is normal since I didn't download the photon_data folder on my dev machine. But then when I upload my jar to my server (with the worldwide photon_data) and start Photon, it fails to start with the following error:

Exception in thread "main" java.lang.IllegalStateException: failed to load plugin - Plugin information:
Name: lang-painless
Description: An easy, safe and fast scripting language for Elasticsearch
Version: 5.5.0
Native Controller: false
 * Classname: org.elasticsearch.painless.PainlessPlugin due to jar hell
        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:376)
        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:140)
        at org.elasticsearch.node.Node.<init>(Node.java:312)
        at de.komoot.photon.elasticsearch.Server$MyNode.<init>(Server.java:58)
        at de.komoot.photon.elasticsearch.Server.start(Server.java:112)
        at de.komoot.photon.App.main(App.java:51)
Caused by: java.lang.IllegalStateException: jar hell!
class: org.elasticsearch.painless.Utility
jar1: /ssd/photon/photon_data/elasticsearch/modules/lang-painless/lang-painless.jar
jar2: /ssd/photon/photon_data/elasticsearch/modules/lang-painless/lang-painless-5.5.0.jar
        at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:282)
        at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:192)
        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:374)
        ... 5 more

Worse, after that it broke my photon_data and I can't start photon using the old jar either (error is the same). I ran a diff between my saved photon_data and the corrupted one, here's the result:

diff -qr photon_data svg/photon_data/ | sort
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog/translog.ckp differ
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/_state: state-69.st
Only in photon_data/elasticsearch/data/nodes/0/_state: global-14.st
Only in photon_data/elasticsearch/data/nodes/0/_state: node-16.st
Only in photon_data/elasticsearch/modules/lang-painless: antlr4-runtime.jar
Only in photon_data/elasticsearch/modules/lang-painless: asm-debug-all.jar
Only in photon_data/elasticsearch/modules/lang-painless: lang-painless.jar
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/_state: state-64.st
Only in svg/photon_data/elasticsearch/data/nodes/0/_state: global-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/_state: node-13.st

Did I do something wrong, or is it a bug?

@andrh87
Copy link

andrh87 commented Jul 14, 2019

Hi, i have a similar problem.

Sometimes the same error as yours accour, sometimes it starts but doesnt find any queryterm. It always results in an 500 "no such index". Something seems to be wrong with this version

@timautin
Copy link
Author

timautin commented Jul 14, 2019

Glad to see that I'm not alone. I suspect we need to re-create the photon_data dir with the latest version if we want to use it. I no longer have my Nominatim around, so I gave up for now. Anyway if someone from Photon could confirm that this is the cause of the problem or not it would be great :)

@andrh87
Copy link

andrh87 commented Jul 14, 2019

I tried the latest version of the Database with the latest version of the jar. Both, self-compiled und the downloaded jar results in the no index exception. I red that it could be a file-right problem, so i tried chmod 777 to photon_data dir. This ended up, that non of the jars started anymore. After reunpacking the whole downloaded photon_data it worked again but with still the error "noSuchIndex" occuring.

when getting the error, this line makes me curious:

org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.infe(IndexNameExpressionResolver.java:676)

If i find a solution i will tell you. :)

@timautin
Copy link
Author

Thanks! It is not urgent for me as I managed to make it work as I want with the current release, so I'll wait an answer from someone at Photon.

@andrh87
Copy link

andrh87 commented Jul 15, 2019

Ok found the Issue for the problem with the jar hell

Caused by: java.lang.IllegalStateException: jar hell!

you only need to delete the files in /photon_data/elasticsearch/modules/lang-painless/ which are duplicate. I deleted all files with version ending. This seems to work :)

VG

@timautin
Copy link
Author

Awesome, thanks! I can confirm that it solved the problem.
@lonvia I'm leaving this open in case you think there's something to fix, but it can be closed.

@lonvia
Copy link
Collaborator

lonvia commented Jul 16, 2019

As a general rule, the dumps we provide must always be used with the latest released photon. We do not guarantee compatibility with former or future versions. If you want to to use the development version from master, you need to create your own extracts.

That said, I think the dependency change is currently the only breaking change. So at the time of writing this, you might get away with deleting these files.

@lonvia lonvia closed this as completed Jul 16, 2019
@timautin
Copy link
Author

@lonvia Thanks for the explanation!

@luckynipun
Copy link

luckynipun commented Mar 26, 2020

There is still something wrong!

I have downloaded the photon-0.3.2.jar and latest photon_data from 'http://download1.graphhopper.com/public/photon-db-latest.tar.bz2'

Then I ran the jar
java -jar photon-0.3.2.jar

As you can see below, it ran and I was able to make API requests

nmadam@IM-LP-681 photon % java -jar photon-0.3.2_new.jar 
2020-03-26 13:20:33,729 [main] WARN  org.elasticsearch.node.Node - version [5.5.0-SNAPSHOT] is a pre-release version of Elasticsearch and is not suitable for production
2020-03-26 13:20:40,951 [main] INFO  de.komoot.photon.elasticsearch.Server - started elastic search node
2020-03-26 13:20:41,139 [Thread-1] WARN  org.eclipse.jetty.server.AbstractConnector - Ignoring deprecated socket close linger time
2020-03-26 13:22:53,033 [elasticsearch[BSS0AMO][clusterService#updateTask][T#1]] WARN  org.elasticsearch.cluster.service.ClusterService - cluster state update task [shard-started shard id [[photon][3]], allocation id [QK72QQlYTCCBds9KfCksQw], primary term [0], message [after existing recovery][shard id [[photon][3]], allocation id [QK72QQlYTCCBds9KfCksQw], primary term [0], message [after existing recovery]], shard-started shard id [[photon][3]], allocation id [QK72QQlYTCCBds9KfCksQw], primary term [0], message [master {BSS0AMO}{BSS0AMOlS9mHIPXRZo7i6A}{wo6B_9JbTxC1RlSHXd40tw}{127.0.0.1}{127.0.0.1:9300} marked shard as initializing, but shard state is [POST_RECOVERY], mark shard as started][shard id [[photon][3]], allocation id [QK72QQlYTCCBds9KfCksQw], primary term [0], message [master {BSS0AMO}{BSS0AMOlS9mHIPXRZo7i6A}{wo6B_9JbTxC1RlSHXd40tw}{127.0.0.1}{127.0.0.1:9300} marked shard as initializing, but shard state is [POST_RECOVERY], mark shard as started]]] took [2m] above the warn threshold of 30s

Later I stopped the jar, and wanted to run from my local code repo.
I am using IntelliJ, to run Photon
Below is the run configuration, where I setting the photon_data directory path
Screen Shot 2020-03-26 at 2 49 00 PM

I'm unable to run it. Below is the error

/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:50436,suspend=y,server=n -javaagent:/Users/nmadam/Library/Caches/IdeaIC2019.3/captureAgent/debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/tools.jar:/Volumes/Data/projects/photon/photon/target/classes:/Users/nmadam/.m2/repository/org/elasticsearch/elasticsearch/5.5.0/elasticsearch-5.5.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-core/6.6.0/lucene-core-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-analyzers-common/6.6.0/lucene-analyzers-common-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-backward-codecs/6.6.0/lucene-backward-codecs-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-grouping/6.6.0/lucene-grouping-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-highlighter/6.6.0/lucene-highlighter-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-join/6.6.0/lucene-join-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-memory/6.6.0/lucene-memory-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-misc/6.6.0/lucene-misc-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-queries/6.6.0/lucene-queries-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-queryparser/6.6.0/lucene-queryparser-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-sandbox/6.6.0/lucene-sandbox-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-spatial/6.6.0/lucene-spatial-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-spatial-extras/6.6.0/lucene-spatial-extras-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-spatial3d/6.6.0/lucene-spatial3d-6.6.0.jar:/Users/nmadam/.m2/repository/org/apache/lucene/lucene-suggest/6.6.0/lucene-suggest-6.6.0.jar:/Users/nmadam/.m2/repository/org/elasticsearch/securesm/1.1/securesm-1.1.jar:/Users/nmadam/.m2/repository/net/sf/jopt-simple/jopt-simple/5.0.2/jopt-simple-5.0.2.jar:/Users/nmadam/.m2/repository/com/carrotsearch/hppc/0.7.1/hppc-0.7.1.jar:/Users/nmadam/.m2/repository/joda-time/joda-time/2.9.5/joda-time-2.9.5.jar:/Users/nmadam/.m2/repository/org/yaml/snakeyaml/1.15/snakeyaml-1.15.jar:/Users/nmadam/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.6/jackson-core-2.8.6.jar:/Users/nmadam/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.8.6/jackson-dataformat-smile-2.8.6.jar:/Users/nmadam/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.8.6/jackson-dataformat-yaml-2.8.6.jar:/Users/nmadam/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.8.6/jackson-dataformat-cbor-2.8.6.jar:/Users/nmadam/.m2/repository/com/tdunning/t-digest/3.0/t-digest-3.0.jar:/Users/nmadam/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar:/Users/nmadam/.m2/repository/org/apache/logging/log4j/log4j-api/2.8.2/log4j-api-2.8.2.jar:/Users/nmadam/.m2/repository/org/elasticsearch/plugin/transport-netty4-client/5.5.0/transport-netty4-client-5.5.0.jar:/Users/nmadam/.m2/repository/io/netty/netty-buffer/4.1.11.Final/netty-buffer-4.1.11.Final.jar:/Users/nmadam/.m2/repository/io/netty/netty-codec/4.1.11.Final/netty-codec-4.1.11.Final.jar:/Users/nmadam/.m2/repository/io/netty/netty-codec-http/4.1.11.Final/netty-codec-http-4.1.11.Final.jar:/Users/nmadam/.m2/repository/io/netty/netty-common/4.1.11.Final/netty-common-4.1.11.Final.jar:/Users/nmadam/.m2/repository/io/netty/netty-handler/4.1.11.Final/netty-handler-4.1.11.Final.jar:/Users/nmadam/.m2/repository/io/netty/netty-resolver/4.1.11.Final/netty-resolver-4.1.11.Final.jar:/Users/nmadam/.m2/repository/io/netty/netty-transport/4.1.11.Final/netty-transport-4.1.11.Final.jar:/Users/nmadam/.m2/repository/org/apache/logging/log4j/log4j-core/2.8.2/log4j-core-2.8.2.jar:/Users/nmadam/.m2/repository/org/elasticsearch/client/transport/5.5.0/transport-5.5.0.jar:/Users/nmadam/.m2/repository/org/elasticsearch/plugin/transport-netty3-client/5.5.0/transport-netty3-client-5.5.0.jar:/Users/nmadam/.m2/repository/io/netty/netty/3.10.6.Final/netty-3.10.6.Final.jar:/Users/nmadam/.m2/repository/org/elasticsearch/plugin/reindex-client/5.5.0/reindex-client-5.5.0.jar:/Users/nmadam/.m2/repository/org/elasticsearch/client/rest/5.5.0/rest-5.5.0.jar:/Users/nmadam/.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar:/Users/nmadam/.m2/repository/org/apache/httpcomponents/httpcore/4.4.5/httpcore-4.4.5.jar:/Users/nmadam/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.2/httpasyncclient-4.1.2.jar:/Users/nmadam/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.4.5/httpcore-nio-4.4.5.jar:/Users/nmadam/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/Users/nmadam/.m2/repository/org/elasticsearch/plugin/lang-mustache-client/5.5.0/lang-mustache-client-5.5.0.jar:/Users/nmadam/.m2/repository/com/github/spullara/mustache/java/compiler/0.9.3/compiler-0.9.3.jar:/Users/nmadam/.m2/repository/org/elasticsearch/plugin/percolator-client/5.5.0/percolator-client-5.5.0.jar:/Users/nmadam/.m2/repository/org/elasticsearch/plugin/parent-join-client/5.5.0/parent-join-client-5.5.0.jar:/Users/nmadam/.m2/repository/org/elasticsearch/jna/4.4.0/jna-4.4.0.jar:/Users/nmadam/.m2/repository/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar:/Users/nmadam/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/nmadam/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.8.2/log4j-slf4j-impl-2.8.2.jar:/Users/nmadam/.m2/repository/com/beust/jcommander/1.32/jcommander-1.32.jar:/Users/nmadam/.m2/repository/org/openstreetmap/osmosis/osmosis-hstore-jdbc/0.43.1/osmosis-hstore-jdbc-0.43.1.jar:/Users/nmadam/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar:/Users/nmadam/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.4.0/jackson-jaxrs-1.4.0.jar:/Users/nmadam/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.4.0/jackson-core-asl-1.4.0.jar:/Users/nmadam/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.4.0/jackson-mapper-asl-1.4.0.jar:/Users/nmadam/.m2/repository/com/neovisionaries/nv-i18n/1.4/nv-i18n-1.4.jar:/Users/nmadam/.m2/repository/org/springframework/spring-jdbc/4.0.0.RELEASE/spring-jdbc-4.0.0.RELEASE.jar:/Users/nmadam/.m2/repository/org/springframework/spring-beans/4.0.0.RELEASE/spring-beans-4.0.0.RELEASE.jar:/Users/nmadam/.m2/repository/org/springframework/spring-core/4.0.0.RELEASE/spring-core-4.0.0.RELEASE.jar:/Users/nmadam/.m2/repository/org/springframework/spring-tx/4.0.0.RELEASE/spring-tx-4.0.0.RELEASE.jar:/Users/nmadam/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/nmadam/.m2/repository/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar:/Users/nmadam/.m2/repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar:/Users/nmadam/.m2/repository/com/vividsolutions/jts/1.13/jts-1.13.jar:/Users/nmadam/.m2/repository/com/sparkjava/spark-core/2.8.0/spark-core-2.8.0.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-server/9.4.12.v20180830/jetty-server-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-http/9.4.12.v20180830/jetty-http-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-util/9.4.12.v20180830/jetty-util-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-io/9.4.12.v20180830/jetty-io-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-webapp/9.4.12.v20180830/jetty-webapp-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.12.v20180830/jetty-xml-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.12.v20180830/jetty-servlet-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-security/9.4.12.v20180830/jetty-security-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/websocket/websocket-server/9.4.12.v20180830/websocket-server-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.4.12.v20180830/websocket-common-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.4.12.v20180830/websocket-client-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/jetty-client/9.4.12.v20180830/jetty-client-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/9.4.12.v20180830/websocket-servlet-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.4.12.v20180830/websocket-api-9.4.12.v20180830.jar:/Users/nmadam/.m2/repository/com/google/code/findbugs/jsr305/2.0.2/jsr305-2.0.2.jar:/Users/nmadam/.m2/repository/postgis/postgis-jdbc-jts/1.1.5/postgis-jdbc-jts-1.1.5.jar:/Users/nmadam/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar:/Users/nmadam/.m2/repository/net/lingala/zip4j/zip4j/1.2.3/zip4j-1.2.3.jar:/Users/nmadam/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/nmadam/.m2/repository/org/json/json/20140107/json-20140107.jar:/Users/nmadam/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/nmadam/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" de.komoot.photon.App -data-dir /Users/nmadam/Documents/projects/photon/.
Connected to the target VM, address: '127.0.0.1:50436', transport: 'socket'
Exception in thread "main" java.lang.IllegalStateException: failed to load plugin - Plugin information:
Name: lang-painless
Description: An easy, safe and fast scripting language for Elasticsearch
Version: 5.5.0
Native Controller: false
 * Classname: org.elasticsearch.painless.PainlessPlugin due to jar hell
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:376)
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:140)
	at org.elasticsearch.node.Node.<init>(Node.java:312)
	at de.komoot.photon.elasticsearch.Server$MyNode.<init>(Server.java:58)
	at de.komoot.photon.elasticsearch.Server.start(Server.java:112)
	at de.komoot.photon.App.main(App.java:52)
Caused by: java.lang.IllegalStateException: jar hell!
class: jdk.packager.services.userjvmoptions.LauncherUserJvmOptions
jar1: /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/ant-javafx.jar
jar2: /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/lib/packager.jar
	at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:282)
	at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:192)
	at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:374)
	... 5 more
Disconnected from the target VM, address: '127.0.0.1:50436', transport: 'socket'

Process finished with exit code 1

Now when I go back to just running the jar which I downloaded
As you can see, the second time when I run it, it throws the below

nmadam@IM-LP-681 photon % java -jar photon-0.3.2_new.jar
2020-03-26 13:36:22,283 [main] WARN  org.elasticsearch.node.Node - version [5.5.0-SNAPSHOT] is a pre-release version of Elasticsearch and is not suitable for production
Exception in thread "main" java.lang.IllegalStateException: Unable to initialize modules
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:123)
	at org.elasticsearch.node.Node.<init>(Node.java:312)
	at de.komoot.photon.elasticsearch.Server$MyNode.<init>(Server.java:58)
	at de.komoot.photon.elasticsearch.Server.start(Server.java:112)
	at de.komoot.photon.App.main(App.java:51)
Caused by: java.nio.file.FileSystemException: /Volumes/Data/projects/photon/photon_data/elasticsearch/modules/.DS_Store/plugin-descriptor.properties: Not a directory
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.Files.newByteChannel(Files.java:361)
	at java.nio.file.Files.newByteChannel(Files.java:407)
	at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
	at java.nio.file.Files.newInputStream(Files.java:152)
	at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:114)
	at org.elasticsearch.plugins.PluginsService.getModuleBundles(PluginsService.java:273)
	at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:117)
	... 4 more

To add to the above, I also checked /photon_data/elasticsearch/modules/lang-painless/ for duplicates. Which don't exist. Below screenshot for reference
Screen Shot 2020-03-26 at 3 16 12 PM

The photon_data is broken now.
Can anyone please look into this?
@andrh87, @timautin, @lonvia
I'm basically getting two kinds of errors,

  1. Caused by: java.lang.IllegalStateException: jar hell!
  2. Caused by: java.nio.file.FileSystemException: /Volumes/Data/projects/photon/photon_data/elasticsearch/modules/.DS_Store/plugin-descriptor.properties: Not a directory

When do we get the above errors?
And when does photon_data breaks? What can be done to fix it?

This is not my first attempt at running this application. I was able to run it previously.
But, suddenly ran into jar hell error.

To investigate, I set up the entire project again today. Now, still running into same issue. I just need a why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants