service start jenkins- jenkins.service failed because the control process exited with error code

huangapple go评论84阅读模式
英文:

service start jenkins- jenkins.service failed because the control process exited with error code

问题

我在AWS Linux上安装了Jenkins,如官方文档所述。但是,当我运行以下命令时:

  1. service start jenkins

我收到以下错误消息:

  1. Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
  2. [FAILED]

运行systemctl status jenkins.service命令给我以下结果:

  1. jenkins.service - LSB: Jenkins Continuous Integration Server
  2. Loaded: loaded (/etc/rc.d/init.d/jenkins)
  3. Active: failed (Result: exit-code) since Wed 2016-09-21 16:45:28 BST; 3min 59s ago
  4. Docs: man:systemd-sysv-generator(8)
  5. Process: 2818 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
  6. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments...04)
  7. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.current(JavaVMArgu...92)
  8. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
  9. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.all(Daemon.java:88)
  10. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: ... 6 more
  11. Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service: control process exited, code=exited s...s=1
  12. Sep 21 16:45:28 webstack.local.caplib systemd[1]: Failed to start LSB: Jenkins Continuous Integration Server.
  13. Sep 21 16:45:28 webstack.local.caplib systemd[1]: Unit jenkins.service entered failed state.
  14. Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service failed.
  15. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: [FAILED]
  16. Hint: Some lines were ellipsized, use -l to show in full.
  17. 在我的AWS机器上完成所有Jenkins设置后,我们遇到了错误-----
  18. Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
  19. [FAILED]
  20. **我有一个解决方法,请尝试一次并在这里投票。**
  21. 1) 卸载所有已安装的Java版本
  22. 命令- sudo yum remove java*
  23. 2) 使用以下命令安装Java 11
  24. 命令 - sudo amazon-linux-extras install java-openjdk11
  25. 我确信这将解决您的问题。
  26. 注意:此问题是因为我们的Jenkins已更新,Java8中的某些内容与最新的Jenkins版本不兼容。
  27. <details>
  28. <summary>英文:</summary>
  29. I installed jenkins on Aws linux
  30. sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
  31. sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
  32. yum install jenkins
  33. as described on the official documentation
  34. However when I run:
  35. service start jenkins
  36. I get the following error message:
  37. Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See &quot;systemctl status jenkins.service&quot; and &quot;journalctl -xe&quot; for details.
  38. [FAILED]
  39. Running systemctl status jenkins.service gives me this:
  40. jenkins.service - LSB: Jenkins Continuous Integration Server
  41. Loaded: loaded (/etc/rc.d/init.d/jenkins)
  42. Active: failed (Result: exit-code) since Wed 2016-09-21 16:45:28 BST; 3min 59s ago
  43. Docs: man:systemd-sysv-generator(8)
  44. Process: 2818 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
  45. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments...04)
  46. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.current(JavaVMArgu...92)
  47. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
  48. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.all(Daemon.java:88)
  49. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: ... 6 more
  50. Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service: control process exited, code=exited s...s=1
  51. Sep 21 16:45:28 webstack.local.caplib systemd[1]: Failed to start LSB: Jenkins Continuous Integration Server.
  52. Sep 21 16:45:28 webstack.local.caplib systemd[1]: Unit jenkins.service entered failed state.
  53. Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service failed.
  54. Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: [FAILED]
  55. Hint: Some lines were ellipsized, use -l to show in full.
  56. After doing all jenkins setup in my AWS machine we got error-----
  57. Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See &quot;systemctl status jenkins.service&quot; and &quot;journalctl -xe&quot; for details.
  58. [FAILED]
  59. **I have a work around this. please try once and vote here .**
  60. 1)Uninstall all java version installed
  61. command- sudo yum remove java*
  62. 2) install java 11 by using below command
  63. command -sudo amazon-linux-extras install java-openjdk11
  64. i&#39;m sure it will resolve your issue .
  65. Note: this issue is because our Jenkins were updated and few things in Java8 was not compatible with latest Jenkins version
  66. </details>
  67. # 答案1
  68. **得分**: 1
  69. 你需要安装Java 11,而不是Java 8。我已经提供了所有必要的命令:
  70. 1. `sudo yum install java-11-amazon-corretto-headless`
  71. 2. `sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo`
  72. 3. `sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key`
  73. 4. `sudo yum install jenkins`
  74. 5. `sudo systemctl restart jenkins`
  75. 6. `sudo systemctl enable jenkins`
  76. ### 配置Jenkins
  77. Jenkins现在已安装并在您的EC2实例上运行。要配置Jenkins
  78. 1. 从您的浏览器连接到`http://<your_server_public_DNS>:8080`。您将能够通过其管理界面访问Jenkins
  79. 2. 解锁Jenkins`sudo cat /var/lib/jenkins/secrets/initialAdminPassword`
  80. <details>
  81. <summary>英文:</summary>
  82. You need to install Java 11, not Java 8. I have documents all the commands to do so:
  83. 1. `sudo yum install java-11-amazon-corretto-headless`
  84. 2. `sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo`
  85. 3. `sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key`
  86. 4. `sudo yum install jenkins`
  87. 5. `sudo systemctl restart jenkins`
  88. 6. `sudo systemctl enable jenkins`
  89. ### Configuring Jenkins
  90. Jenkins is now installed and running on your EC2 instance. To configure Jenkins:
  91. 1. Connect to `http://&lt;your_server_public_DNS&gt;:8080` from your browser. You will be able to access Jenkins through its management interface.
  92. 2. Unlock Jenkins: `sudo cat /var/lib/jenkins/secrets/initialAdminPassword`
  93. </details>

huangapple
  • 本文由 发表于 2023年1月6日 14:34:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/75027716.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定