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

/client generates a 500 error #1

Closed
SR-G opened this issue Oct 1, 2015 · 7 comments
Closed

/client generates a 500 error #1

SR-G opened this issue Oct 1, 2015 · 7 comments

Comments

@SR-G
Copy link

SR-G commented Oct 1, 2015

At this time on my side i get a 500 internal error when clicking on the /client URL as generated in the index.html.

Corresponding logs are :

17:05:58.339 [qtp1941749992-21] DEBUG o.e.jetty.server.HttpChannelState - HttpChannelState@38444366{s=IDLE a=null i=true r=!P!U w=false} handling IDLE
17:05:58.339 [qtp1941749992-21] DEBUG org.eclipse.jetty.server.HttpChannel - HttpChannelOverHttp@3b9147bd{r=5,c=false,a=DISPATCHED,uri=/client} action REQUEST_DISPATCH
17:05:58.339 [qtp1941749992-21] DEBUG org.eclipse.jetty.server.Server - REQUEST on HttpChannelOverHttp@3b9147bd{r=5,c=false,a=DISPATCHED,uri=/client}
GET //tensin.org:9014/client?site=http%3A%2F%2Ftensin.org%3A9014%2F
Host: tensin.org:9014
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174
Referer: http:https://tensin.org:9014/
Accept-Encoding: gzip, deflate, lzma, sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: _ga=GA1.2.1773510997.1443266043


17:05:58.340 [qtp1941749992-21] DEBUG org.eclipse.jetty.server.session - sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7fab5998
17:05:58.340 [qtp1941749992-21] DEBUG org.eclipse.jetty.server.session - session=null
17:05:58.340 [qtp1941749992-21] DEBUG spark.webserver.MatcherFilter - httpMethod:get, uri: /client
17:05:58.340 [qtp1941749992-21] DEBUG spark.Request - get params
17:05:58.340 [qtp1941749992-21] DEBUG spark.Request - get splat
17:05:58.340 [qtp1941749992-21] DEBUG spark.Request - get params
17:05:58.340 [qtp1941749992-21] DEBUG spark.Request - get splat
17:05:58.341 [qtp1941749992-21] DEBUG spark.Request - get params
17:05:58.341 [qtp1941749992-21] DEBUG spark.Request - get splat
17:05:58.419 [qtp1941749992-21] ERROR com.martiansoftware.boom.Templates - Template not found in classpath: /templates/boom/status/500.html
17:05:58.419 [qtp1941749992-21] ERROR com.martiansoftware.boom.Templates - Template not found in classpath: /boom-default-templates/boom/status/500.html
17:05:58.419 [qtp1941749992-21] ERROR com.martiansoftware.boom.Templates - Template not found in classpath: /templates/boom/status/default.html
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.server.HttpChannel - Commit HTTP/1.1{s=500,h=2} to HttpChannelOverHttp@3b9147bd{r=5,c=true,a=DISPATCHED,uri=/client}
17:05:58.424 [qtp1941749992-21] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$SendCallback@643dc8fb[PROCESSING][i=HTTP/1.1{s=500,h=2},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@589ddd3] generate: NEED_HEADER (null,[p=0,l=703,c=32768,r=703],false)@START
17:05:58.424 [qtp1941749992-21] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$SendCallback@643dc8fb[PROCESSING][i=HTTP/1.1{s=500,h=2},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@589ddd3] generate: FLUSH ([p=0,l=156,c=8192,r=156],[p=0,l=703,c=32768,r=703],false)@COMMITTED
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.io.WriteFlusher - write: WriteFlusher@44023019{IDLE} [HeapByteBuffer@16d8499f[p=0,l=156,c=8192,r=156]={<<<HTTP/1.1 500 Serv...50730)\r\n\r\n2BF\r\n>>>la/5.0 (Windows N...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00},DirectByteBuffer@12c85d53[p=0,l=703,c=32768,r=703]={<<<<html>\n    <head>...dy>    \n</html>>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}]
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.io.WriteFlusher - update WriteFlusher@44023019{WRITING}:IDLE-->WRITING
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.io.ChannelEndPoint - flushed 859 SelectChannelEndPoint@3e86e1a0{/82.216.82.125:63274<->4567,Open,in,out,-,W,87/3600000,HttpConnection}{io=0/0,kio=0,kro=1}
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.io.WriteFlusher - Flushed=true 156/156+1 WriteFlusher@44023019{WRITING}
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.io.WriteFlusher - update WriteFlusher@44023019{IDLE}:WRITING-->IDLE
17:05:58.424 [qtp1941749992-21] DEBUG o.e.jetty.server.HttpConnection - org.eclipse.jetty.server.HttpConnection$SendCallback@643dc8fb[PROCESSING][i=HTTP/1.1{s=500,h=2},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@589ddd3] generate: DONE ([p=156,l=156,c=8192,r=0],[p=703,l=703,c=32768,r=0],false)@COMMITTED
17:05:58.424 [qtp1941749992-21] DEBUG org.eclipse.jetty.server.Server - RESPONSE for /client h=true
500 null
Date: Thu, 01 Oct 2015 15:05:58 GMT
Content-Type: text/html
@martylamb
Copy link
Owner

