You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/06/12 02:08:14 UTC

[GitHub] [servicecomb-fence] lyflyy edited a comment on issue #22: prepare中缺少对静态文件配置的说明

lyflyy edited a comment on issue #22:
URL: https://github.com/apache/servicecomb-fence/issues/22#issuecomment-643024085


   在项目中pom文件的配置是这样的
   ```
   <dependencies>
           <dependency>
               <groupId>org.apache.servicecomb</groupId>
               <artifactId>java-chassis-spring-boot-starter-servlet</artifactId>
           </dependency>
           <dependency>
               <groupId>org.apache.servicecomb</groupId>
               <artifactId>edge-core</artifactId>
           </dependency>
       </dependencies>
   ```
   
   配置文件中没有去声明[gateway.webroot]
   ![image](https://user-images.githubusercontent.com/22704284/84456974-08bd9180-ac94-11ea-8991-420a0507abbd.png)
   请求地址:http://localhost:9090/ui/login.html
   抛异常
   ```
   java.lang.IllegalStateException: Request has already been read
   	at io.vertx.core.http.impl.HttpServerRequestImpl.checkEnded(HttpServerRequestImpl.java:600) ~[vertx-core-3.8.3.jar:3.8.3]
   	at io.vertx.core.http.impl.HttpServerRequestImpl.handler(HttpServerRequestImpl.java:307) ~[vertx-core-3.8.3.jar:3.8.3]
   	at io.vertx.ext.web.impl.HttpServerRequestWrapper.handler(HttpServerRequestWrapper.java:78) ~[vertx-web-3.8.3.jar:3.8.3]
   	at org.apache.servicecomb.transport.rest.vertx.RestBodyHandler.handle(RestBodyHandler.java:102) ~[transport-rest-vertx-2.0.0.jar:2.0.0]
   	at org.apache.servicecomb.transport.rest.vertx.RestBodyHandler.handle(RestBodyHandler.java:56) ~[transport-rest-vertx-2.0.0.jar:2.0.0]
   	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:986) ~[vertx-web-3.8.3.jar:3.8.3]
   	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:131) ~[vertx-web-3.8.3.jar:3.8.3]
   	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:130) ~[vertx-web-3.8.3.jar:3.8.3]
   	at io.vertx.ext.web.handler.impl.StaticHandlerImpl.lambda$sendStatic$1(StaticHandlerImpl.java:206) ~[vertx-web-3.8.3.jar:3.8.3]
   	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:330) ~[vertx-core-3.8.3.jar:3.8.3]
   	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369) ~[vertx-core-3.8.3.jar:3.8.3]
   	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38) ~[vertx-core-3.8.3.jar:3.8.3]
   	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
   	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
   	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
   	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
   ```
   
   
   不知道gateway.webroot需要怎么设置才能正常访问到静态资源,示例项目直接启动也是有这个错误,bmi、porter都是这个异常


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org