Issue with Docker container deployment via elastic beanstalk : basex 9.3.1 - docker

I have this Dockerfile :
FROM basex/basexhttp:9.3.1
I deploy it on Elasticbeanstalk but i get the following error :
[main] INFO org.eclipse.jetty.util.log - Logging initialized #549ms to
org.eclipse.jetty.util.log.Slf4jLog [main] INFO
org.eclipse.jetty.server.Server - jetty-9.4.24.v20191120; built:
2019-11-20T21:37:49.771Z; git:
363d5f2df3a8a28de40604320230664b9c793c16; jvm 1.8.0_212-b04 [main]
WARN org.eclipse.jetty.webapp.WebAppContext - Failed startup of
context
o.e.j.w.WebAppContext#31a5c39e{/,null,UNAVAILABLE}{/srv/basex/webapp}
java.lang.IllegalStateException: Parent for temp dir not configured
correctly: writeable=false
at org.eclipse.jetty.webapp.WebInfConfiguration.makeTempDirectory(WebInfConfiguration.java:499)
at org.eclipse.jetty.webapp.WebInfConfiguration.resolveTempDirectory(WebInfConfiguration.java:468)
at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:138)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:488)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:523)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:100)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.basex.BaseXHTTP.(BaseXHTTP.java:129)
at org.basex.BaseXHTTP.main(BaseXHTTP.java:53) [main] INFO org.eclipse.jetty.server.AbstractConnector - Started
ServerConnector#48eff760{HTTP/1.1,[http/1.1]}{0.0.0.0:8984} [main]
INFO org.eclipse.jetty.server.Server - Started #936ms
java.lang.NullPointerException
and then container stops.
Now i tried to use the same image and run it via the root user and it starts and works perfectly fine. Following is the command :
docker run -d b58e4a50371d
Any suggestions/help appreciated.

Related

Elasticsearch startup error during SonarQube setup

I am trying to setup Sonarqube in my Macbook but I am getting following error when I try to start it with sh sonar.sh console
sudo sh sonar.sh console
Password:
/usr/bin/java
Running SonarQube...
Removed stale pid file: ./SonarQube.pid
INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Applications/sonarqube/temp
INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:60506]
INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/Applications/sonarqube/elasticsearch]: /Applications/sonarqube/elasticsearch/bin/elasticsearch
INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:416)
at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
2022.08.24 16:24:52 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.08.24 16:24:52 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.08.24 16:24:52 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
After some research on internet I have installed Java 11 but it is not helping me.

Jenkins instance appears offline on Centos