Thanks. I pushed new code for the /client URL this morning; is this run using commit c3553b1 ? ("git log -n1" should tell you)

martylamb added a commit that referenced this issue Oct 2, 2015
…t. Improve logging in ClientGetter to get to the bottom of #1
@martylamb
Copy link
Owner

I'm having trouble reproducing this, so I just pushed some changes to both martifacts and boom that will hopefully provide some more helpful info in the logs. If you don't mind trying again can you repeat the test and post the log output here?

Thanks!

@SR-G
Copy link
Author

SR-G commented Oct 2, 2015

Have a clear error now, should be easy to fix now (either on my side, either on yours, haven't checked the code yet).

14:34:33.584 [qtp1028510072-17] DEBUG spark.webserver.MatcherFilter - httpMethod:get, uri: /client
14:34:33.584 [qtp1028510072-17] DEBUG spark.Request - get params
14:34:33.584 [qtp1028510072-17] DEBUG spark.Request - get splat
14:34:33.584 [qtp1028510072-17] DEBUG spark.Request - get params
14:34:33.584 [qtp1028510072-17] DEBUG spark.Request - get splat
14:34:33.584 [qtp1028510072-17] DEBUG spark.Request - get params
14:34:33.584 [qtp1028510072-17] DEBUG spark.Request - get splat
14:34:33.585 [qtp1028510072-17] DEBUG c.m.martifacts.web.ClientGetter - getClient() => site='Optional[http:https://tensin.org:9014/]'
14:34:33.585 [qtp1028510072-17] DEBUG c.m.martifacts.web.ClientGetter - getClient() => url='http:https://tensin.org:9014/client'
14:34:33.585 [qtp1028510072-17] DEBUG c.m.martifacts.web.ClientGetter - getClient() => URLdef='URL="http:https://tensin.org:9014"
'
14:34:33.598 [qtp1028510072-17] ERROR com.martiansoftware.boom.StatusPage - 500: null
java.nio.file.FileSystemNotFoundException: null
    at com.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171) ~[zipfs.jar:1.8.0_60]
    at com.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157) ~[zipfs.jar:1.8.0_60]
    at java.nio.file.Paths.get(Paths.java:143) ~[na:1.8.0_60]
    at com.martiansoftware.martifacts.web.ClientGetter.getClient(ClientGetter.java:36) ~[martifacts-0.1.0-SNAPSHOT.jar:na]
    at com.martiansoftware.boom.BoomRoute.handle(BoomRoute.java:14) ~[boom-0.1.0-SNAPSHOT.jar:na]
    at com.martiansoftware.boom.RouteWrapper.handle(RouteWrapper.java:24) ~[boom-0.1.0-SNAPSHOT.jar:na]
    at spark.RouteImpl$1.handle(RouteImpl.java:58) [spark-core-2.3.jar:na]
    at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162) [spark-core-2.3.jar:na]
    at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61) [spark-core-2.3.jar:na]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.server.Server.handle(Server.java:517) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) [jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245) [jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) [jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) [jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) [jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) [jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) [jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
14:34:33.602 [qtp1028510072-17] ERROR com.martiansoftware.boom.Templates - Template not found in classpath: /templates/boom/status/500.html

@martylamb
Copy link
Owner

Aha! Yes, that's super-helpful. I would not have guessed that to be the line causing the issue. Should be able to resolve this tonight.

In the meantime you can just download the client from here: https://github.com/martylamb/martifacts/blob/master/src/main/resources/client/martifacts

But you'll need to edit line 4 so that the "URL" var points to your server (basically the URL of the web interface).

@SR-G
Copy link
Author

SR-G commented Oct 2, 2015

Don't worry i tryed the .sh client before (manually indeed) and it's working.

At a very quick glance, the problem may just be that i'm running (in a docker container) with a classpath only populated with jars (thus the code should be getResourceAsStream()) and when starting in dev the file is accessible directly from the filesystem (thus getResource()).

martylamb added a commit that referenced this issue Oct 2, 2015
…. just use a bufferedreader instead so there's no Path use and thus (hopefully) no FileSystemNotFoundException.

Also change path for client download from /client to /martifact so that various downloaders (I'm looking at you wget) will name the downloaded file correctly.
@SR-G
Copy link
Author

SR-G commented Oct 3, 2015

Okay i confirm that client downloading is working without error now since f7df25a commit (downloaded file named "martifacts", without .sh)

@SR-G SR-G closed this as completed Oct 3, 2015
@martylamb
Copy link
Owner

That's great. Thanks much for helping to test this.

martylamb added a commit that referenced this issue Nov 8, 2023
…t. Improve logging in ClientGetter to get to the bottom of #1
martylamb added a commit that referenced this issue Nov 8, 2023
…. just use a bufferedreader instead so there's no Path use and thus (hopefully) no FileSystemNotFoundException.

Also change path for client download from /client to /martifact so that various downloaders (I'm looking at you wget) will name the downloaded file correctly.
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

2 participants