I was trying to use this jenkins-container 
<https://galaxy.ansible.com/awasilyev/jenkins-container/> role. Since I was 
facing issues with regard to 8080 port (bind address already in use, 
connection refused etc.; ultimately not working), I made a copy of the role 
locally and tried running the build and run commands. While *build* seems 
to work fine, run isn't working for me. I see the below errors at the 
beginning -

jenkins_1 | bash: connect: Connection refused 
jenkins_1 | bash: /dev/tcp/localhost/8090: Connection refused 
jenkins_1 | waiting

I have tried changing the port to 8090 from the role's default 8080 and 
also tried running it using the native docker command (below) but no luck 
so far w.r.t. getting the container to actually run.


docker run -it -p 8090:8080 jenkinscontainer

Incidentally, the logging even reports that Jenkins is fully up and running 
(highlighted below) but I could not access the container using IP:port URL.


gischethans@Ansible:~/jenkinscontainer$ ansible-container run

No DOCKER_HOST environment variable found. Assuming UNIX socket at /var/run/
docker.sock

Attaching to ansible_ansible-container_1

Cleaning up Ansible Container builder...

Attaching to ansible_jenkins_1

jenkins_1            | bash: connect: Connection refused

jenkins_1            | bash: /dev/tcp/localhost/8090: Connection refused

jenkins_1            | waiting

jenkins_1            | Running from: /usr/lib/jenkins/jenkins.war

jenkins_1            | Feb 13, 2017 11:23:27 AM Main 
deleteWinstoneTempContents

jenkins_1            | WARNING: Failed to delete the temporary Winstone 
file /tmp/winstone/jenkins.war

jenkins_1            | Feb 13, 2017 11:23:27 AM org.eclipse.jetty.util.log.
JavaUtilLog info

jenkins_1            | INFO: Logging initialized @353ms

jenkins_1            | Feb 13, 2017 11:23:27 AM winstone.Logger logInternal

jenkins_1            | INFO: Beginning extraction from war file

jenkins_1            | Feb 13, 2017 11:23:27 AM org.eclipse.jetty.util.log.
JavaUtilLog warn

jenkins_1            | WARNING: Empty contextPath

jenkins_1            | Feb 13, 2017 11:23:27 AM org.eclipse.jetty.util.log.
JavaUtilLog info

jenkins_1            | INFO: jetty-9.2.z-SNAPSHOT

jenkins_1            | Feb 13, 2017 11:23:27 AM org.eclipse.jetty.util.log.
JavaUtilLog info

jenkins_1            | INFO: NO JSP Support for /, did not find org.eclipse.
jetty.jsp.JettyJspServlet

jenkins_1            | Jenkins home directory: /var/lib/jenkins found at: 
SystemProperties.getProperty("JENKINS_HOME")

jenkins_1            | Feb 13, 2017 11:23:28 AM org.eclipse.jetty.util.log.
JavaUtilLog info

jenkins_1            | INFO: Started w.@65c7a252{/,file:/var/cache/jenkins/
war/,AVAILABLE}{/var/cache/jenkins/war}

jenkins_1            | Feb 13, 2017 11:23:28 AM org.eclipse.jetty.util.log.
JavaUtilLog info

jenkins_1            | INFO: Started ServerConnector@2ddc9a9f{HTTP/1.1}{0.0.
0.0:8090}

jenkins_1            | Feb 13, 2017 11:23:28 AM org.eclipse.jetty.util.log.
JavaUtilLog info

jenkins_1            | INFO: Started @1428ms

jenkins_1            | Feb 13, 2017 11:23:28 AM winstone.Logger logInternal

jenkins_1            | INFO: Winstone Servlet Engine v2.0 running: 
controlPort=disabled

jenkins_1            | Feb 13, 2017 11:23:28 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Started initialization

jenkins_1            | Feb 13, 2017 11:23:28 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Listed all plugins

jenkins_1            | Feb 13, 2017 11:23:29 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Prepared all plugins

jenkins_1            | Feb 13, 2017 11:23:29 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Started all plugins

jenkins_1            | Feb 13, 2017 11:23:29 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Augmented all extensions

jenkins_1            | Feb 13, 2017 11:23:29 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Loaded all jobs

jenkins_1            | Feb 13, 2017 11:23:29 AM hudson.model.
AsyncPeriodicWork$1 run

jenkins_1            | INFO: Started Download metadata

jenkins_1            | Feb 13, 2017 11:23:29 AM hudson.model.
AsyncPeriodicWork$1 run

jenkins_1            | INFO: Finished Download metadata. 4 ms

jenkins_1            | Feb 13, 2017 11:23:29 AM org.jenkinsci.main.modules.
sshd.SSHD start

