Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to load plugin config dynamically at the second time #1520

Closed
lilai23 opened this issue May 23, 2024 · 0 comments · Fixed by #1521
Closed

fail to load plugin config dynamically at the second time #1520

lilai23 opened this issue May 23, 2024 · 0 comments · Fixed by #1521
Labels
kind/bug Something isn't working
Milestone

Comments

@lilai23
Copy link
Collaborator

lilai23 commented May 23, 2024

What happened?

After dynamically installing a plugin and unstalling it, try to install the plugin again then throws ClassCastException
2024-05-22 16:10:37.191 [ERROR] [io.sermant.core.plugin.service.PluginServiceManager] [initPluginServices:59] [Attach Listener] Error occurs while starting plugin service: class io.sermant.monitor.service.report.MetricServiceImpl java.lang.ClassCastException: io.sermant.monitor.config.MonitorServiceConfig cannot be cast to io.sermant.monitor.config.MonitorServiceConfig at io.sermant.monitor.service.report.MetricServiceImpl.start(MetricServiceImpl.java:45) at io.sermant.core.plugin.service.PluginServiceManager.initPluginServices(PluginServiceManager.java:56) at io.sermant.core.plugin.PluginManager.doInitPlugin(PluginManager.java:203) at io.sermant.core.plugin.PluginManager.executeInit(PluginManager.java:188) at io.sermant.core.plugin.PluginManager.initPlugins(PluginManager.java:175) at io.sermant.core.plugin.PluginManager.install(PluginManager.java:81) at io.sermant.core.command.PluginsInstallCommandExecutor.execute(PluginsInstallCommandExecutor.java:44) at io.sermant.core.command.CommandProcessor.process(CommandProcessor.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.sermant.premain.AgentLauncher.executeCommand(AgentLauncher.java:153) at io.sermant.premain.AgentLauncher.launchAgent(AgentLauncher.java:93) at io.sermant.premain.AgentLauncher.agentmain(AgentLauncher.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386) at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:411)

How can we reproduce it (as minimally and precisely as possible)?

when dynamically install a plugin at the second time, you can reproduce it

Sermant version

1.4.0 / develop branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant