Giter Club home page Giter Club logo

Comments (21)

jgillich avatar jgillich commented on July 20, 2024

Jenkins works with aespinosa/jenkins, no idea what is going on here.

from docker.

carlossg avatar carlossg commented on July 20, 2024

Same thing here. It is due to the init.groovy script, but if I remove it and use the script console to run the same thing, then it works. Maybe it is a timing issue? init.groovy is ran too early?

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

can you share your docker command used to launch this?

Also - please use a current version of docker 0.11 is far to old to support.

from docker.

vikraman avatar vikraman commented on July 20, 2024

I can reproduce with docker 1.2.0 on ubuntu.
docker run -p 8080:8080 jenkins

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

OK thanks - taking a look. Any particular version of ubuntu? that other image doesn't set the slave port... (if you don't set the slave port - then jnlp slaves won't connect - as the port is allocated dynamically - so likely people aren't using it with slaves - only simple cases?)

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

@carlossg if you run it via the groovy console - it won't actually be listening on that port... it just sets a value which means nothing though? as listening port is set on startup? Or were you able to connect jnlp slaves?

from docker.

vikraman avatar vikraman commented on July 20, 2024

This is on ubuntu 14.04 server. I'm not using any slaves.
On the console, I can see that the slave listener is starting, so probably something is trying to start it again.

Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Sep 26, 2014 7:16:28 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Sep 26, 2014 7:16:28 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-8.y.z-SNAPSHOT
Sep 26, 2014 7:16:30 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
Sep 26, 2014 7:16:30 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started [email protected]:8080
Sep 26, 2014 7:16:30 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Sep 26, 2014 7:16:30 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Sep 26, 2014 7:16:36 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Sep 26, 2014 7:16:36 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Sep 26, 2014 7:16:36 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Sep 26, 2014 7:16:36 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Sep 26, 2014 7:16:36 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Sep 26, 2014 7:16:36 AM jenkins.util.groovy.GroovyHookScript execute
INFO: Executing bundled script: file:/var/jenkins_home/war/WEB-INF/init.groovy
--> setting agent port for jnlp
Sep 26, 2014 7:16:36 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 50000
Sep 26, 2014 7:16:38 AM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 43338
Sep 26, 2014 7:16:38 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Sep 26, 2014 7:16:38 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Effective SlaveRestarter on master: null

I can connect to it using netcat if I forward port 50000.

Sep 26, 2014 7:16:47 AM hudson.TcpSlaveAgentListener$ConnectionHandler run
INFO: Accepted connection #1 from /172.27.3.42:42018

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

@vikraman so you don't see that error?

from docker.

carlossg avatar carlossg commented on July 20, 2024

@michaelneale the error doesn't show in the console but in the web interface at /administrativeMonitor/hudson.model.Hudson.tcpBind/

The port 50000 is correctly opened
If I run the groovy script in the Jenkins web console the port is changed.
Verified with netstat in the instance

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

@carlossg ok interesting... so few questions:

  1. when you use init.groovy - does it actually listen on 50000 - and start - and its just that something is trying again, later?
  2. (assuming 1 is kaput for you) - do you think we should just ditch the init.groovy? if it changes what it listens on, I see no need to hard code it ahead of time - as long as people know to set it at some point? (good practice? your preference?)

from docker.

carlossg avatar carlossg commented on July 20, 2024
  1. yes
    It all works fine, other than the annoying message in the web interface

screenshot 2014-09-26 09 48 22

When you click on "see the log for more details"

screenshot 2014-09-26 09 48 27

from docker.

carlossg avatar carlossg commented on July 20, 2024

It does work despite the log error, I tested with

JENKINS=192.168.59.103
docker run -p 8080:8080 -p 50000:50000 jenkins
# created the slave by hand in the web ui
docker run -t -i dgageot/java8 /bin/sh -c "curl -O http://$JENKINS:8080/jnlpJars/slave.jar && java -jar slave.jar -jnlpUrl http://$JENKINS:8080/computer/myslave/slave-agent.jnlp"

Slave is connected

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

OK good news - have a work around - I defer the setting of that port so that it doesn't try back later on. Not sure of the race condition that causes it - but this will do for now.

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

Will be in next LTS release of this image.

from docker.

xbeta avatar xbeta commented on July 20, 2024

I still have this issue on the 1.565.1 (currently the latest LTS). Can we please not close any ticket if we can still reproduce this issue?

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

If you build it from the docker file it will be ok..
It can take days for the official build team to approve.new version.

It's a bit like submitting to the app store
On Saturday, September 27, 2014, Sam Xiao [email protected] wrote:

I still have this issue on the 1.565.1 (currently the latest LTS). Can we
please not close any ticket if we can still reproduce this issue?


Reply to this email directly or view it on GitHub
#6 (comment)
.

Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com

from docker.

Ohadbasan avatar Ohadbasan commented on July 20, 2024

I still hit that problem.
wasn't it fixed?

thanks

from docker.

michaelneale avatar michaelneale commented on July 20, 2024

Yes it should be using the init groovy. @ndeloof is the init.groovy still in use that sets the fixed slave port?

from docker.

ndeloof avatar ndeloof commented on July 20, 2024

yes it is https://github.com/cloudbees/jenkins-ci.org-docker/blob/master/Dockerfile#L22

from docker.

holmesb avatar holmesb commented on July 20, 2024

Still having this 'port 50000 already in use' problem in current LTS Jenkins release, running on Kubernetes. Restarting the Jenkins container within the pod seems a valid workaround. Prob still timing issues during startup.

from docker.

nitish-predera avatar nitish-predera commented on July 20, 2024

I was having the same issue after restoring Jenkins backup to my Jenkins setup. It was deployed using Helm charts on a Kubernetes cluster.

Manage Jenkins > Configure Global Security > Agents

Disable the setting "TCP port for inbound agents" and Apply, then undo the radio to Fixed: 50000 option and save.

Worked for me.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.