dCache / dcache

dCache - a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods
https://dcache.org
285 stars 136 forks source link

Sweeper plug in doesn't exist... #6116

Open DavidHarrimanSCV opened 2 years ago

DavidHarrimanSCV commented 2 years ago

There appears to be an issue for me with the sweeper. I'm seeing an error in the log regarding the class does not exist. I'm using the trunk. Is this a non-issue? A configuration issue on my side?

Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: DEBUG [pool1] Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: DEBUG [pool1] Could not find class file for introspecting configuration annotations: ${pool.plugins.sweeper} Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: java.io.FileNotFoundException: class path resource [${pool/plugins/sweeper}.class] cannot be opened because it does not exist Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:50) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:123) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:112) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:282) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:242) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.dcache.cells.UniversalSpringCell.createContext(UniversalSpringCell.java:1027) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.dcache.cells.UniversalSpringCell.starting(UniversalSpringCell.java:229) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at dmg.cells.nucleus.CellAdapter.prepareStartup(CellAdapter.java:681) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at dmg.cells.nucleus.CellNucleus.doStart(CellNucleus.java:899) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at dmg.cells.nucleus.CellNucleus.lambda$wrapLoggingContext$3(CellNucleus.java:735) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:229) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at dmg.cells.nucleus.CellNucleus.lambda$wrapLoggingContext$2(CellNucleus.java:727) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: at java.base/java.lang.Thread.run(Thread.java:829) Oct 16 20:32:54 dcache-node03.dsh.com dcache@dCacheDomain[15173]: DEBUG [pool1] Creating shared instance of singleton bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0'

kofemann commented 2 years ago

Hi @DavidHarrimanSCV ,

this is an unfortunate stack trace, that tells you that somthing went wrong during startup. Obviously we have to make it more user friendly. For now, please check the following possibilities:

paulmillar commented 2 years ago

Of the stack-trace, perhaps the following message provides a hint at what went wrong:

java.io.FileNotFoundException: class path resource [${pool/plugins/sweeper}.class] cannot be opened because it does not exist`

Note that the name of the class is ${pool/plugins/sweeper}.class. This is remarkably similar to the dCache configuration property pool.plugins.sweeper. This configuration property is resolved in the Spring file modules/dcache/src/main/resources/org/dcache/pool/classic/pool.xml when creating the corresponding object:

  <bean id="sweeper" class="${pool.plugins.sweeper}"
          init-method="start" destroy-method="stop">
    <description>Pool garbage collector</description>
    <property name="repository" ref="rep"/>
    <property name="account" ref="account"/>
    <property name="margin" value="${pool.limits.sweeper-margin}"/>
  </bean>

If a variable is undefined then the resolved value is the same as the reference; i.e., ${pool.plugins.sweeper} resolves to ${pool.plugins.sweeper} if there is no pool.plugins.sweeper property defined. A standard naming convention with Java class files is that package names are mapped to directories by changing .s to /. Applying this transformation yields ${pool/plugins/sweeper}, which is identical to the error message.

All said, the symptoms you describe are consistent with the configuration property pool.plugins.sweeper not being defined. That's suggestive evidence, but not conclusive.

This is somewhat odd, since we supply dCache with a default configuration property value for this configuration property, located in skel/share/defaults/pool.properties file. Moreover, the batch file for starting the pool service (skel/share/services/pool.batch) ensures this configuration property is non-empty: if the property is undefined then dCache will not start.

So, as you mentioned, this could be simply a misconfiguration (please check by adopting the default value).

However, if this is the case, it would be good to know why our different "layers of protection" (default values, batch file check) didn't catch this problem.

kofemann commented 2 years ago

@DavidHarrimanSCV Do you still observe this issue? If yes, I would like to provide a build with an extra debugging.