Unable to process bamboo specs in bamboo server - permission error

Sugendh K Ganga January 16, 2019

I am trying to scan bamboo Java specs residing in my linked repository(remote) via a manual scan from the bamboo server. But the scan errors out with the following error (Please note that I have disabled the bamboo security feature to process bamboo specs in docker):

[ERROR] Could not create local repository at /sbin/.m2/repository -> [Help 1]
org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at /sbin/.m2/repository

Below is the complete error log:

Content of pom.xml used:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <!--Edit template at BAMBOO_INSTALL/atlassian-bamboo/WEB-INF/classes/bamboo-specs-pom.xml-->
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.bamboo</groupId>
        <artifactId>bamboo-specs-parent</artifactId>
        <version>6.6.2</version>
        <relativePath/>
    </parent>

    <artifactId>bamboo-specs-generator</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <dependencies>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>bamboo-specs-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>bamboo-specs</artifactId>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <compilerArg>-proc:none</compilerArg>
                    </compilerArgs>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
[INFO] Error stacktraces are turned on.
[ERROR] Could not create local repository at /sbin/.m2/repository -> [Help 1]
org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at /sbin/.m2/repository
	at org.apache.maven.DefaultMaven.validateLocalRepository(DefaultMaven.java:368)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:171)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
	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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException
Unable to scan repository sre-bamboo-specs-v1 (15532045) for Bamboo Specs
com.atlassian.bamboo.repository.RepositoryException: Unable to scan repository sre-bamboo-specs-v1 (15532045) for Bamboo Specs
	at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithMaven$9(RepositoryStoredSpecsServiceImpl.java:810)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 1
	at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:69)
	at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:667)
	at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161)
	at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:114)
	at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithMaven$9(RepositoryStoredSpecsServiceImpl.java:797)
	... 8 more


Do you need help? Please visit the http://docs.atlassian.com/bamboo/docs-0606/Bamboo+Specs+troubleshooting page.

Any help is highly appreciated

@Alexey Chystoprudov , Kindly help in getting a resolution to this problem.

Thanks! 

 

1 answer

0 votes
Foong
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 18, 2019

Is Bamboo started with root user or sudo? Try starting Bamboo without root user or sudo.

May need to fix the file permission first with chown.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events