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

Application attempts to write to /plugins #5

Open
blaky opened this issue Apr 7, 2020 · 3 comments
Open

Application attempts to write to /plugins #5

blaky opened this issue Apr 7, 2020 · 3 comments

Comments

@blaky
Copy link
Contributor

blaky commented Apr 7, 2020

On startup, the application tries to read/write /plugins. If the user running the start_rp.sh script, doesn't have access to the folder, the process will crash:

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'extensionsInfoContributor': Unsatisfied dependency expressed through field 'pluginBox'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pf4jPluginBox' defined in class path resource [com/epam/ta/reportportal/core/configs/PluginConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.epam.ta.reportportal.core.plugin.Pf4jPluginBox]: Factory method 'pf4jPluginBox' threw exception; nested exception is java.nio.file.AccessDeniedException: /plugins
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:397)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1429)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1503)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1467)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1358)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:874)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:778)
	... 105 common frames omitted

Once I manually created the folder and granted permissions to the user running the script, the issue got resolved.

@blaky
Copy link
Contributor Author

blaky commented Apr 7, 2020

The path seems to be hardcoded at: https://github.com/reportportal/service-api/blob/develop/src/main/resources/application.yaml

@AlehB
Copy link
Contributor

AlehB commented Apr 13, 2020

Hi @Yumfriez ,

Can we get this not-hardcoded?

@bhecquet
Copy link

Hello, you can set environment variable RP_PLUGINS_ROOTDIR=
The same applies for all other configurations set in application.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants