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

500 Internal Server Error - photon unavailable #443

Closed
eliboni opened this issue Dec 8, 2019 · 15 comments
Closed

500 Internal Server Error - photon unavailable #443

eliboni opened this issue Dec 8, 2019 · 15 comments
Assignees

Comments

@eliboni
Copy link

eliboni commented Dec 8, 2019

Since Friday:
https://photon.komoot.de/api/?q=berlin&limit=8
returns:
500 Internal Server Error

in the browser I get a cross-origin complaint but I guess bottom line is photon is unavailable

@christophlingg
Copy link
Member

I will have a look on it

@christophlingg
Copy link
Member

it seems to have failed after an update of the search index, pulled from http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 . Has there been any backward incompatible change in the data structure @karussell ?

2019-12-09 08:28:32,596 [main] WARN  org.elasticsearch.common.util.IndexFolderUpgrader - [/home/photon/run/20191207/photon_data/elasticsearch/data/nodes/0/indices/4mz2z0YNQnWorSmXdKpqmA] no index state found - ignoring
2019-12-09 08:28:35,741 [main] INFO  de.komoot.photon.elasticsearch.Server - started elastic search node
2019-12-09 08:28:35,865 [qtp1102120514-52] ERROR spark.http.matching.GeneralError - 
org.elasticsearch.index.IndexNotFoundException: no such index
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.infe(IndexNameExpressionResolver.java:676) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(IndexNameExpressionResolver.java:630) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:578) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:168) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:140) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.search.TransportSearchAction.executeSearch(TransportSearchAction.java:263) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:186) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:65) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:170) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:142) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:84) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80) ~[photon-0.3.0.jar:?]
        at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54) ~[photon-0.3.0.jar:?]
        at de.komoot.photon.searcher.ReverseElasticsearchSearcher.search(ReverseElasticsearchSearcher.java:36) ~[photon-0.3.0.jar:?]
        at de.komoot.photon.searcher.AbstractReverseRequestHandler.handle(AbstractReverseRequestHandler.java:25) ~[photon-0.3.0.jar:?]
        at de.komoot.photon.ReverseSearchRequestHandler.handle(ReverseSearchRequestHandler.java:50) ~[photon-0.3.0.jar:?]
        at de.komoot.photon.ReverseSearchRequestHandler.handle(ReverseSearchRequestHandler.java:26) ~[photon-0.3.0.jar:?]
        at spark.RouteImpl$1.handle(RouteImpl.java:72) ~[photon-0.3.0.jar:?]
        at spark.http.matching.Routes.execute(Routes.java:61) ~[photon-0.3.0.jar:?]
        at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130) ~[photon-0.3.0.jar:?]
        at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.server.Server.handle(Server.java:564) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:126) ~[photon-0.3.0.jar:?]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673) [photon-0.3.0.jar:?]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591) [photon-0.3.0.jar:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66-internal]

@christophlingg
Copy link
Member

For now I am downloading the data again and give it a fresh try.

@lonvia
Copy link
Collaborator

lonvia commented Dec 9, 2019

It shouldn't. I was able to run a least the Germany extract against 0.3.1 and 0.3.2, last week when I tried. What version are you using?

@SigsiuTrinity
Copy link

SigsiuTrinity commented Dec 9, 2019

Any update guys? It still does not work:
https://photon.komoot.de/api/?q=berlin
"The requested URL was not found on the server."

@christophlingg
Copy link
Member

I am using photon 0.3, i upgraded to 0.3.1 and 0.3.2 as well and get another error:

2019-12-09 13:40:20,459 [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: 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: /home/photon/run/20191207/photon_data/elasticsearch/modules/lang-painless/lang-painless.jar
jar2: /home/photon/run/20191207/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

I assume it is related to some corrupted data. I wanted to retry with fresh data but the data seems corrupted:

> bzip2 -d photon-db-latest.tar.bz2 

bzip2: Data integrity error when decompressing.
        Input file = photon-db-latest.tar.bz2, output file = photon-db-latest.tar

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

bzip2: Deleting output file photon-db-latest.tar, if it exists.

I will try it another time via wget -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | pbzip2 -cd | tar x. unfortunately, only downloading takes around 2 hours. I will keep you updated.

@christophlingg
Copy link
Member

@karussell which photon version is required to run the data dump?

@christophlingg
Copy link
Member

btw, i found the hint of removing jars to avoid jar hell https://github.com/komoot/photon/releases/tag/0.3.2

@christophlingg
Copy link
Member

ok, photon.komoot.de is available again. after loading a new data dump it worked again. i am now also using photon-0.3.2

@LorenzoLeonardini
Copy link

Thank you for the fix, however now it gets blocked by the CORS policy.
It's fine if it's intended, but previously that wasn't the case.

@lonvia
Copy link
Collaborator

lonvia commented Dec 9, 2019

CORS was made confiugrable in #398. @christophlingg you need to add -cors-any to the photon command line.

@christophlingg
Copy link
Member

thanks for the hint, i added -cors-any, it now works as in previously @LorenzoLeonardini

@LorenzoLeonardini
Copy link

Thanks

@SalihSyr
Copy link

SalihSyr commented May 4, 2021

CORS was made confiugrable in #398. @christophlingg you need to add -cors-any to the photon command line.

Hi, where do I have to add -cors-any? What is the photon command line?

I also get the "no such Index" error and I'm using the 0.3.4 version

@lonvia
Copy link
Collaborator

lonvia commented May 4, 2021

Please do not comment on old closed tickets. Use the discussions feature if you have questions.

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

6 participants