I Installed Docker, Docker Compose and then Jenkins on CentOS 8. Seems Jenkins is installed correctly. However I could see the message Jenkins appears to be offline and get an exception as mentioned below. I changed the URL https://updates.jenkins.io/update-center.json in hudson.model.UpdateCenter.xml from https to http. Still the exception reappears. Plugins are not getting upgraded.
Any help on this is appreciated. Thanks.
Exception:
$: docker logs -f jenkins
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-05-16 07:08:57.939+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized #4453ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-05-16 07:09:02.052+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
2020-05-16 07:09:04.197+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2020-05-16 07:09:04.990+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.27.v20200227; built: 2020-02-27T18:37:21.340Z; git: a304fd9f351f337e7c0e2a7c28878dd536149c6c; jvm 1.8.0_242-b08
2020-05-16 07:09:12.128+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2020-05-16 07:09:12.439+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2020-05-16 07:09:12.439+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2020-05-16 07:09:12.476+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
2020-05-16 07:09:14.143+0000 [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-05-16 07:09:14.794+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.#2235eaab{Jenkins v2.237,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2020-05-16 07:09:14.871+0000 [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector#5315b42e{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-05-16 07:09:14.872+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started #21390ms
2020-05-16 07:09:14.881+0000 [id=20] INFO winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2020-05-16 07:09:18.067+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
2020-05-16 07:09:18.316+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2020-05-16 07:09:22.668+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2020-05-16 07:09:22.694+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
2020-05-16 07:09:22.881+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2020-05-16 07:09:24.037+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded
2020-05-16 07:09:24.037+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted
2020-05-16 07:09:24.037+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2020-05-16 07:09:24.038+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2020-05-16 07:09:24.194+0000 [id=39] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
2020-05-16 07:09:24.255+0000 [id=39] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2020-05-16 07:09:27.052+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#6069d6b7: display name [Root WebApplicationContext]; startup date [Sat May 16 07:09:27 UTC 2020]; root of context hierarchy
2020-05-16 07:09:27.053+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#6069d6b7]: org.springframework.beans.factory.support.DefaultListableBeanFactory#6481ce76
2020-05-16 07:09:27.084+0000 [id=25] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#6481ce76: defining beans [authenticationManager]; root of factory hierarchy
2020-05-16 07:09:27.739+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#3b4860bb: display name [Root WebApplicationContext]; startup date [Sat May 16 07:09:27 UTC 2020]; root of context hierarchy
2020-05-16 07:09:27.739+0000 [id=25] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#3b4860bb]: org.springframework.beans.factory.support.DefaultListableBeanFactory#5c405df3
2020-05-16 07:09:27.747+0000 [id=25] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#5c405df3: defining beans [filter,legacy]; root of factory hierarchy
2020-05-16 07:09:27.955+0000 [id=25] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2020-05-16 07:09:28.492+0000 [id=19] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
***2020-05-16 07:09:44.531+0000 [id=39] INFO hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.UnknownHostException: updates.jenkins.io***
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:357)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at hudson.model.DownloadService.loadJSON(DownloadService.java:114)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:207)
at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1767)
at hudson.util.Retrier.start(Retrier.java:63)
at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1738)
at jenkins.DailyCheck.execute(DailyCheck.java:93)
at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:100)
at java.lang.Thread.run(Thread.java:748)
2020-05-16 07:09:44.536+0000 [id=39] INFO hudson.util.Retrier#start: Calling the listener of the allowed exception 'updates.jenkins.io' at the attempt #1 to do the action check updates server
2020-05-16 07:09:44.544+0000 [id=39] INFO hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
2020-05-16 07:09:44.547+0000 [id=39] SEVERE hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: UnknownHostException: updates.jenkins.io
2020-05-16 07:09:44.566+0000 [id=39] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 20,358 ms
2020-05-16 07:10:31.488+0000 [id=56] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Periodic background build discarder
2020-05-16 07:10:31.492+0000 [id=56] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Periodic background build discarder. 2 ms
I got the same exception with Kubernetes environment.
My Setup:
-Docker CE
-Kubernetes
Deployment of Jenkins:
deployment.apps/jenkins created
persistentvolume/jenkins created
persistentvolumeclaim/jenkins-claim created
serviceaccount/jenkins created
role.rbac.authorization.k8s.io/jenkins created
rolebinding.rbac.authorization.k8s.io/jenkins created
service/jenkins created
In the pod's log, I could saw this
2020-06-19 05:04:12.590+0000 [id=39] INFO hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.UnknownHostException: updates.jenkins.io
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at hudson.model.DownloadService.loadJSON(DownloadService.java:114)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:207)
at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1767)
at hudson.util.Retrier.start(Retrier.java:63)
at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1738)
at jenkins.DailyCheck.execute(DailyCheck.java:93)
at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:100)
at java.lang.Thread.run(Thread.java:748)
<b>2020-06-19 05:04:12.591+0000 [id=39] INFO hudson.util.Retrier#start: Calling the listener of the allowed exception 'updates.jenkins.io' at the attempt #1 to do the action check updates server</b>
2020-06-19 05:04:12.593+0000 [id=39] INFO hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
2020-06-19 05:04:12.594+0000 [id=39] SEVERE hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: UnknownHostException: updates.jenkins.io
2020-06-19 05:04:12.597+0000 [id=39] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 20,180 ms
After some time if logs are fetched, you'd see the token for first time Jenkins setup.
get the token and in my case, I had to do a port-forward to 8080.
Once you access Jenkins on the browser, fill in the token and see if Jenkins is offline.
if it is, goto manage Jenkins then advanced tab, scroll down and locate the update.jenkins.io URL at last.
Here you just need to click on submit without tempering anything and apply.
Now check for the updates in the plugins
If this does not work then you can choose HTTP over HTTPS for updates.jenkins.io URL in the same advanced section and submit, apply the changes. Again check for updates in plugins.
If above 2 don't work then it is very much possible you'd have to configure the proxy settings of Jenkins so that Jenkins instance can reach to internet.
The exception is simply saying that Jenkins instance could not fetch the available plugins/updates from updates.jenkins.io site since it can not resolve the URL.
The main idea here is to resolve the URL.
There are a couple of issues related to this URL exception on git issue trackers as well.
Guess you've just hit the common issue.
In my case I had to consider https://kubernetes.io/docs/tasks/debug-application-cluster/dns-debugging-resolution/ for proper debugging of dns.
I guess you can check if you have the network interface with nameserver 8.8.8.8 or the /etc/resolve.conf has the same.
After trying different things, these commands worked for me:
Disable and stop the firewall on my Centos Host
sudo systemctl disable firewalld
sudo systemctl stop firewalld
Then, restart docker
sudo service docker restart

