apache / shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
https://shenyu.apache.org/
Apache License 2.0
8.44k stars 2.93k forks source link

docekr run v2.4.3 websocket timer bug "shenyu-shared_wheel_timer-1" java.lang.ArrayIndexOutOfBoundsException #3341

Closed inernoro closed 2 years ago

inernoro commented 2 years ago

Is there an existing issue for this?

Current Behavior

Exception in thread "shenyu-shared_wheel_timer-1" java.lang.ArrayIndexOutOfBoundsException: -9 at org.apache.shenyu.common.timer.TimingWheel.getBucket(TimingWheel.java:116) at org.apache.shenyu.common.timer.TimingWheel.add(TimingWheel.java:88) at org.apache.shenyu.common.timer.HierarchicalWheelTimer.addTimerTaskEntry(HierarchicalWheelTimer.java:104) at org.apache.shenyu.common.timer.TimerTaskList.flush(TimerTaskList.java:78) at org.apache.shenyu.common.timer.HierarchicalWheelTimer.advanceClock(HierarchicalWheelTimer.java:119) at org.apache.shenyu.common.timer.HierarchicalWheelTimer$Worker.run(HierarchicalWheelTimer.java:164) at java.lang.Thread.run(Thread.java:748)

Expected Behavior

web socket connection Keep trying again

like :

