Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Permission denied to /mvn/repository in openliberty stack #678

Closed
makandre opened this issue Feb 20, 2020 · 3 comments · Fixed by #686
Closed

Permission denied to /mvn/repository in openliberty stack #678

makandre opened this issue Feb 20, 2020 · 3 comments · Fixed by #686
Labels
stack/java-openliberty Issues related to java-openliberty stack

Comments

@makandre
Copy link

Describe the bug
A clear and concise description of what the bug is.

Encountering a problem with openliberty stack where it is hitting permissions errors writing to /mvn/repository during appsody run. This occurs under scenarios where the system's .m2 cache is not mounted to /mvn/repository (for example, Codewind on Kube)

I think this was problem started happening in 0.2 version of the stack

[Container] Running APPSODY_PREP command: /project/run-stack.sh prep
[Container] Installing parent dev.appsody:java-openliberty:0.2.0
[Container] [INFO] Scanning for projects...
[Container] [INFO] 
[Container] [INFO] --------------------< dev.appsody:java-openliberty >--------------------
[Container] [INFO] Building java-openliberty 0.2.0
[Container] [INFO] --------------------------------[ pom ]---------------------------------
[Container] [INFO] 
[Container] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (default-cli) @ java-openliberty ---
[Container] [INFO] Skipping Rule Enforcement.
[Container] [INFO] 
[Container] [INFO] --- maven-install-plugin:2.4:install (default-install) @ java-openliberty ---
[Container] [INFO] Installing /project/user-app/../pom.xml to /mvn/repository/dev/appsody/java-openliberty/0.2.0/java-openliberty-0.2.0.pom
[Container] [INFO] ------------------------------------------------------------------------
[Container] [INFO] BUILD FAILURE
[Container] [INFO] ------------------------------------------------------------------------
[Container] [INFO] Total time:  3.268 s
[Container] [INFO] Finished at: 2020-02-20T16:07:12Z
[Container] [INFO] ------------------------------------------------------------------------
[Container] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project java-openliberty: Failed to install artifact dev.appsody:java-openliberty:pom:0.2.0: /mvn/repository/dev/appsody/java-openliberty/0.2.0/java-openliberty-0.2.0.pom (Permission denied) -> [Help 1]
[Container] [ERROR] 
[Container] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[Container] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[Container] [ERROR] 
[Container] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[Container] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Actual behaviour
What is the actual behaviour.

Environment Details (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

If applicable please specify:

  • CLI version:
  • Stack you are using (including the version):

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@makandre
Copy link
Author

We saw it here as well: appsody/appsody#896 (comment)

(in that PR it's a change that allows home mount be overridden with a named docker volume mount instead of a bind mount)

@Kamran64
Copy link
Collaborator

Possibly related to #675. As you said in appsody/appsody#896, 0.2.0 now runs the stack as a non root user so that seems like the first place to look.

@makandre
Copy link
Author

A similar issue had come up before for springboot stack I believe kabanero-io/kabanero-foundation#129

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stack/java-openliberty Issues related to java-openliberty stack
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants