lizhimins opened a new issue, #4210:
URL: https://github.com/apache/rocketmq-dashboard/issues/4210

   Every call to `GET /api/settings/datasources` and `GET 
/api/settings/datasources/page` answers HTTP 500.
   
   ```
   java.lang.IllegalArgumentException: Cannot find cache named 'data-sources' 
for Builder[public java.util.List
   org.apache.rocketmq.studio.settings.SettingsService.listDataSources()] 
caches=[data-sources]
     at 
org.springframework.cache.interceptor.AbstractCacheResolver.resolveCaches(AbstractCacheResolver.java:92)
     at 
org.springframework.cache.interceptor.CacheAspectSupport.getCaches(CacheAspectSupport.java:317)
     ...
     at 
org.apache.rocketmq.studio.settings.SettingsService$$SpringCGLIB$$0.listDataSources(<generated>)
     at 
org.apache.rocketmq.studio.settings.SettingsController.listDataSources(SettingsController.java:60)
   ```
   
   `@EnableCaching` sits on `StudioApplication` and 
`@Cacheable("data-sources")` on
   `SettingsService.listDataSources`, but no `CacheManager` bean is declared 
anywhere — the manager is
   left to Spring Boot cache auto-configuration. Whatever it resolves to in 
this application cannot
   serve the `data-sources` cache, so the caching interceptor throws before the 
method body runs.
   
   **User-visible impact:**
   
   - Settings → data source management: `Internal Server Error` plus 
`数据源加载失败,请稍后重试`, table empty.
   - `/ops/dashboard`: an `Internal Server Error` alert, because the metrics 
panel loads the data source list on mount. The error appears on a page that 
otherwise has nothing to do with settings, which makes it hard to trace.
   
   **Why tests did not catch it:** `SettingsServiceCachingTest` registers its 
own
   `ConcurrentMapCacheManager("data-sources")` in the test context. That masks 
the missing production
   wiring completely — the test has been green while every production request 
failed.
   
   Also noting that the local `deploy/rocketmq` stack has no Prometheus, so the 
metrics dashboard has
   nothing to query even once the data source API works: all nine panels report
   `Prometheus base URL is not configured`.


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