2022-04-26 16:51:48 [shenyu-shared_wheel_timer-3] WARN org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - websocket connection server[ws://10.0.4.2:9095/websocket] is error..... 2022-04-26 16:52:01 [shenyu-shared_wheel_timer-3] WARN org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - websocket connection server[ws://10.0.4.2:9095/websocket] is error..... 2022-04-26 16:52:13 [shenyu-shared_wheel_timer-3] WARN org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - websocket connection server[ws://10.0.4.2:9095/websocket] is error..... but not

This problem only occurs in Linux, but not in idea debugging

Steps To Reproduce

wget https://github.com//apache/incubator-shenyu/archive/refs/tags/v2.4.3.zip

mdb5sum incubator-shenyu-2.4.3.zip # output (57824d30da9e2ee096c3175d1a9a6c2b)

unzip v2.4.3.zip

mvn clean install -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests

mvn clean package -B -Prelease,docker -Dmaven.javadoc.skip=true -Dmaven.test.skip=true

docker run -d \ --network host \ -e "TZ=Asia/Shanghai" \ -e "JAVA_OPTS=-server -Xmx1024m -Xms1024m" \ --name "shenyu-bootstrap" \ apache/shenyu-bootstrap:2.4.3

image

Environment

ShenYu version(s):2.4.3
maven 3.6.3
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

Debug logs

current jdk version:1.8.0_212 sh: =~: unknown operand sh: =~: unknown operand sh: =~: unknown operand Starting the ShenYu-Bootstrap ... Please check the log files: /opt/shenyu-bootstrap/logs/shenyu-bootstrap.log 16:46:47,300 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender] 16:46:47,300 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_ERROR_FILE] 16:46:47,300 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ERROR_FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] 16:46:47,301 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Attaching appender named [ERROR_FILE] to AsyncAppender. 16:46:47,301 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Setting discardingThreshold to 0 16:46:47,301 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 16:46:47,301 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_FILE] to Logger[ROOT] 16:46:47,301 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_ERROR_FILE] to Logger[ROOT] 16:46:47,301 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 16:46:47,302 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@4bb4de6a - Registering current configuration as safe fallback point 16:46:47,800 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Worker thread will flush remaining events before exiting. 16:46:47,802 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Queue flush finished successfully within timeout. 16:46:47,802 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Worker thread will flush remaining events before exiting. 16:46:47,803 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Queue flush finished successfully within timeout. 16:46:47,813 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 16:46:47,814 |-INFO in ch.qos.logback.core.joran.action.ShutdownHookAction - About to instantiate shutdown hook of type [ch.qos.logback.core.hook.DelayingShutdownHook] 16:46:47,814 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.OnConsoleStatusListener] 16:46:47,815 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 16:46:47,815 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE] 16:46:47,816 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1349182676 - setting totalSizeCap to 10 GB 16:46:47,816 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1349182676 - Archive files will be limited to [100 MB] each. 16:46:47,817 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1349182676 - Will use zip compression 16:46:47,817 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1349182676 - Will use the pattern ./logs/shenyu-bootstrap.%d{yyyy-MM-dd}.%i.log for the active file 16:46:47,818 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d4f9aae - The date pattern is 'yyyy-MM-dd' from file name pattern './logs/shenyu-bootstrap.%d{yyyy-MM-dd}.%i.log.zip'. 16:46:47,818 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d4f9aae - Roll-over at midnight. 16:46:47,818 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d4f9aae - Setting initial period to Tue Apr 26 16:46:47 CST 2022 16:46:47,819 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 16:46:47,820 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: ./logs/shenyu-bootstrap.log 16:46:47,820 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [./logs/shenyu-bootstrap.log] 16:46:47,820 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender] 16:46:47,820 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_FILE] 16:46:47,821 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] 16:46:47,821 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Attaching appender named [FILE] to AsyncAppender. 16:46:47,821 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Setting discardingThreshold to 0 16:46:47,821 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 16:46:47,821 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ERROR_FILE] 16:46:47,823 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@120478350 - setting totalSizeCap to 10 GB 16:46:47,823 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@120478350 - Archive files will be limited to [100 MB] each. 16:46:47,823 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@120478350 - Will use zip compression 16:46:47,823 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@120478350 - Will use the pattern ./logs/shenyu-bootstrap.%d{yyyy-MM-dd}-error.%i.log for the active file 16:46:47,824 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@54e1c68b - The date pattern is 'yyyy-MM-dd' from file name pattern './logs/shenyu-bootstrap.%d{yyyy-MM-dd}-error.%i.log.zip'. 16:46:47,824 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@54e1c68b - Roll-over at midnight. 16:46:47,825 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@54e1c68b - Setting initial period to Tue Apr 26 16:46:47 CST 2022 16:46:47,825 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 16:46:47,826 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - Active log file name: ./logs/shenyu-bootstrap-error.log 16:46:47,826 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - File property is set to [./logs/shenyu-bootstrap-error.log] 16:46:47,826 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender] 16:46:47,826 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_ERROR_FILE] 16:46:47,827 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ERROR_FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] 16:46:47,827 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Attaching appender named [ERROR_FILE] to AsyncAppender. 16:46:47,827 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Setting discardingThreshold to 0 16:46:47,827 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 16:46:47,827 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@53aac487 - Propagating INFO level on Logger[ROOT] onto the JUL framework 16:46:47,828 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_FILE] to Logger[ROOT] 16:46:47,828 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_ERROR_FILE] to Logger[ROOT] 16:46:47,828 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 16:46:47,828 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@783a467b - Registering current configuration as safe fallback point 2022-04-26 16:46:47 [main] INFO org.apache.shenyu.web.logo.ShenyuLogo -


/ __| | | ( | | _ _ | ' \ / \ '_ | | | | | | | __) | | | | / | | | || | || | |__/|| ||\|| ||_, |_,| / | |/ :: Shenyu :: (v2.4.3)