jenkins_1            | INFO: Started SSHD at port 43125

jenkins_1            | Feb 13, 2017 11:23:29 AM jenkins.util.groovy.
GroovyHookScript execute

jenkins_1            | INFO: Executing /var/lib/jenkins/init.groovy.d/basic-
security.groovy

jenkins_1            | --> Checking if security has been set already

jenkins_1            | Feb 13, 2017 11:23:30 AM jenkins.InitReactorRunner$1 
onAttained

jenkins_1            | INFO: Completed initialization

jenkins_1            | Feb 13, 2017 11:23:30 AM org.springframework.context.
support.AbstractApplicationContext prepareRefresh

jenkins_1            | INFO: Refreshing org.springframework.web.context.
support.StaticWebApplicationContext@6f4c22e9: display name [Root 
WebApplicationContext]; startup date [Mon Feb 13 11:23:30 UTC 2017]; root 
of context hierarchy

jenkins_1            | Feb 13, 2017 11:23:30 AM org.springframework.context.
support.AbstractApplicationContext obtainFreshBeanFactory

jenkins_1            | INFO: Bean factory for application context [org.
springframework.web.context.support.StaticWebApplicationContext@6f4c22e9]: 
org.springframework.beans.factory.support.
DefaultListableBeanFactory@4f061169

jenkins_1            | Feb 13, 2017 11:23:30 AM org.springframework.beans.
factory.support.DefaultListableBeanFactory preInstantiateSingletons

jenkins_1            | INFO: Pre-instantiating singletons in org.
springframework.beans.factory.support.DefaultListableBeanFactory@4f061169: 
defining beans [authenticationManager]; root of factory hierarchy

jenkins_1            | Feb 13, 2017 11:23:30 AM org.springframework.context.
support.AbstractApplicationContext prepareRefresh

jenkins_1            | INFO: Refreshing org.springframework.web.context.
support.StaticWebApplicationContext@7650533b: display name [Root 
WebApplicationContext]; startup date [Mon Feb 13 11:23:30 UTC 2017]; root 
of context hierarchy

jenkins_1            | Feb 13, 2017 11:23:30 AM org.springframework.context.
support.AbstractApplicationContext obtainFreshBeanFactory

jenkins_1            | INFO: Bean factory for application context [org.
springframework.web.context.support.StaticWebApplicationContext@7650533b]: 
org.springframework.beans.factory.support.DefaultListableBeanFactory@91be995

jenkins_1            | Feb 13, 2017 11:23:30 AM org.springframework.beans.
factory.support.DefaultListableBeanFactory preInstantiateSingletons

jenkins_1            | INFO: Pre-instantiating singletons in org.
springframework.beans.factory.support.DefaultListableBeanFactory@91be995: 
defining beans [filter,legacy]; root of factory hierarchy

jenkins_1            | Feb 13, 2017 11:23:30 AM hudson.WebAppMain$3 run

jenkins_1            | INFO: Jenkins is fully up and running

jenkins_1            |   % Total    % Received % Xferd  Average Speed   Time 
   Time     Time  Current

jenkins_1            |                                  Dload  Upload   
Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--   
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--   
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--   
  0   265    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--   
100   265  100   265    0     0    121      0  0:00:02  0:00:02 --:--:--   
121

  2 1159k    2 32768    0     0   9754      0  0:02:01  0:00:03  0:01:58  9 
11 1159k   11  128k    0     0  31945      0  0:00:37  0:00:04  0:00:33  1 
23 1159k   23  272k    0     0  54045      0  0:00:21  0:00:05  0:00:16  1 
35 1159k   35  416k    0     0  67839      0  0:00:17  0:00:06  0:00:11  1 
44 1159k   44  512k    0     0  74342      0  0:00:15  0:00:07  0:00:08  1 
56 1159k   56  656k    0     0  81113      0  0:00:14  0:00:08  0:00:06  1 
64 1159k   64  752k    0     0  84849      0  0:00:13  0:00:09  0:00:04  1 
77 1159k   77  896k    0     0  89722      0  0:00:13  0:00:10  0:00:03  1 
88 1159k   88 1024k    0     0  95112      0  0:00:12  0:00:11  0:00:01  
1100 1159k  100 1159k    0     0  98898      0  0:00:12  0:00:12 --:--:--  
130k

jenkins_1            | exec java -DJENKINS_HOME=/var/lib/jenkins -Djenkins.
install.runSetupWizard=false -Djava.awt.headless=true -jar /usr/lib/jenkins/
jenkins.war ${JENKINS_JAVA_OPTIONS} --httpPort=8090 --webroot=/var/cache/
jenkins/war "$@"


How to get things to work?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f399e5e6-4567-4f34-9f4a-a3b91b8dc4cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to