You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "crudboy (via GitHub)" <gi...@apache.org> on 2023/09/01 07:35:48 UTC
[GitHub] [shenyu] crudboy opened a new issue, #5104: [BUG] After shenyu-examples-http-swagger2 configures server.context.path, request /v2/api-docs returns 404
crudboy opened a new issue, #5104:
URL: https://github.com/apache/shenyu/issues/5104
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
shenyu-examples-http-swagger2 configuration server.context.path PullSwaggerDoc failure
### Expected Behavior
![image](https://github.com/apache/shenyu/assets/36815428/d715bb37-5b1d-4f39-8f39-27446e7dcad8)
In this method, the contextPath of the backend service needs to be added
### Steps To Reproduce
1. Add the following configuration to the application.yml file in shenyu-examples-http-swagger2
`server:
port: 8190
address: 0.0.0.0
tomcat:
max-http-form-post-size: 100MB
servlet:
context-path: /http-swagger2`
2. Start shenyu-examples-http-swagger2
3. Check shenyu-admin error occurs
4.
### Environment
```markdown
ShenYu version(s):master
```
### Debug logs
java.io.IOException: Response{protocol=http/1.1, code=404, message=, url=http://192.168.3.8:8190/v2/api-docs}
at org.apache.shenyu.admin.utils.HttpUtils.reqString(HttpUtils.java:404)
at org.apache.shenyu.admin.utils.HttpUtils.get(HttpUtils.java:197)
at org.apache.shenyu.admin.service.manager.impl.PullSwaggerDocServiceImpl.pullApiDocument(PullSwaggerDocServiceImpl.java:92)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.apache.shenyu.admin.service.manager.impl.PullSwaggerDocServiceImpl.pullApiDocument(PullSwaggerDocServiceImpl.java:69)
at org.apache.shenyu.admin.service.manager.impl.LoadServiceDocEntryImpl.loadDocOnSelectorChanged(LoadServiceDocEntryImpl.java:116)
at org.apache.shenyu.admin.listener.DataChangedEventDispatcher.onApplicationEvent(DataChangedEventDispatcher.java:68)
at org.apache.shenyu.admin.listener.DataChangedEventDispatcher.onApplicationEvent(DataChangedEventDispatcher.java:41)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
at org.apache.shenyu.admin.service.impl.UpstreamCheckService.updateSelectorHandler(UpstreamCheckService.java:380)
at org.apache.shenyu.admin.service.impl.UpstreamCheckService.updateHandler(UpstreamCheckService.java:351)
at org.apache.shenyu.admin.service.impl.UpstreamCheckService.lambda$submit$3(UpstreamCheckService.java:214)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
### Anything else?
_No response_
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] moremind commented on issue #5104: [BUG] After shenyu-examples-http-swagger2 configures server.context.path, request /v2/api-docs returns 404
Posted by "moremind (via GitHub)" <gi...@apache.org>.
moremind commented on issue #5104:
URL: https://github.com/apache/shenyu/issues/5104#issuecomment-1711085998
can you fix it?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] crudboy commented on issue #5104: [BUG] After shenyu-examples-http-swagger2 configures server.context.path, request /v2/api-docs returns 404
Posted by "crudboy (via GitHub)" <gi...@apache.org>.
crudboy commented on issue #5104:
URL: https://github.com/apache/shenyu/issues/5104#issuecomment-1720770085
have been handling work recently, so I haven't replied in a timely manner
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] crudboy commented on issue #5104: [BUG] After shenyu-examples-http-swagger2 configures server.context.path, request /v2/api-docs returns 404
Posted by "crudboy (via GitHub)" <gi...@apache.org>.
crudboy commented on issue #5104:
URL: https://github.com/apache/shenyu/issues/5104#issuecomment-1720768951
This is problematic. ContextPath is currently used in the source code as shenyu. client. http. props.contextPath is not the server used Obtained from server.servlet.context-path
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org