16:46:48,464 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Worker thread will flush remaining events before exiting. 16:46:48,465 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Queue flush finished successfully within timeout. 16:46:48,465 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Worker thread will flush remaining events before exiting. 16:46:48,465 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Queue flush finished successfully within timeout. 16:46:48,471 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 16:46:48,471 |-INFO in ch.qos.logback.core.joran.action.ShutdownHookAction - About to instantiate shutdown hook of type [ch.qos.logback.core.hook.DelayingShutdownHook] 16:46:48,472 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.OnConsoleStatusListener] 16:46:48,472 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 16:46:48,472 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE] 16:46:48,473 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@373097727 - setting totalSizeCap to 10 GB 16:46:48,474 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@373097727 - Archive files will be limited to [100 MB] each. 16:46:48,474 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@373097727 - Will use zip compression 16:46:48,474 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@373097727 - Will use the pattern ./logs/shenyu-bootstrap.%d{yyyy-MM-dd}.%i.log for the active file 16:46:48,475 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7c209437 - The date pattern is 'yyyy-MM-dd' from file name pattern './logs/shenyu-bootstrap.%d{yyyy-MM-dd}.%i.log.zip'. 16:46:48,475 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7c209437 - Roll-over at midnight. 16:46:48,475 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7c209437 - Setting initial period to Tue Apr 26 16:46:48 CST 2022 16:46:48,476 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 16:46:48,477 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: ./logs/shenyu-bootstrap.log 16:46:48,477 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [./logs/shenyu-bootstrap.log] 16:46:48,477 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender] 16:46:48,477 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_FILE] 16:46:48,477 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] 16:46:48,477 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Attaching appender named [FILE] to AsyncAppender. 16:46:48,477 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Setting discardingThreshold to 0 16:46:48,481 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 16:46:48,481 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ERROR_FILE] 16:46:48,482 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@576894497 - setting totalSizeCap to 10 GB 16:46:48,483 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@576894497 - Archive files will be limited to [100 MB] each. 16:46:48,483 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@576894497 - Will use zip compression 16:46:48,483 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@576894497 - Will use the pattern ./logs/shenyu-bootstrap.%d{yyyy-MM-dd}-error.%i.log for the active file 16:46:48,485 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@788fcafb - The date pattern is 'yyyy-MM-dd' from file name pattern './logs/shenyu-bootstrap.%d{yyyy-MM-dd}-error.%i.log.zip'. 16:46:48,485 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@788fcafb - Roll-over at midnight. 16:46:48,485 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@788fcafb - Setting initial period to Tue Apr 26 16:46:47 CST 2022 16:46:48,486 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 16:46:48,486 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - Active log file name: ./logs/shenyu-bootstrap-error.log 16:46:48,486 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - File property is set to [./logs/shenyu-bootstrap-error.log] 16:46:48,486 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender] 16:46:48,487 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_ERROR_FILE] 16:46:48,487 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ERROR_FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] 16:46:48,487 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Attaching appender named [ERROR_FILE] to AsyncAppender. 16:46:48,487 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Setting discardingThreshold to 0 16:46:48,487 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 16:46:48,487 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@4febb875 - Propagating INFO level on Logger[ROOT] onto the JUL framework 16:46:48,488 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_FILE] to Logger[ROOT] 16:46:48,488 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_ERROR_FILE] to Logger[ROOT] 16:46:48,488 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 16:46:48,488 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@25e2a451 - Registering current configuration as safe fallback point 16:46:48,492 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@4febb875 - Propagating INFO level on Logger[org.springframework.boot] onto the JUL framework 16:46:48,492 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@4febb875 - Propagating INFO level on Logger[org.apache.ibatis] onto the JUL framework 16:46:48,493 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@4febb875 - Propagating INFO level on Logger[org.apache.shenyu.bonuspoint] onto the JUL framework 16:46:48,493 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@4febb875 - Propagating INFO level on Logger[org.apache.shenyu.lottery] onto the JUL framework 16:46:48,493 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@4febb875 - Propagating INFO level on Logger[org.apache.shenyu] onto the JUL framework

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v2.2.2.RELEASE)