Gerrit plugin-manager doesn't show plugins

I have a Gerrit v2.15 on a linux machine and I'm the administrator in Gerrit.
I installed the Gerrit plugin-manager under gerrit/plugins with command :
wget https://gerrit-ci.gerritforge.com/view/Plugins-stable-2.15/job/plugin-plugin-manager-bazel-master-stable-2.15/lastSuccessfulBuild/artifact/bazel-genfiles/plugins/plugin-manager/plugin-manager.jar
But nothing uploads in Gerrit UI in tab Plugins. I only see the Installed, as before.
In gerrit/logs/error.log I can read out the following:
[2018-06-15 08:54:26,366] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin plugin-manager, version v2.15-1-g27c3d2935d
[2018-06-15 08:54:26,367] [plugin-manager-preloader] INFO com.googlesource.gerrit.plugins.manager.OnStartStop : Start-up: pre-loading list of plugins from registry
[2018-06-15 08:54:26,902] [main] INFO com.google.gerrit.server.git.GarbageCollectionRunner : Ignoring missing gc schedule configuration
[2018-06-15 08:54:26,902] [main] INFO com.google.gerrit.server.config.ScheduleConfig : accountDeactivation schedule parameter "accountDeactivation.interval" is not configured
[2018-06-15 08:54:26,902] [main] INFO com.google.gerrit.server.change.ChangeCleanupRunner : Ignoring missing changeCleanup schedule configuration
[2018-06-15 08:54:26,946] [main] INFO com.google.gerrit.sshd.SshDaemon : Started Gerrit SSHD-CORE-1.6.0 on *:29418
[2018-06-15 08:54:26,949] [main] INFO org.eclipse.jetty.server.Server : jetty-9.3.18.v20170406
[2018-06-15 08:54:28,040] [main] INFO com.googlesource.gerrit.plugins.gitiles.HttpModule : No /opt/gerrit/etc/gitiles.config; assuming defaults
[2018-06-15 08:54:28,847] [main] INFO org.eclipse.jetty.server.handler.ContextHandler : Started o.e.j.s.ServletContextHandler#62672ad5{/,null,AVAILABLE}
[2018-06-15 08:54:28,869] [main] INFO org.eclipse.jetty.server.AbstractConnector : Started ServerConnector#38503309{HTTP/1.1,[http/1.1]}{127.0.0.1:8081}
[2018-06-15 08:54:28,890] [main] INFO org.eclipse.jetty.server.Server : Started #20170ms
[2018-06-15 08:54:28,893] [main] INFO com.google.gerrit.pgm.Daemon : Gerrit Code Review 2.15.1 ready
[2018-06-15 08:54:44,819] [plugin-manager-preloader] INFO com.googlesource.gerrit.plugins.manager.OnStartStop : 45 plugins successfully pre-loaded
What have i missed?
Is it some permission settings that is wrong or configuration in gerrit.config that has to be done?
Directory gerrit/plugin has permissions set to: drwxr-xr-x
Note : I've tried restarting Gerrit.
Good to know: We are using nginx. That might be useful info.
I know very little about how nginx works.
What it looks like in the UI
The plugin-manager only works in the Old UI. If you're using the new PolyGerrit UI first click on "Switch to Old UI" link at the right/down on the page. Then the plugin-manager can be access at: Plugins > Manage menu.
If you're not able to see the "Manage" option in the Old UI check the following:
. Verify if you're logged in Gerrit with an Admin user (you need to have "Administrate Server" permission in All-Projects project). There're an specific permission to access Plugins > Installed item (called "View Plugins") but this permission doesn't work the same way to Plugins > Manage one.
. Verify if you have the following set in the GERRIT_SITE/etc/gerrit.config file:
[plugins]
allowRemoteAdmin = true
Maybe this can resolve your issue.

