xetus-oss / docker-archiva Goto Github PK
View Code? Open in Web Editor NEWA docker image for Apache Archiva
License: Apache License 2.0
A docker image for Apache Archiva
License: Apache License 2.0
Hi. I am new to archiva. I just want to set rest.baseUrl
in archiva configuration. the only file i saw this option was in /archiva-data/conf/archiva.xml
but i have noticed that this file is being recreated each time new container is created. My question is how does the container works. how are these configurations created at runtime. what is jetty.xml
and where can I set rest.baseUrl
to be a permanent change. Thanks.
Hi,
I set up the archiva container and now I am using archiva for the first time. I can upload file manually over the web interface, however I am struggling using maven. I tried out different configuations and I am still trying to figure out the maven configuration for deployment to the archiva container. I've changed the project pom (as ) to point to the archiva server, and I've set up the credentials for a new archiva user with the role manager for the internal and snapshot repositories in my settings.xml. I am still getting the error "PUT method is not supported." I've tried out dav (no change), and I've searched around a lot, and it'd be of great help to get some more pointers on how to resolve this. I am pasting the error below to show the problem:
Cheers!
Ben.
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ common ---
[INFO] Installing /Users/benjamin/common/target/common-0.7-SNAPSHOT.jar to /Users/benjamin/.m2/repository/com/company/common/0.7-SNAPSHOT/common-0.7-SNAPSHOT.jar
[INFO] Installing /Users/benjamin/common/pom.xml to /Users/benjamin/.m2/repository/com/company/common/0.7-SNAPSHOT/common-0.7-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ common ---
Downloading: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/maven-metadata.xml
Uploading: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/common-0.7-20170403.101523-1.jar
Uploading: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/common-0.7-20170403.101523-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.764 s
[INFO] Finished at: 2017-04-03T11:15:23+01:00
[INFO] Final Memory: 26M/263M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project common: Failed to deploy artifacts: Could not transfer artifact com.company:common:jar:0.7-20170403.101523-1 from/to snapshots (http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/): Failed to transfer file: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/common-0.7-20170403.101523-1.jar. Return code is: 405, ReasonPhrase: HTTP method PUT is not supported by this URL. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
Describe the bug
When looking at https://hub.docker.com/r/xetusoss/archiva/tags it seems that the latest
tag was not updated the last 7 months.
When deploying it, archiva says it is version 2.2.5
This image needs to be updated to archiva 2.2.6
ref https://issues.apache.org/jira/projects/MRM/issues/MRM-2023
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Hi
I wanted to install an editor (vim/nano) to change the configuration (disable the password expiration), but sudo
is not installed. Also su
required a password. Please tell me what the password is.
Hello,
I'm trying to change the archiva path to http://X.X.X.X/archiva but had no success.
Is it possible? How can I change?
Thank you.
What is the default admin username and password? When I try creating a new user with username 'admin' it says user already exists. However, nowhere in the documentation, the password is mentioned.
Hello,
Would it be possible to add to ability to change the context path of Archiva (ex:
/archiva instead of default / context path). It would be useful when Archiva is being deployed behing a reverse proxy sharing the domain name with other applications.
ex: https://example.org/archiva
The context path can be edited here: contexts/archiva.xml
A possibility could be to add a new environment variable such as:
ARCHIVA_SERVER_PATH: '/archiva'
with default value set to '/'
Thanks
Adrien
In the moment the user and password cannot be set through env variables.
<New id="validation_mail" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>mail/Session</Arg>
<Arg>
<New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
<Set name="user"></Set>
<Set name="password"></Set>
<Set name="properties">
<New class="java.util.Properties">
<Put name="mail.smtp.host"><Env name="SMTP_HOST" default="localhost"/></Put>
<Put name="mail.smtp.port"><Env name="SMTP_PORT" default="25"/></Put>
</New>
</Set>
</New>
</Arg>
</New>
Is it possible to change the code, that the user and password can set with env values?
I am trying to get Archiva to run with ssl. I have a working stand alone Archive running but thcontinerized version if blocking port 8443. It looks like the docker-compose.yaml is missing a definition for this port. I can share the wrapper.conf, jetty.conf, and jetty-ssl.conf files with you in return for help on this issue.
Since Archiva development continues at a snail pace, I think it's time to slowly sunset this repo. A great self-hosted alternative has shown up reposilite and seems to have great community support. If I'm contributing to open source in this area, my time is better spent helping there.
Before winding this down, we should add a clear migration guide from Archiva to Reposilite. And, we should give folks lots of time to move off of this image and make the switch. I know many small shops have been using this image for 8+ years now.
After changing default ports from 8080 to 7777 and 8443 to 8888, and then using respective -p 7777:8080 -p 8888:8443
calls, it seems to hang on a "loading" statement without doing anything else. Are you sure there aren't any additional steps that I need to take to get it up and running?
Neither request log nor archiva log seem to expose any exceptions when making a request to ip:7777/
page via HTTP protocol.
Do we have a way to increase the maximum upload size of an artifact? I see refernce to WEB-INF/classes/structs.properties in this link https://archiva.apache.org/docs/1.3.6/userguide/deploy.html#:~:text=Note%3A%20The%20maximum%20size%20of,uploaded%20is%2010M%20by%20default
But that does not seem to exist.
Is there a key I can provide in the nginx configuration?
Hello,
are there any plans for an update to Archiva 2.2.10?
Thanks in advance!
BR
I run this command:
docker
run --name archiva -h archiva -d -p 443:8443 -e SSL_ENABLED=true -e KEYSTORE_PASS=“passcode2017#”
-v /opt/archiva:/archiva-data xetusoss/archiva
However, I get this error:
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
INFO | jvm 5 | 2018/03/08 23:58:32 | at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780)
INFO | jvm 5 | 2018/03/08 23:58:32 | at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
INFO | jvm 5 | 2018/03/08 23:58:32 | at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
INFO | jvm 5 | 2018/03/08 23:58:32 | at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
INFO | jvm 5 | 2018/03/08 23:58:32 | at java.security.KeyStore.load(KeyStore.java:1445)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(CertificateUtils.java:55)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.ssl.SslContextFactory.getKeyStore(SslContextFactory.java:1053)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(SslContextFactory.java:1013)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:264)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.server.ssl.SslSelectChannelConnector.doStart(SslSelectChannelConnector.java:612)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.server.Server.doStart(Server.java:293)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
INFO | jvm 5 | 2018/03/08 23:58:32 | at java.security.AccessController.doPrivileged(Native Method)
INFO | jvm 5 | 2018/03/08 23:58:32 | at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
INFO | jvm 5 | 2018/03/08 23:58:32 | ... 13 more
INFO | jvm 5 | 2018/03/08 23:58:32 | Caused by: java.security.UnrecoverableKeyException: Password verification failed
INFO | jvm 5 | 2018/03/08 23:58:32 | at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778)
INFO | jvm 5 | 2018/03/08 23:58:32 | ... 29 more
When I goto /opt/archiva/ssl/keystore and type this command:
keytool -list -v -keystore keystore -storepass passcode2017#
I then get a list of certificates. So I know the passcode is correct.
Not sure the problem. Its almost like its still using the default "changeit" password. Advice?
Describe the bug
Container randomly throwing errors below.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationInterceptor#rest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.redback.users.UserManager org.apache.archiva.redback.rest.services.interceptors.AuthenticationInterceptor.userManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager#archiva': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin org.apache.archiva.web.security.ArchivaConfigurableUsersManager.redbackRuntimeConfigurationAdmin; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redbackRuntimeConfigurationAdmin#default': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.util.List org.apache.archiva.admin.repository.AbstractRepositoryAdmin.auditListeners; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditListener#metadata': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.metadata.repository.RepositorySessionFactory org.apache.archiva.audit.MetadataAuditListener.repositorySessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositorySessionFactory#cassandra': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.metadata.repository.MetadataResolver org.apache.archiva.metadata.repository.cassandra.CassandraRepositorySessionFactory.metadataResolver; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metadataResolver#default': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.metadata.repository.storage.RepositoryStorage org.apache.archiva.metadata.repository.DefaultMetadataResolver.repositoryStorage; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryStorage#maven2': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryStorage.remoteRepositoryAdmin; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'remoteRepositoryAdmin#default': Invocation of init method failed; nested exception is org.apache.archiva.admin.model.RepositoryAdminException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: /archiva-data/data/remotes/central/.index/write.lock
To Reproduce
Randomly
Environment Details
Docker Version: Kubernetes 1.14.4_1527
Host OS: OpenJDK8
Image Version: v2.2.4
Describe the solution you'd like
Support for Raspberry PI's, I'm using a Pi 4 running the 64-bit OS, Support for ARM 64 would allow me to run this on my Pi Cluster. Java 8 is already support as you can see Here
Describe alternatives you've considered
I used to run this image on a standard PC until the motherboard died to thought I would try out a Pi Cluster instead.
How to disable password expiry?
Using the command :
docker run --name archiva -v /volume1/docker/archiva/data:/archiva-data -p 62547:8080 xetusoss/archiva:v2
Results in:
WARNING: SMTP_HOST not set, Archiva cannot send emails!
WARNING: JVM_MAX_MEM has been depreciated and is no longer used!
Creating empty directory for data...
mkdir: can't create directory '/archiva-data/data': Permission denied
I see there is an old issue about the permissions : #3
Describe the bug
The location of jvm cacerts file change in the openjdk:8 image from /etc/ssl/certs/java/cacerts
to /usr/local/openjdk-8/jre/lib/security/cacerts
. This broke the CA certificate loading functionality of this image. See docker-library/openjdk#360 for context.
To Reproduce
Just attempt to build the image.
Describe the bug
while using useSSL=true, unable to connect to database.
To Reproduce
Steps to reproduce the behavior:
Environment Details
Docker Version: 20.10.9
Host OS: Centos 8
Image Version: 2.2.9
Using the command from the example:
docker run --name archiva -h archiva -p 443:8443\
-e SSL_ENABLED=true -v /somepath/archiva_mnt:/archiva-data xetusoss/archiva
or
docker run --name archiva -h archiva -p 8080:8080 -v /archiva_mnt:/archiva-data xetusoss/archiva
Results in:
mkdir: cannot create directory ‘/archiva-data/temp’: Permission denied
chown: cannot access ‘/archiva-data/temp’: No such file or directory
Installing data
cp: cannot create directory ‘/archiva-data/data’: Permission denied
chown: cannot access ‘/archiva-data/data’: No such file or directory
Installing logs
cp: cannot create directory ‘/archiva-data/logs’: Permission denied
chown: cannot access ‘/archiva-data/logs’: No such file or directory
Installing repositories
mkdir: cannot create directory ‘/archiva-data/repositories’: Permission denied
chown: cannot access ‘/archiva-data/repositories’: No such file or directory
Installing conf
cp: cannot create directory ‘/archiva-data/conf’: Permission denied
chown: cannot access ‘/archiva-data/conf’: No such file or directory
Generating self-signed keystore and certificate for HTTPS support(Dst: /archiva-data/ssl/keystore)
mkdir: cannot create directory ‘/archiva-data/ssl/’: Permission denied
keytool error: java.io.FileNotFoundException: /archiva-data/ssl/keystore (No such file or directory)
mv: cannot move ‘jetty.xml’ to ‘/archiva-data/conf/jetty.xml’: No such file or directory
Running Apache Archiva...
FATAL | wrapper | Unable to resolve the full path of the configuration file, /opt/archiva/conf/wrapper.conf: No such file or directory
I see there is also a comment about this https://hub.docker.com/r/xetusoss/archiva/
Is there a workaround or we have to set permissions to that folder every time?
Describe the bug
I expected a web UI after the container start.
To Reproduce
Steps to reproduce the behavior:
HTTP ERROR 404
Problem accessing /auth/. Reason:
Not Found
Powered by Jetty://
Environment Details
Docker Version: 19.03.8
Host OS: Ubuntu 20.04.1 LTS
What is the path to import certificate with the corresponding key?
It seems P12 bundles needs to be created for this kind of import but the bash script only imports crt and pem files.
What is the recommended way of doing this?
Describe the bug
Artifacts are no longer stored under /archiva-data, so if a docker volume is used to make the archiva data persistent, it does not include the actual artifacts, which will disappear when the container is restarted. Old artifacts are still under archiva-data but are not found by archiva, and new artifacts are not kept between restarts.
To Reproduce
Given a pre v2.2.3 container with a volume which is mapped to /archiva-data in the container, and which has artifacts which have been deployed (ie a managaed repository, not a remote one).
Alternatively:
Environment Details
Docker Version: 18.06.1-ce
Host OS: Oracle Enterprise Linux 7
Image Version: v2.2.3
Return code is: 400, ReasonPhrase: HTTP method PUT is not supported by this URL.
I have been trying multiple ways to resolve this error but i am unable to..
-Checked the location for the repository
-Added correct URL ...
But unable to resolve the error..
Can anyone suggest how can i get rid of this?
05:27:37 [samplegradle-develop-ci] $ /var/jenkins_home/tools/hudson.plugins.gradle.GradleInstallation/gradle/bin/gradle upload
05:27:38 Starting a Gradle Daemon (subsequent builds will be faster)
05:27:47 > Task :compileJava
05:27:47 > Task :processResources NO-SOURCE
05:27:47 > Task :classes
05:27:47 > Task :jar
05:27:49 > Task :javadoc
05:27:49 > Task :javadocJar
05:27:49 > Task :sourcesJar
05:27:53
05:27:53 > Task :uploadArchives
05:27:53 Could not transfer artifact com.xx.mule.dip.integration:simple-project:jar:2.0-20190711.092752-1 from/to remote (https://repository.xxxxx.com): Failed to transfer file: https://repository.xxx.com/com/lh/mule/dip/integration/simple-project/2.0-SNAPSHOT/simple-project-2.0-20190711.092752-1.jar. Return code is: 400, ReasonPhrase: HTTP method PUT is not supported by this URL.
05:27:55 Could not transfer artifact com.lh.mule.dip.integration:simple-project:pom:2.0-20190711.092752-1 from/to remote (https://repository.xxxxxxx.com): Failed to transfer file: https://repository.xxxxxx.com/com/lh/mule/dip/integration/simple-project/2.0-SNAPSHOT/simple-project-2.0-20190711.092752-1.pom. Return code is: 400, ReasonPhrase: HTTP method PUT is not supported by this URL.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.