2022-04-26 16:46:48 [main] INFO org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - The following profiles are active: local 2022-04-26 16:46:49 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! 2022-04-26 16:46:49 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode. 2022-04-26 16:46:49 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 12ms. Found 0 Redis repository interfaces. 2022-04-26 16:46:49 [main] INFO org.springframework.cloud.context.scope.GenericScope - BeanFactory id=6a502ec7-5cfe-34f8-bd8f-e5d1e1871c72 2022-04-26 16:46:50 [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources. 2022-04-26 16:46:50 [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 2022-04-26 16:46:50 [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources. 2022-04-26 16:46:50 [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 2022-04-26 16:46:51 [main] INFO org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver - Exposing 2 endpoint(s) beneath base path '/actuator' 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[global] [org.apache.shenyu.plugin.global.GlobalPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sign] [org.apache.shenyu.plugin.sign.SignPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[jwt] [org.apache.shenyu.plugin.jwt.JwtPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[oauth2] [org.apache.shenyu.plugin.oauth2.OAuth2Plugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[waf] [org.apache.shenyu.plugin.waf.WafPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[rateLimiter] [org.apache.shenyu.plugin.ratelimiter.RateLimiterPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[paramMapping] [org.apache.shenyu.plugin.param.mapping.ParamMappingPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[contextPath] [org.apache.shenyu.plugin.context.path.ContextPathPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[rewrite] [org.apache.shenyu.plugin.rewrite.RewritePlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[cryptorRequest] [org.apache.shenyu.plugin.cryptor.request.CryptorRequestPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[redirect] [org.apache.shenyu.plugin.redirect.RedirectPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[request] [org.apache.shenyu.plugin.request.RequestPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[generalContext] [org.apache.shenyu.plugin.general.context.GeneralContextPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[hystrix] [org.apache.shenyu.plugin.hystrix.HystrixPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sentinel] [org.apache.shenyu.plugin.sentinel.SentinelPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[resilience4j] [org.apache.shenyu.plugin.resilience4j.Resilience4JPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[logging] [org.apache.shenyu.plugin.logging.LoggingPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[loggingRocketMQ] [org.apache.shenyu.plugin.logging.LoggingRocketMQPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[cache] [org.apache.shenyu.plugin.cache.CachePlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[websocket] [org.apache.shenyu.plugin.websocket.WebSocketPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[divide] [org.apache.shenyu.plugin.divide.DividePlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[springCloud] [org.apache.shenyu.plugin.springcloud.SpringCloudPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[uri] [org.apache.shenyu.plugin.uri.URIPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[webClient] [org.apache.shenyu.plugin.httpclient.WebClientPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[modifyResponse] [org.apache.shenyu.plugin.modify.response.ModifyResponsePlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[paramTransform] [org.apache.shenyu.plugin.base.RpcParamTransformPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[grpc] [org.apache.shenyu.plugin.grpc.GrpcPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[tars] [org.apache.shenyu.plugin.tars.TarsPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[motan] [org.apache.shenyu.plugin.motan.MotanPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sofa] [org.apache.shenyu.plugin.sofa.SofaPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[dubbo] [org.apache.shenyu.plugin.apache.dubbo.ApacheDubboPlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[cryptorResponse] [org.apache.shenyu.plugin.cryptor.response.CryptorResponsePlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[response] [org.apache.shenyu.plugin.response.ResponsePlugin] 2022-04-26 16:46:51 [main] INFO org.apache.shenyu.springboot.starter.sync.data.websocket.WebsocketSyncDataConfiguration - you use websocket sync shenyu data....... 2022-04-26 16:46:51 [main] WARN org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - websocket connection server[ws://localhost:9095/websocket] is error..... 2022-04-26 16:46:52 [main] INFO org.springframework.boot.web.embedded.netty.NettyWebServer - Netty started on port(s): 9195 2022-04-26 16:46:52 [main] INFO org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - Started ShenyuBootstrapApplication in 4.777 seconds (JVM running for 5.479) Exception in thread "shenyu-shared_wheel_timer-1" java.lang.ArrayIndexOutOfBoundsException: -5 at org.apache.shenyu.common.timer.TimingWheel.getBucket(TimingWheel.java:116) at org.apache.shenyu.common.timer.TimingWheel.add(TimingWheel.java:88) at org.apache.shenyu.common.timer.HierarchicalWheelTimer.addTimerTaskEntry(HierarchicalWheelTimer.java:104) at org.apache.shenyu.common.timer.TimerTaskList.flush(TimerTaskList.java:78) at org.apache.shenyu.common.timer.HierarchicalWheelTimer.advanceClock(HierarchicalWheelTimer.java:119) at org.apache.shenyu.common.timer.HierarchicalWheelTimer$Worker.run(HierarchicalWheelTimer.java:164) at java.lang.Thread.run(Thread.java:748)

Anything else?

No response

yu199195 commented 2 years ago

1.pls start shenyu-admin first

  1. It does not affect usage and has been fixed in the master
inernoro commented 2 years ago

1.请先启动申宇-admin 2.它不影响使用,并且已在主服务器中修复

首先:基于容器方式,以及启动docker-compose 等方式我无法做到shenyu-admin,只能保证最终启动 其次,出现此情况之后便不会连接,至少他不提示错误连接的错误信息 第三,我也有搜过没有issuse 中提到wheel_time的问题,或者在明显的地方有说明,如果先启动boot后启动admin则网关会完全失效,即使admin重新连接,boot也会完全失效,不再进行连接,这种非常强依赖性并不适合分布式容错架构设计。 第四,这种基本型的错误不应该出现在没做出任何更改的 quick start 失败,对于checkstyle那么严格的代码设计,在这么基础构建就能找到的问题release版本出错,非常影响项目参与的积极性于活跃度。 还有,你说的不影响使用只是第一次获取不影响使用,你尝试一下更改admin之后看看boot有没有生效。

inernoro commented 2 years ago

First of all: I can't do shenyu-admin based on the container method and the way to start docker-compose, I can only guarantee the final start Secondly, after this situation occurs, it will not connect, at least he does not prompt the error message of the wrong connection Third, I have also searched for the issue of wheel_time that is not mentioned in issuse, or it is stated in obvious places. If you start the boot first and then start the admin, the gateway will be completely invalid. Even if the admin is reconnected, the boot will be completely invalid, no longer For connections, this very strong dependency is not suitable for distributed fault-tolerant architecture design. Fourth, this kind of basic error should not appear in the quick start failure without making any changes. For the strict code design of checkstyle, the problem that can be found in such a basic build is wrong in the release version, which greatly affects the enthusiasm of project participation. Also, what you said does not affect the use, but the first acquisition does not affect the use, you try to change admin rule to see if the boot takes effect.

yu199195 commented 2 years ago
  1. I have given the solution.
  2. maybe this is a bug in the time wheel code.
  3. please don't kidnap the shenyu community by going to the top of the line (what with the distributed architecture fault tolerance and strict code, which very much affects community activity).
  4. if you think there is a problem, can you come and fix it?
prFor commented 2 years ago

hi, this issue you raised has been resolved on PR #3297 . I'm sorry for causing you distress. 1、The solution we can offer you is to start shenyu-admin.

inernoro commented 2 years ago

hi, this issue you raised has been resolved on PR #3297 . I'm sorry for causing you distress. 1、The solution we can offer you is to start shenyu-admin. sorry ,I didn't find the entry on issuse by keyword "shared_wheel_timer" , But it's similar I need to wait until the next release version, such as 2.4.4 update. Is there a time point? Very urgent !!!

inernoro commented 2 years ago

Strangely, this problem has not occurred in idea debugging mode

prFor commented 2 years ago

hi, this issue you raised has been resolved on PR #3297 . I'm sorry for causing you distress. 1、The solution we can offer you is to start shenyu-admin. sorry ,I didn't find the entry on issuse by keyword "shared_wheel_timer" , But it's similar I need to wait until the next release version, such as 2.4.4 update. Is there a time point? Very urgent !!!

This has now been fixed on the master branch and the next release is version 2.5.0.

prFor commented 2 years ago

Strangely, this problem has not occurred in idea debugging mode The bug occurs in line 87 of the TimingWheel class. You can modify the class yourself and compile it again.

prFor commented 2 years ago

Strangely, this problem has not occurred in idea debugging mode The bug occurs in line 87 of the TimingWheel class. You can modify the class yourself and compile it again. Following your steps I ran it on docker and haven't had the problem. You can modify the TimingWheel class to try and see if it still occurs. ### Steps To Reproduce

  1. wget https://github.com//apache/incubator-shenyu/archive/refs/tags/v2.4.3.zip
  2. mdb5 sum incubator-shenyu-2.4.3.zip # output (57824d30da9e2ee096c3175d1a9a6c2b) 3.unzip v2.4.3.zip 4.mvn clean install -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests 5.mvn clean package -B -Prelease,docker -Dmaven.javadoc.skip=true -Dmaven.test.skip=true 6.docker run -d --network host -e "TZ=Asia/Shanghai" -e "JAVA_OPTS=-server -Xmx1024m -Xms1024m"--name "shenyu-bootstrap" apache/shenyu-bootstrap:2.4.3 image
inernoro commented 2 years ago

got it