cptactionhank / docker-atlassian-bamboo Goto Github PK
View Code? Open in Web Editor NEWAtlassian Bamboo wrapped in a Docker image
License: MIT License
Atlassian Bamboo wrapped in a Docker image
License: MIT License
stat: unrecognized option: format
BusyBox v1.26.2 (2017-10-04 13:37:41 GMT) multi-call binary.
Usage: stat [OPTIONS] FILE...
Display file (default) or filesystem status
-c FMT Use the specified format
-f Display filesystem status
-L Follow links
-t Terse display
FMT sequences for files:
%a Access rights in octal
%A Access rights in human readable form
%b Number of blocks allocated (see %B)
%B Size in bytes of each block reported by %b
%d Device number in decimal
%D Device number in hex
%f Raw mode in hex
%F File type
%g Group ID
%G Group name
%h Number of hard links
%i Inode number
%n File name
%N File name, with -> TARGET if symlink
%o I/O block size
%s Total size in bytes
%t Major device type in hex
%T Minor device type in hex
%u User ID
%U User name
%x Time of last access
%X Time of last access as seconds since Epoch
%y Time of last modification
%Y Time of last modification as seconds since Epoch
%z Time of last change
%Z Time of last change as seconds since Epoch
FMT sequences for file systems:
%a Free blocks available to non-superuser
%b Total data blocks
%c Total file nodes
%d Free file nodes
%f Free blocks
%i File System ID in hex
%l Maximum length of filenames
%n File name
%s Block size (for faster transfer)
%S Fundamental block size (for block counts)
%t Type in hex
%T Type in human readable form
/docker-entrypoint.sh: line 6: [: : integer expression expected
The git that is shipped with this image doesn't understand git-lfs, and so when testing against a repository that uses lfs, it fails.
When linking from bamboo to a repository on bitbucket
If bitbucket has "SSH access keys enabled" then bamboo (via ssh) needs to write the public key to the "sbin/.ssh" directory however it fails because the directory is only accessible to root but the container runs under the daemon user.
In order to reproduce:
Hi,
this is nagendra,i am getting error like :docker: Error response from daemon: driver failed programming external connectivity on endpoint objective_shannon (6a47fcbd71c2749f9046be4efc2d0831c18884aa0b0d9ca7c644ee6ff7ca9508): Error starting userland proxy: listen tcp 0.0.0.0:8085: bind: address already in use.
pls let me know how i can resolve this issue##i was tried but i did not resolution
thanks in advance.
Hello everybody,
first thing: I'm not sure if this problem is related to my enviroment or something else, but hope someone can help me.
What i use:
What i did:
Now, everything looks fine, the container run correctly , i can also reach the home page.
Setup basic info in order to allow container to connect my DB:
Installation process starts, when suddenly:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in class path resource [applicationContextJMSServer.xml]: Cannot create inner bean 'org.apache.activemq.broker.BrokerService#7eff4605' of type [org.apache.activemq.broker.BrokerService] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.broker.BrokerService#7eff4605': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: /var/atlassian/bamboo/jms-store/bamboo/KahaDB/db-1.log (No such file or directory)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1147)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:295)
... 66 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.broker.BrokerService#7eff4605': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: /var/atlassian/bamboo/jms-store/bamboo/KahaDB/db-1.log (No such file or directory)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299)
... 78 more
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /var/atlassian/bamboo/jms-store/bamboo/KahaDB/db-1.log (No such file or directory)
at org.apache.activemq.broker.BrokerService.postConstruct(BrokerService.java:567)
at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
... 83 more
Caused by: java.io.FileNotFoundException: /var/atlassian/bamboo/jms-store/bamboo/KahaDB/db-1.log (No such file or directory)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
at org.apache.activemq.util.RecoverableRandomAccessFile.<init>(RecoverableRandomAccessFile.java:44)
at org.apache.activemq.store.kahadb.disk.journal.DataFile.openRandomAccessFile(DataFile.java:92)
at org.apache.activemq.store.kahadb.disk.journal.DataFileAccessor.<init>(DataFileAccessor.java:47)
at org.apache.activemq.store.kahadb.disk.journal.DataFileAccessorPool$Pool.openDataFileReader(DataFileAccessorPool.java:52)
at org.apache.activemq.store.kahadb.disk.journal.DataFileAccessorPool.openDataFileAccessor(DataFileAccessorPool.java:130)
at org.apache.activemq.store.kahadb.disk.journal.Journal.recoveryCheck(Journal.java:464)
at org.apache.activemq.store.kahadb.disk.journal.Journal.start(Journal.java:306)
at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:474)
at org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:297)
at org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:218)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
at org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:227)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:675)
at org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:659)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:623)
at org.apache.activemq.broker.BrokerService.autoStart(BrokerService.java:578)
at org.apache.activemq.broker.BrokerService.postConstruct(BrokerService.java:565)
... 89 more
2017-07-07 10:18:39,706 ERROR [http-apr-8085-exec-6] [DefaultDispatcherErrorHandler] Exception occurred during processing request: Unable to instantiate Action, com.atlassian.bamboo.ww2.actions.setup.SetupDatabaseConnectionAction, defined for 'performSetupDatabaseConnection' in namespace '/setup'Error creating bean with name 'decoratingErrorAccessor' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'decoratedErrorDetailsFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'decoratedErrorDetailsFactory' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'agentManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentManager' defined in class path resource [applicationContextManagers.xml]: Cannot create inner bean 'com.atlassian.bamboo.buildqueue.manager.AgentManagerImpl#f50e00d' of type [com.atlassian.bamboo.buildqueue.manager.AgentManagerImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in class path resource [applicationContextJMSServer.xml]: Cannot create inner bean 'org.apache.activemq.broker.BrokerService#7eff4605' of type [org.apache.activemq.broker.BrokerService] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.broker.BrokerService#7eff4605': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: /var/atlassian/bamboo/jms-store/bamboo/KahaDB/db-1.log (No such file or directory) - action - file:/opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/classes/struts.xml:452:128
BUT, if i login on docker:
$ cd /var/atlassian/bamboo/jms-store/bamboo/KahaDB
$ ls -l
total 1
-rwxr-xr-x 0 root root 33554432 Jul 1 21:16 db-1.log
-rwxr-xr-x 1 root root 8 Jul 1 21:16 lock
$ cat db-1.log
cat: db-1.log: No such file or directory
At this point:
Would be nice to support the setup of additional (apk) packages through a environment variable.
This way we can add build capabilities without forking the docker image.
Something like :
X_ADDITIONAL_PACKAGES : "nodejs nodejs-npm"
That would run at startup :
apk add --update nodejs nodejs-npm
This way bamboo can build stuff with nodejs, or with any deployment specific dependencies ;-)
I ran into a problem with volume permissions with this image. I think Atlassian used to have the same thing in their bitbucket image, they describe a solution like this:
https://hub.docker.com/r/atlassian/bitbucket-server/
"For other versions (older than 4.12)"
Set permissions for the data directory so that the runuser can write to it:
$> docker run -u root -v /data/bitbucket:/var/atlassian/application-data/bitbucket atlassian/bitbucket-server chown -R daemon /var/atlassian/application-data/bitbucket"
And with that I was able to solve the problem. In the newer versions of the image, they introduced an entrypoint script that takes care of the issue automatically:
Maybe a script like that could be introduced here, too.
Noticed that if the /var/atlassian/bamboo directory isn't mounted, then it throws an error
+ addgroup -S bamboo
+ adduser -S -h /var/atlassian/bamboo bamboo bamboo
adduser: /var/atlassian/bamboo: No such file or directory
+ apk add --no-cache curl xmlstarlet git openssh bash ttf-dejavu libc6-compat tzdata
We are having a lot of zombie processes in our process list:
root 2408 0.0 0.0 413628 2876 ? Sl Apr18 0:11 \_ /usr/bin/containerd-shim 9aa19a2252d9f05bec000dde8054f939e78159155967d9724bc13fdc95d1502f /var/run/docker/libco
bin 2435 3.0 14.2 5293812 1754428 ? Ssl Apr18 37:21 | \_ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/atlassian/bamboo/conf/loggi
bin 3434 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3480 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3514 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3522 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3635 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3658 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3683 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3705 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3725 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3738 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3770 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 3787 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 4177 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 4199 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 4813 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 4832 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 10591 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 10620 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
bin 11061 0.0 0.0 0 0 ? Z Apr18 0:00 | \_ [ssh] <defunct>
(continues for 1000s of lines).
The SSH processes are most probably created by Bamboo when it fetches Git repositories from Bitbucket.
This issue is probably related to the fact that Java is the main process in the docker container, and could easily be solved by using tini or dumb-init in the entrypoint script.
Bamboo is currently running as daemon, but has /sbin/ has default HOME directory, which is not writable by daemon.
daemon:x:2:2:daemon:/sbin:/sbin/nologin
This cause some issues with builds that requires a writable HOME.
Tools like Gradle needs to cache information in the HOME directory.
Could you setup the HOME to something writable, or better, to /var/atlassian/bamboo/.
I'd suggest creating a "bamboo" user then.
I got this error.
2018-12-07 18:58:33,214 FATAL [finishsetupBackgroundThread] [BambooContainer] Cannot start bamboo
java.lang.RuntimeException: java.net.UnknownHostException: www: www: Name does not resolve
at com.atlassian.security.auth.trustedapps.UIDGenerator.generateUID(UIDGenerator.java:71)
at com.atlassian.security.auth.trustedapps.BaseEncryptionProvider.generateUID(BaseEncryptionProvider.java:18)
at com.atlassian.bamboo.container.startup.InitialiseTrustedAppsOnStartup.run(InitialiseTrustedAppsOnStartup.java:31)
at com.atlassian.bamboo.container.BambooContainer.start(BambooContainer.java:241)
at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:131)
at com.atlassian.bamboo.ww2.actions.setup.FinishSetupAction.execute(FinishSetupActi
I tried to fix it with with this resolution, but without success:
https://confluence.atlassian.com/bamkb/bamboo-fails-on-startup-due-to-unknownhostexception-for-aws-private-ip-802170182.html
The start-script:
#!/bin/bash
docker pull cptactionhank/atlassian-bamboo:latest
docker rm --volumes --force "bamboo-container"
docker create --restart=no --name "bamboo-container"
--publish "8085:8085"
--expose "5432"
--add-host="127.0.0.1:127.0.0.1"
--network "host"
--volume "/var/atlassian/bamboo:/var/atlassian/bamboo"
--env "CATALINA_OPTS= -Xms512m -Xmx4096m"
--env "X_PROXY_NAME=bamboo.xhefgbxcs.de"
--env "X_PROXY_PORT=443"
--env "X_PROXY_SCHEME=https"
cptactionhank/atlassian-bamboo:latest
docker start --attach "bamboo-container"
Could anybody help?
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.