skyleaworlder commented on issue #14:
URL:
https://github.com/apache/shenyu-helm-chart/issues/14#issuecomment-1256929731
I also try to run shenyu-admin and shenyu-bootstrap by docker compose:
```yaml
version: "3.9"
services:
shenyu-admin:
image: apache/shenyu-admin:latest
container_name: shenyu-admin
restart: always
networks:
- shenyu
ports:
- "9095:9095"
environment:
- SPRING_PROFILES_ACTIVE=h2
- shenyu.database.init_script=sql-script/h2/schema.sql
healthcheck:
test: ["CMD-SHELL", "wget -q -O -
http://shenyu-admin:9095/actuator/health | grep UP || exit 1"]
timeout: 2s
retries: 30
shenyu-bootstrap:
image: apache/shenyu-bootstrap:latest
container_name: shenyu-bootstrap
restart: always
networks:
- shenyu
ports:
- "9195:9195"
environment:
- shenyu.sync.websocket.urls=ws://shenyu-admin:9095/websocket
networks:
shenyu:
name: shenyu
```
Finally, shenyu-bootstrap managed by docker compose can build websocket
connection with shenyu-admin:
```shell
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load
plugin:[tars] [org.apache.shenyu.plugin.tars.TarsPlugin]
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load
plugin:[dubbo] [org.apache.shenyu.plugin.apache.dubbo.ApacheDubboPlugin]
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load
plugin:[motan] [org.apache.shenyu.plugin.motan.MotanPlugin]
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load
plugin:[grpc] [org.apache.shenyu.plugin.grpc.GrpcPlugin]
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load
plugin:[cryptorResponse]
[org.apache.shenyu.plugin.cryptor.response.CryptorResponsePlugin]
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load
plugin:[response] [org.apache.shenyu.plugin.response.ResponsePlugin]
shenyu-bootstrap | 2022-09-24 10:00:19 [main] INFO
org.apache.shenyu.springboot.starter.sync.data.websocket.WebsocketSyncDataConfiguration
- you use websocket sync shenyu data.......
shenyu-bootstrap | 2022-09-24 10:00:19 [WebSocketConnectReadThread-27]
ERROR org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient
- websocket server[ws://shenyu-admin:9095/websocket] is error.....
shenyu-bootstrap | java.net.ConnectException: Connection refused
(Connection refused)
shenyu-bootstrap | at java.net.PlainSocketImpl.socketConnect(Native
Method)
shenyu-bootstrap | at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
shenyu-bootstrap | at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
shenyu-bootstrap | at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
shenyu-bootstrap | at java.net.Socket.connect(Socket.java:589)
shenyu-bootstrap | at
org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:461)
shenyu-bootstrap | at java.lang.Thread.run(Thread.java:748)
shenyu-bootstrap | 2022-09-24 10:00:19 [main] WARN
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient -
websocket connection server[ws://shenyu-admin:9095/websocket] is error.....
shenyu-bootstrap | 2022-09-24 10:00:20 [main] INFO
org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration
- Eureka HTTP Client uses RestTemplate.
shenyu-bootstrap | 2022-09-24 10:00:21 [main] INFO
org.springframework.boot.web.embedded.netty.NettyWebServer - Netty started on
port 9195
shenyu-bootstrap | 2022-09-24 10:00:21 [main] INFO
org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - Started
ShenyuBootstrapApplication in 19.335 seconds (JVM running for 20.913)
shenyu-admin | 2022-09-24 10:00:22 [main] INFO
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
- Inconsistent constructor declaration on bean with name
'httpServiceDiscovery': single autowire-marked constructor flagged as optional
- this constructor is effectively required since there is no default
constructor to fall back to: public
org.apache.shenyu.admin.listener.zookeeper.HttpServiceDiscovery(org.apache.shenyu.admin.service.SelectorService,org.apache.shenyu.admin.mapper.SelectorMapper,org.springframework.context.ApplicationEventPublisher,org.springframework.core.env.Environment)
shenyu-admin | 2022-09-24 10:00:23 [main] INFO
org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver - Exposing
1 endpoint(s) beneath base path '/actuator'
shenyu-admin | 2022-09-24 10:00:23 [main] INFO
springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping
- Mapped URL path [/v2/api-docs] onto
method
[springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String,
HttpServletRequest)]
shenyu-admin | 2022-09-24 10:00:23 [main] INFO
org.springframework.boot.autoconfigure.web.servlet.WelcomePageHandlerMapping -
Adding welcome page: class path resource [static/index.html]
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler
["http-nio-0.0.0.0-9095"]
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started
on port(s): 9095 (http) with context path ''
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
org.apache.shenyu.admin.service.manager.impl.LoadServiceDocEntryImpl -
getAllClusterLastUpdateInstanceList, Not loaded into available backend services.
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
org.apache.shenyu.admin.service.manager.impl.LoadServiceDocEntryImpl - load api
document No service registered.
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper -
Context refreshed
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper -
Found 1 custom documentation plugin(s)
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.scanners.ApiListingReferenceScanner -
Scanning for api listing references
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: detailUsingGET_1
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: batchEnabledUsingPOST_1
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: detailUsingGET_2
shenyu-admin | 2022-09-24 10:00:25 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: syncDataUsingPOST_1
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchUsingPOST_1
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchAdaptorUsingPOST_1
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchUsingPOST_2
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchAdaptorUsingPOST_2
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: detailRuleUsingGET_1
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchUsingPOST_3
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchAdaptorUsingPOST_3
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: deleteSelectorUsingDELETE_1
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchUsingPOST_4
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: searchAdaptorUsingPOST_4
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: batchEnabledUsingPOST_2
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator
- Generating unique operation named: detailUsingGET_3
shenyu-admin | 2022-09-24 10:00:26 [main] INFO
org.apache.shenyu.admin.ShenyuAdminBootstrap - Started ShenyuAdminBootstrap in
25.941 seconds (JVM running for 26.469)
shenyu-admin | 2022-09-24 10:00:27 [main] WARN
org.apache.shenyu.admin.utils.SessionUtil - get user info error ,not found,
used default user ,it unknown
shenyu-admin | 2022-09-24 10:00:29 [http-nio-0.0.0.0-9095-exec-1] INFO
org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing
Spring DispatcherServlet 'dispatcherServlet'
shenyu-admin | 2022-09-24 10:00:29 [http-nio-0.0.0.0-9095-exec-1] INFO
org.springframework.web.servlet.DispatcherServlet - Initializing Servlet
'dispatcherServlet'
shenyu-admin | 2022-09-24 10:00:29 [http-nio-0.0.0.0-9095-exec-1] INFO
org.springframework.web.servlet.DispatcherServlet - Completed initialization in
2 ms
shenyu-admin | 2022-09-24 10:00:29 [http-nio-0.0.0.0-9095-exec-1] INFO
org.apache.shenyu.admin.listener.websocket.WebsocketCollector - websocket on
client[172.18.0.2] open successful,maxTextMessageBufferSize:10240
shenyu-bootstrap | 2022-09-24 10:00:29 [shenyu-shared_wheel_timer-4] INFO
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient -
websocket connection server[ws://shenyu-admin:9095/websocket] is successful.....
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient -
handleResult({"groupType":"PLUGIN","eventType":"MYSELF","data":[{"id":"1","name":"sign","role":"Authentication","enabled":false,"sort":20},{"id":"2","name":"waf","config":"{\"model\":\"black\"}","role":"Authentication","enabled":false,"sort":50},{"id":"3","name":"rewrite","role":"HttpProcess","enabled":false,"sort":90},{"id":"4","name":"rateLimiter","config":"{\"master\":\"mymaster\",\"mode\":\"standalone\",\"url\":\"192.168.1.1:6379\",\"password\":\"abc\"}","role":"FaultTolerance","enabled":false,"sort":60},{"id":"5","name":"divide","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"Proxy","enabled":true,"sort":200},{"id":"6","name":"dubbo","config":"{\"register\":\"zookeeper://localhost:2181\",\"multiSelectorHandle\":\"1\",\"threadpool\":\"shared\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0}
","role":"Proxy","enabled":false,"sort":310},{"id":"8","name":"springCloud","role":"Proxy","enabled":false,"sort":200},{"id":"9","name":"hystrix","role":"FaultTolerance","enabled":false,"sort":130},{"id":"10","name":"sentinel","role":"FaultTolerance","enabled":false,"sort":140},{"id":"11","name":"sofa","config":"{\"protocol\":\"zookeeper\",\"register\":\"127.0.0.1:2181\",\"threadpool\":\"shared\"}","role":"Proxy","enabled":false,"sort":310},{"id":"12","name":"resilience4j","role":"FaultTolerance","enabled":false,"sort":310},{"id":"13","name":"tars","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"threadpool\":\"shared\"}","role":"Proxy","enabled":false,"sort":310},{"id":"14","name":"contextPath","role":"HttpProcess","enabled":true,"sort":80},{"id":"15","name":"grpc","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"threadpool\":\"shared\"}","role":"Proxy","enabled":false,"sort":310},{"id":"16","name":"redirect","role":"HttpProcess","enabled":fa
lse,"sort":110},{"id":"17","name":"motan","config":"{\"register\":\"127.0.0.1:2181\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0,\"threadpool\":\"shared\"}","role":"Proxy","enabled":false,"sort":310},{"id":"18","name":"loggingConsole","role":"Logging","enabled":false,"sort":160},{"id":"19","name":"jwt","config":"{\"secretKey\":\"key\"}","role":"Authentication","enabled":false,"sort":30},{"id":"20","name":"request","role":"HttpProcess","enabled":false,"sort":120},{"id":"21","name":"oauth2","role":"Authentication","enabled":false,"sort":40},{"id":"22","name":"paramMapping","config":"{\"ruleHandlePageType\":\"custom\"}","role":"HttpProcess","enabled":false,"sort":70},{"id":"23","name":"modifyResponse","config":"{\"ruleHandlePageType\":\"custom\"}","role":"HttpProcess","enabled":false,"sort":220},{"id":"24","name":"cryptorRequest","role":"Cryptor","enabled":true,"sort":100},{"id":"25","name":"cryptorResponse","role":"Cryptor","enabled":true,"sort":410},{"id":"26","name":"webso
cket","config":"{\"multiSelectorHandle\":\"1\"}","role":"Proxy","enabled":true,"sort":200},{"id":"27","name":"generalContext","role":"Common","enabled":true,"sort":125},{"id":"28","name":"mqtt","config":"{\"port\":
9500,\"bossGroupThreadCount\": 1,\"maxPayloadSize\":
65536,\"workerGroupThreadCount\": 12,\"userName\": \"shenyu\",\"password\":
\"shenyu\",\"isEncryptPassword\": false,\"encryptMode\":
\"\",\"leakDetectorLevel\":
\"DISABLED\"}","role":"Proxy","enabled":false,"sort":125},{"id":"29","name":"loggingRocketMQ","config":"{\"topic\":\"shenyu-access-logging\",
\"namesrvAddr\":
\"localhost:9876\",\"producerGroup\":\"shenyu-plugin-logging-rocketmq\"}","role":"Logging","enabled":false,"sort":170},{"id":"30","name":"cache","config":"{\"cacheType\":\"memory\"}","role":"Cache","enabled":false,"sort":10},{"id":"31","name":"mock","role":"Mock","enabled":false,"sort":1},{"id":"32","name":"loggingElasticSearch","config":"{\"host\":\"localhost\",
\"port\": \"9200\"}","role":"Logging","enab
led":false,"sort":190},{"id":"33","name":"loggingKafka","config":"{\"topic\":\"shenyu-access-logging\",
\"namesrvAddr\":
\"localhost:9092\"}","role":"Logging","enabled":false,"sort":180},{"id":"34","name":"loggingAliyunSls","config":"{\"projectName\":
\"shenyu\",
\"logStoreName\": \"shenyu-logstore\", \"topic\":
\"shenyu-topic\"}","role":"Logging","enabled":false,"sort":175},{"id":"35","name":"loggingPulsar","config":"{\"topic\":\"shenyu-access-logging\",
\"serviceUrl\":
\"pulsar://localhost:6650\"}","role":"Logging","enabled":false,"sort":185},{"id":"36","name":"loggingTencentCls","config":"{\"endpoint\":
\"ap-guangzhou.cls.tencentcs.com\", \"topic\":
\"shenyu-topic\"}","role":"Logging","enabled":false,"sort":176},{"id":"38","name":"loggingClickHouse","config":"{\"host\":\"127.0.0.1\",\"port\":\"8123\",\"databse\":\"shenyu-gateway\",\"username\":\"foo\",\"password\":\"bar\"}","role":"Logging","enabled":false,"sort":195}]})
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[divide]
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use
plugin:[contextPath]
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use
plugin:[cryptorRequest]
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use
plugin:[cryptorResponse]
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[websocket]
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use
plugin:[generalContext]
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingRocketMQ Plugin data:
{"id":"29","name":"loggingRocketMQ","config":"{\"topic\":\"shenyu-access-logging\",
\"namesrvAddr\":
\"localhost:9876\",\"producerGroup\":\"shenyu-plugin-logging-rocketmq\"}","role":"Logging","enabled":false,"sort":170}
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.cache.handler.CachePluginDataHandler - the plugin
cache is disabledshenyu-bootstrap | 2022-09-24 10:00:29
[WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingElasticSearch Plugin data:
{"id":"32","name":"loggingElasticSearch","config":"{\"host\":\"localhost\",
\"port\":
\"9200\"}","role":"Logging","enabled":false,"sort":190}shenyu-bootstrap |
2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingKafka Plugin data:
{"id":"33","name":"loggingKafka","config":"{\"topic\":\"shenyu-access-logging\",
\"namesrvAddr\":
\"localhost:9092\"}","role":"Logging","enabled":false,"sort":180}
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingAliyunSls Plugin data:
{"id":"34","name":"loggingAliyunSls","config":"{\"projectName\": \"shenyu\",
\"logStoreName\": \"shenyu-logstore\", \"topic\":
\"shenyu-topic\"}","role":"Logging","enabled":false,"sort":175}
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingPulsar Plugin data:
{"id":"35","name":"loggingPulsar","config":"{\"topic\":\"shenyu-access-logging\",
\"serviceUrl\":
\"pulsar://localhost:6650\"}","role":"Logging","enabled":false,"sort":185}
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingTencentCls Plugin data:
{"id":"36","name":"loggingTencentCls","config":"{\"endpoint\":
\"ap-guangzhou.cls.tencentcs.com\", \"topic\":
\"shenyu-topic\"}","role":"Logging","enabled":false,"sort":176}
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.logging.common.handler.AbstractLogPluginDataHandler -
handler loggingClickHouse Plugin data:
{"id":"38","name":"loggingClickHouse","config":"{\"host\":\"127.0.0.1\",\"port\":\"8123\",\"databse\":\"shenyu-gateway\",\"username\":\"foo\",\"password\":\"bar\"}","role":"Logging","enabled":false,"sort":195}
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient -
handleResult({"groupType":"SELECTOR","eventType":"MYSELF","data":[]})
shenyu-bootstrap | 2022-09-24 10:00:29 [WebSocketConnectReadThread-34] INFO
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient -
handleResult({"groupType":"RULE","eventType":"MYSELF","data":[]})
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]