skyleaworlder commented on issue #14:
URL: 
https://github.com/apache/shenyu-helm-chart/issues/14#issuecomment-1256949916

   > I think you can see this to configure `shenyu.sync.websocket.allowOrigins` 
@skyleaworlder
   > 
   > 
https://shenyu.apache.org/zh/docs/user-guide/property-config/admin-property-config#shenyusync-%E9%85%8D%E7%BD%AE
   
   Thanks. Actually I forgot to read manuals about application config. But this 
manual doesn't solve this.
   
   ```log
   # shenyu-admin
   2022-09-24 11:33:58 [http-nio-0.0.0.0-9095-exec-5] ERROR 
org.apache.shenyu.admin.listener.websocket.WebsocketConfigurator - 
originHeaderValue is forbidden: 
ws://shenyu-bootstrap.shenyu.svc.cluster.local:9195
   2022-09-24 11:34:08 [http-nio-0.0.0.0-9095-exec-7] ERROR 
org.apache.shenyu.admin.listener.websocket.WebsocketConfigurator - 
originHeaderValue is forbidden: 
ws://shenyu-bootstrap.shenyu.svc.cluster.local:9195
   
   # shenyu-bootstrap
   2022-09-24 11:33:58 [shenyu-shared_wheel_timer-4] WARN  
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - 
websocket connection 
server[ws://shenyu-admin.shenyu.svc.cluster.local:9095/websocket] is error.....
   2022-09-24 11:34:08 [shenyu-shared_wheel_timer-4] WARN  
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - 
websocket connection 
server[ws://shenyu-admin.shenyu.svc.cluster.local:9095/websocket] is error.....
   ```
   
   Here shenyu-helm-chart provides a basic 
[configuration](https://github.com/apache/shenyu-helm-chart/blob/main/charts/shenyu/values.yaml#L219):
   
   ```yaml
         sync:
           websocket:
             urls: ws://{{ template "common.names.fullname" . 
}}-admin.shenyu.svc.cluster.local:9095/websocket
             allowOrigin: ws://{{ template "common.names.fullname" . 
}}-bootstrap.shenyu.svc.cluster.local:9195
   ```
   
   And I also check it in shenyu-bootstrap pod:
   
   ```yaml
   allowOrigin: ws://shenyu-bootstrap.shenyu.svc.cluster.local:9195
   urls: ws://shenyu-admin.shenyu.svc.cluster.local:9095/websocket
   ```
   
   <details>
   
   ```yaml
   /opt/shenyu-bootstrap/conf # cat application.yml
   eureka:
     client:
       enabled: false
       serviceUrl:
         defaultZone: http://localhost:8761/eureka/
     instance:
       prefer-ip-address: true
   logging:
     level:
       org.apache.ibatis: info
       org.apache.shenyu: info
       org.apache.shenyu.bonuspoint: info
       org.apache.shenyu.lottery: info
       org.springframework.boot: info
       root: info
   management:
     health:
       defaults:
         enabled: false
   server:
     address: 0.0.0.0
     port: 9195
   shenyu:
     cross:
       allowCredentials: true
       allowedAnyOrigin: true
       allowedExpose: ""
       allowedHeaders: null
       allowedMethods: '*'
       enabled: true
       maxAge: "18000"
     exclude:
       enabled: false
       paths:
       - /favicon.ico
     extPlugin:
       enabled: true
       path: null
       scheduleDelay: 30
       scheduleTime: 300
       threads: 1
     fallback:
       enabled: false
       paths:
       - /fallback/hystrix
       - /fallback/resilience4j
     file:
       enabled: true
       maxSize: 10
     health:
       enabled: false
       paths:
       - /actuator/health
       - /health_check
     instance:
       enabled: false
       props: null
       registerType: zookeeper
       serverLists: localhost:2181
     local:
       enabled: false
       sha512Key: 
BA3253876AED6BC22D4A6FF53D8406C6AD864195ED144AB5C87621B6C233B548BAEAE6956DF346EC8C17F5EA10F35EE3CBC514797ED7DDD3145464E2A0BAB413
     matchCache:
       enabled: false
       maxFreeMemory: 256
     metrics:
       enabled: false
       host: 127.0.0.1
       jmxConfig: null
       name: prometheus
       port: 8090
       props:
         jvm_enabled: true
     netty:
       http:
         accessLog: false
         selectCount: 1
         serverSocketChannel:
           allocType: pooled
           autoRead: false
           connectTimeoutMillis: 10000
           messageSizeEstimator: 8
           singleEventExecutorPerGroup: true
           soBackLog: 128
           soRcvBuf: 87380
           soReuseAddr: false
           writeBufferHighWaterMark: 65536
           writeBufferLowWaterMark: 32768
           writeSpinCount: 16
         socketChannel:
           allocType: pooled
           allowHalfClosure: false
           autoRead: false
           connectTimeoutMillis: 10000
           ipTos: 0
           messageSizeEstimator: 8
           singleEventExecutorPerGroup: true
           soKeepAlive: false
           soLinger: -1
           soRcvBuf: 87380
           soReuseAddr: false
           soSndBuf: 16384
           tcpNoDelay: true
           writeBufferHighWaterMark: 65536
           writeBufferLowWaterMark: 32768
           writeSpinCount: 16
         webServerFactoryEnabled: true
         workerCount: 4
     ribbon:
       serverListRefreshInterval: 10000
     scheduler:
       enabled: false
       threads: 16
       type: fixed
     switchConfig:
       local: true
     sync:
       websocket:
         allowOrigin: ws://shenyu-bootstrap.shenyu.svc.cluster.local:9195
         urls: ws://shenyu-admin.shenyu.svc.cluster.local:9095/websocket
     upstreamCheck:
       enabled: false
       healthyThreshold: 1
       interval: 5000
       printEnabled: true
       printInterval: 60000
       timeout: 3000
       unhealthyThreshold: 1
   spring:
     application:
       name: shenyu-bootstrap
     cloud:
       discovery:
         enabled: false
       nacos:
         discovery:
           enabled: false
           namespace: ShenyuRegisterCenter
           server-addr: 127.0.0.1:8848
     codec:
       max-in-memory-size: 2MB
     main:
       allow-bean-definition-overriding: true
   ```
   </details>


-- 
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]

Reply via email to