1

docker ###

docker pull jenkins/jenkins

docker run -p 8090:8090 -p 50000:50000 -e JAVA_OPTS="-Duser.timezone=Seoul/Asia" jenkins/jenkins:lts

docker log

Dec 11, 2018 1:17:23 AM hudson.model.UpdateCenter updateDefaultSite
WARNING: Upgrading Jenkins. Failed to update the default Update Site 'default'. Plugin upgrades may fail.
java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
    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:1156)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
    at hudson.model.DownloadService.loadJSON(DownloadService.java:167)
    at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:186)
    at hudson.model.UpdateCenter.updateDefaultSite(UpdateCenter.java:2302)
    at jenkins.install.SetupWizard.init(SetupWizard.java:172)
    at jenkins.install.InstallState$InitialSecuritySetup.initializeState(InstallState.java:166)
    at jenkins.model.Jenkins.setInstallState(Jenkins.java:1054)
    at jenkins.install.InstallUtil.proceedToNextStateFrom(InstallUtil.java:97)
    at jenkins.install.InstallState$Unknown.initializeState(InstallState.java:84)
    at jenkins.model.Jenkins$16.run(Jenkins.java:3221)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1083)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Dec 11, 2018 1:17:23 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 25,476 ms
Dec 11, 2018 1:17:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Dec 11, 2018 1:17:23 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running

centOS 7 firewall

public (active)
  target: default
  icmp-block-inversion: no
  interfaces: docker0 enp4s0f0
  sources: 
  services: ssh dhcpv6-client http https
  ports: 77/tcp 80/tcp 443/tcp 3306/tcp
  protocols: 
  masquerade: no
  forward-ports: port=443:proto=tcp:toport=8443:toaddr=
    port=80:proto=tcp:toport=8090:toaddr=
  source-ports: 
  icmp-blocks: 
  rich rules: 
#

I'm going to use a docker to drive Jenkins at the centos7. However, a socket timeout occurs after the Jenkins reset password is displayed on the reset screen.

What are some ways to solve the problem? I haven't been on the road for days because of a troublesome problem. I hope you will help me. Thank you.

user2089579
  • 11
  • 1
  • 2
  • If you need proxy to access internet, you can try specify the proxy after read doc. – yong Dec 11 '18 at 02:05

1 Answers1

0

Would you please show how the ports are through the netstat -ntl command, to see if the forwarding is for ipv4 or ipv6? If the problem is proxy, it can be one of the solutions: Command:

docker pull --proxy http://9.1.0.228:3128 ubuntu

Or edit etc/default/docker file: https://blog.codeship.com/using-docker-behind-a-proxy/

  • tcp 0 0 0.0.0.0:77 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN tcp6 0 0 :::3306 :::* LISTEN tcp6 0 0 :::77 :::* LISTEN tcp6 0 0 :::36882 :::* LISTEN tcp6 0 0 ::1:25 :::* LISTEN – user2089579 Dec 12 '18 at 08:39
  • sorry comment format. this is a netstat -ntl result. – user2089579 Dec 12 '18 at 08:40
  • After installing the centos7, I didn't set up a proxy. Is there any part to check? – user2089579 Dec 12 '18 at 08:41
  • By any chance, proxy-related settings were not required for the windows dockers, but is this required for the centos7? – user2089579 Dec 12 '18 at 08:43
  • Hi, on the CentOS proxy, you can configure in the `etc/environment file` . More information here: [link]https://www.linuxtechi.com/proxy-settings-yum-command-on-rhel-centos-servers/ . Test the connection to the traceroute command. – dalmo.santos Dec 12 '18 at 14:22