Directory:

  • There were errors checking the update sites: SocketException: Connection timed out (Read failed)
  • 2. There were errors checking the update sites: IOException: Could not find JSON in http://updates.jenkins-zh.cn/update-center.json?id=default&version=2.222.4
  • 3. ERROR: No such settings file /usr/local/maven/conf/setting.xml exists
  • 4. Jenkins builds docker image, indicating Dockerfile does not exist
  • 5. [Docker] ERROR: Failed to exec start:Connect to 192.168.107.51:2375 [/192.168.107.51] failed: Connection refused (Connection refused)

There were errors checking the update sites: SocketException: Connection timed out (Read failed)

To manage the plugin inside the address:httpsInstead ofhttp. Then click Submit — >Check Now



There were errors checking the update sites: IOException: Could not find JSON inUpdates. Jenkins – useful. Cn/update – cent…

2. There were errors checking the update sites: IOException: Could not find JSON in Updates. Jenkins – useful. Cn/update – cent…

ifhttpIf the request fails, change it backhttpsAnd then access the error link in a separate browser:https://updates.jenkins-zh.cn/update-center.jsonFound normal, returned a large JSON containing Jenkins version configuration information.



At this point, click again in question 1Submit Now, should be normal. At this point, the plug-in list page also displays normally.

3. ERROR: No such settings file /usr/local/maven/conf/setting.xml exists



This is due to the incorrect path of the Maven configuration file in Jenkins. When configuring the Maven profile in the global utility class, you need to specify the Maven path mounted by Jenkins.

Jenkins mount directory

-v  /usr/localMaven/apache maven - 3.6.3: / usr /local/maven 
Copy the code

So configuration, specify Settings. XML file address should be: / usr/local/maven/conf/Settings. The XML

Be careful not to miswrite the name settings. XML, or you will be prompted that the XML file cannot be found. If not, change the current Maven folder permission to 777

Command: chmod -r 777 apache-maven-3.6.3

4. Jenkins builds docker image, indicating Dockerfile does not exist

[Docker] ERROR: Failed to create docker image: Configured Docker file 'Dockerfile' does not exist.
ERROR: Build step failed with exception
java.lang.IllegalArgumentException: Configured Docker file 'Dockerfile' does not exist.
	at org.jenkinsci.plugins.dockerbuildstep.cmd.remote.CreateImageRemoteCallable.call(CreateImageRemoteCallable.java:68)
	at org.jenkinsci.plugins.dockerbuildstep.cmd.remote.CreateImageRemoteCallable.call(CreateImageRemoteCallable.java:29)
	at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:115)
Caused: java.lang.IllegalArgumentException
	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:119)
	at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:77)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:944)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:894)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1856)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:428)
Build step 'Execute Docker command' marked build as failure
Finished: FAILURE
Copy the code

If Jenkins had pulled a single module project on SVN, this problem would not have occurred. Or maybe there’s a problem with the code configuration path on Github.

Github project name contains another layer of project name, and Dockerfile is under project name, so when building here, it will prompt you to find Dockerfile file.

Then try to copy the Dockerfile. There is another problem here. If you manually copy the file, you need to change the user and group to which the file belongs, otherwise Jenkins will not have permission to read the copied file.



Then build and try it out.

5. [Docker] ERROR: Failed to exec start:Connect to 192.168.107.51:2375 [/192.168.107.51] failed: Connection refused (Connection refused)



At this point, the external browser accesses:http://192.168.104.51:2375/versionIs inaccessible, normally should return a docker version of the information JSON.

Then see before modify/lib/systemd/system/docker. Service, found ExecStart or default values, 2375 port is not open.

Change here to:ExecStart = / usr/bin/dockerd -h TCP: / / 0.0.0.0:2375 - H Unix: / / / var/run/docker. The sock



If the server is a cloud server, after opening port 2375, remember to set the IP address whitelist to prevent the server from being used for mining.