How to grant permission to docker user write on /var/?

I'm trying to run confluence image on a docker container. This behavior is Intermittent - most of the time I can't run it, but at sometimes I can.
After downloading the image I run these commands in order put confluence online:
sudo chown -R daemon /data/confluence
sudo chown -R daemon /var/atlassian/application-data/confluence
docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server
But then, I get this error on docker logs confluence
If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out
---------------------------------------------------------------------------
Using Java: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
2017-05-23 15:33:41,519 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /opt/atlassian/confluence/conf/server.xml. No further action is required
---------------------------------------------------------------------------
23-May-2017 15:33:42.013 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
23-May-2017 15:33:42.026 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
23-May-2017 15:33:42.028 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 381 ms
23-May-2017 15:33:42.033 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Tomcat-Standalone
23-May-2017 15:33:42.033 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.41
SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are
SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#replay
23-May-2017 15:33:43.517 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Spring WebApplicationInitializers detected on classpath: [com.atlassian.synchrony.proxy.SynchronyDispatcherServletInitializer#335dedfb]
23-May-2017 15:33:43.814 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'dispatcher'
23-May-2017 15:33:43.814 INFO [localhost-startStop-2] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization started
23-May-2017 15:33:43.819 INFO [localhost-startStop-2] org.springframework.web.context.support.AnnotationConfigWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Tue May 23 15:33:43 UTC 2017]; root of context hierarchy
23-May-2017 15:33:43.864 INFO [localhost-startStop-2] org.springframework.web.context.support.AnnotationConfigWebApplicationContext.loadBeanDefinitions Registering annotated classes: [class com.atlassian.synchrony.proxy.websocket.WebSocketConfig,class com.atlassian.synchrony.proxy.web.SynchronyWebMvcConfig]
2017-05-23 15:33:44,007 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 6.2.0 [build 7111 based on commit hash 583f3f4010922d699723a091097524472954c767] - synchrony version 0.3.1-release-confluence_6.1-e20fb944
23-May-2017 15:33:44.371 INFO [localhost-startStop-2] org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.initialize Initializing ExecutorService 'defaultSockJsTaskScheduler'
23-May-2017 15:33:44.670 INFO [localhost-startStop-2] org.springframework.web.socket.server.support.WebSocketHandlerMapping.registerHandler Mapped URL path [/sockjs/v1/**] onto handler of type [class org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler]
23-May-2017 15:33:44.854 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/healthcheck]}" onto public com.atlassian.synchrony.proxy.web.HealthCheckResult com.atlassian.synchrony.proxy.web.SynchronyProxyRestController.getSynchronyProxyInfo()
23-May-2017 15:33:44.855 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/reload],methods=[PUT]}" onto public org.springframework.http.ResponseEntity com.atlassian.synchrony.proxy.web.SynchronyProxyRestController.reloadConfiguration(com.atlassian.synchrony.proxy.web.SynchronyProxyConfigPayload)
23-May-2017 15:33:44.873 INFO [localhost-startStop-2] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler]
23-May-2017 15:33:44.939 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for #ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Tue May 23 15:33:43 UTC 2017]; root of context hierarchy
23-May-2017 15:33:45.056 INFO [localhost-startStop-2] org.springframework.context.support.DefaultLifecycleProcessor.start Starting beans in phase 2147483647
23-May-2017 15:33:45.094 INFO [localhost-startStop-2] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization completed in 1279 ms
2017-05-23 15:33:46,688 WARN [localhost-startStop-1] [com.atlassian.config.ApplicationConfig] setApplicationHome Application home does not exist. Creating directory: /var/atlassian/application-data/confluence/shared-home
2017-05-23 15:33:46,783 ERROR [localhost-startStop-1] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] init Home is not configured properly:
com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/atlassian/application-data/confluence directory.
at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.saveDocument(AbstractDom4jXmlConfigurationPersister.java:86)
at com.atlassian.config.xml.DefaultDom4jXmlConfigurationPersister.save(DefaultDom4jXmlConfigurationPersister.java:24)
at com.atlassian.config.ApplicationConfig.save(ApplicationConfig.java:330)
at com.atlassian.confluence.setup.DefaultBootstrapManager.populateSynchronyConfiguration(DefaultBootstrapManager.java:298)
at com.atlassian.confluence.setup.DefaultBootstrapManager.afterConfigurationLoaded(DefaultBootstrapManager.java:509)
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:71)
at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:36)
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:127)
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:60)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.saveDocumentAtomically(AbstractDom4jXmlConfigurationPersister.java:92)
at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.saveDocument(AbstractDom4jXmlConfigurationPersister.java:82)
... 17 more
What am I doing wrong?
Have you tried via named volume (if using a docker version >= 1.9)?
$ sudo docker volume create --name confluenceVolume
$ sudo docker run -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server
Add ENTRYPOINT script and use it. Example - https://github.com/AfsmNGhr/dockemacs/blob/master/Dockerfile#L34. See also - http://www.johnzaccone.io/entrypoint-vs-cmd-back-to-basics/.

Neo4j server not starting up:

I am using Neo4j 2.3.0-M03 community version. I have created a database using neo4j import tool. Now when I am going to start the neo4j server, its failing. Any advice? Thanks in advance!
Starting Neo4j Server...WARNING: not changing user
process [21597]... waiting for server to be ready......... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
The log is as follows:
2015-10-14 14:55:35.438-0400 INFO No SSL certificate found, generating a self-signed certificate..
14:55:35.936 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
14:55:36.105 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
14:55:36.106 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
14:55:36.107 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
14:55:36.107 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true
14:55:36.108 [main] DEBUG i.n.util.internal.PlatformDependent - Java version: 7
14:55:36.108 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
14:55:36.109 [main] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
14:55:36.109 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
14:55:36.110 [main] DEBUG i.n.util.internal.PlatformDependent - Javassist: unavailable
14:55:36.110 [main] DEBUG i.n.util.internal.PlatformDependent - You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes. Please check the configuration for better performance.
14:55:36.110 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
14:55:36.110 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
14:55:36.110 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
14:55:36.119 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetectionLevel: simple
14:55:36.135 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: unpooled
14:55:36.135 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
2015-10-14 14:55:41.341-0400 INFO Successfully started database
2015-10-14 14:55:41.405-0400 INFO Starting HTTP on port 7474 (32 threads available)
2015-10-14 14:55:41.659-0400 INFO Successfully shutdown Neo4j Server
2015-10-14 14:55:42.224-0400 INFO Successfully stopped database
2015-10-14 14:55:42.227-0400 ERROR Failed to start Neo4j: Starting Neo4j failed: tried to access field org.neo4j.server.rest.repr.RepresentationFormat.mediaType from class org.neo4j.server.rest.repr.RepresentationFormatRepository Starting Neo4j failed: tried to access field org.neo4j.server.rest.repr.RepresentationFormat.mediaType from class org.neo4j.server.rest.repr.RepresentationFormatRepository
org.neo4j.server.ServerStartupException: Starting Neo4j failed: tried to access field org.neo4j.server.rest.repr.RepresentationFormat.mediaType from class org.neo4j.server.rest.repr.RepresentationFormatRepository
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:67)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:234)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:96)
at org.neo4j.server.CommunityBootstrapper.start(CommunityBootstrapper.java:48)
at org.neo4j.server.CommunityBootstrapper.main(CommunityBootstrapper.java:35)
Caused by: java.lang.IllegalAccessError: tried to access field org.neo4j.server.rest.repr.RepresentationFormat.mediaType from class org.neo4j.server.rest.repr.RepresentationFormatRepository
at org.neo4j.server.rest.repr.RepresentationFormatRepository.<init>(RepresentationFormatRepository.java:46)
at org.neo4j.server.AbstractNeoServer.createDefaultInjectables(AbstractNeoServer.java:641)
at org.neo4j.server.AbstractNeoServer.configureWebServer(AbstractNeoServer.java:360)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:216)
... 3 more
Seems like some permission issue on the lib folder of the Neo4j installation directory.
Try to give full permission to the neo4j installation folder.
Would also suggest to use stable version and not the milestone version.
I could fix it. There was some problem with my embedded database. I tried to run the server with its default graph.db and it run successfully. Now I have to identify what's wrong with the embedded database with I created using import tool.

Resources