profile-summary-for-github icon indicating copy to clipboard operation
profile-summary-for-github copied to clipboard

Not able to run `docker run` commands successfully.

Open saltoukhy opened this issue 5 years ago • 3 comments

Ran docker run -it --rm --name profile-summary-for-github -p 7070:7070 profile-summary-for-github according to the README and got the following error:

[main] INFO org.eclipse.jetty.util.log - Logging initialized @144ms to org.eclipse.jetty.util.log.Slf4jLog
[main] INFO io.javalin.Javalin - Static file handler added with path=/public and location=CLASSPATH. Absolute path: 'jar:file:/var/github-summary/profile-summary-for-github.jar!/public'.
[main] INFO io.javalin.Javalin - 
           __                      __ _
          / /____ _ _   __ ____ _ / /(_)____
     __  / // __ `/| | / // __ `// // // __ \
    / /_/ // /_/ / | |/ // /_/ // // // / / /
    \____/ \__,_/  |___/ \__,_//_//_//_/ /_/

        https://javalin.io/documentation

[main] INFO io.javalin.Javalin - Starting Javalin ...
[main] INFO io.javalin.Javalin - Listening on http://localhost:7070/
[main] INFO io.javalin.Javalin - Javalin started in 87ms \o/
[pool-2-thread-1] INFO app.GhService - Pinged client 0 - was rate-limited
Exception in thread "main" java.lang.ExceptionInInitializerError
	at app.MainKt.main(Main.kt:60)
	at app.MainKt.main(Main.kt)
Caused by: org.eclipse.egit.github.core.client.RequestException: Bad credentials (401)
	at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:552)
	at org.eclipse.egit.github.core.client.GitHubClient.get(GitHubClient.java:740)
	at org.eclipse.egit.github.core.service.RepositoryService.getRepository(RepositoryService.java:606)
	at org.eclipse.egit.github.core.service.RepositoryService.getRepository(RepositoryService.java:590)
	at app.UserService.<clinit>(UserService.kt:18)
	... 2 more

Ran docker run -it --rm --name profile-summary-for-github -p 7070:7070 -e "API_TOKENS=mytoken1,mytoken2" profile-summary-for-github with my token and that executed successfully but as soon as I tried to navigate to the page, it gave me the following error:

[main] INFO org.eclipse.jetty.util.log - Logging initialized @152ms to org.eclipse.jetty.util.log.Slf4jLog
[main] INFO io.javalin.Javalin - Static file handler added with path=/public and location=CLASSPATH. Absolute path: 'jar:file:/var/github-summary/profile-summary-for-github.jar!/public'.
[main] INFO io.javalin.Javalin - 
           __                      __ _
          / /____ _ _   __ ____ _ / /(_)____
     __  / // __ `/| | / // __ `// // // __ \
    / /_/ // /_/ / | |/ // /_/ // // // / / /
    \____/ \__,_/  |___/ \__,_//_//_//_/ /_/

        https://javalin.io/documentation

[main] INFO io.javalin.Javalin - Starting Javalin ...
[main] INFO io.javalin.Javalin - Listening on http://localhost:7070/
[main] INFO io.javalin.Javalin - Javalin started in 90ms \o/
[pool-2-thread-1] INFO app.GhService - Pinged client 0 - client.remainingRequests was 4808
[qtp1590550415-16] INFO org.eclipse.jetty.util.TypeUtil - JVM Runtime does not support Modules
[qtp1590550415-13] WARN app.MainKt - Uncaught exception
java.nio.file.NoSuchFileException: src/main/resources/vue
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
	at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.nio.file.Files.readAttributes(Files.java:1737)
	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
	at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
	at java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:72)
	at java.nio.file.Files.walk(Files.java:3574)
	at io.javalin.plugin.rendering.vue.JavalinVue.walkPaths$javalin(JavalinVue.kt:33)
	at io.javalin.plugin.rendering.vue.VueComponent.handle(JavalinVue.kt:63)
	at io.javalin.core.security.SecurityUtil.noopAccessManager(SecurityUtil.kt:22)
	at io.javalin.http.JavalinServlet$addHandler$protectedHandler$1.handle(JavalinServlet.kt:116)
	at io.javalin.http.JavalinServlet$service$2$1.invoke(JavalinServlet.kt:45)
	at io.javalin.http.JavalinServlet$service$2$1.invoke(JavalinServlet.kt:24)
	at io.javalin.http.JavalinServlet$service$1.invoke(JavalinServlet.kt:123)
	at io.javalin.http.JavalinServlet$service$2.invoke(JavalinServlet.kt:40)
	at io.javalin.http.JavalinServlet.service(JavalinServlet.kt:75)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at io.javalin.core.JavalinServer$start$httpHandler$1.doHandle(JavalinServer.kt:53)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:494)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at java.lang.Thread.run(Thread.java:748)

saltoukhy avatar Sep 16 '19 19:09 saltoukhy

same situation, any suggestions?

yuxuanwu17 avatar May 11 '21 12:05 yuxuanwu17

Same here with java.nio.file.NoSuchFileException: src/main/resources/vue error

Markkop avatar Jun 14 '21 19:06 Markkop

Managed to make it work by adding the following in Main.kt

// ...
import io.javalin.http.staticfiles.Location;
import io.javalin.plugin.rendering.vue.JavalinVue
// ...

fun main() {
    JavalinVue.rootDirectory("/vue", Location.CLASSPATH);
    // ...
}

Markkop avatar Jun 14 '21 20:06 Markkop