geerlingguy / drupalci-sonar-jenkins

DEPRECATED - Drupal CI environment with SonarQube and Jenkins for Drupal Core code analysis.
41 stars 16 forks source link

Vagrant up fails during 'Install Jenkins plugins' #15

Closed maobel closed 8 years ago

maobel commented 8 years ago

I got an error everytime I try to start the vagrant machine or even on provision. This is the error:

TASK [geerlingguy.jenkins : Install Jenkins plugins.] **************************
failed: [192.168.99.9] => (item=phing) => {"changed": true, "cmd": ["java", "-jar", "/opt/jenkins-cli.jar", "-s", "http://localhost:8080/", "install-plugin", "phing"], "delta": "0:00:00.494622", "end": "2016-06-28 16:36:55.137272", "failed": true, "item": "phing", "rc": 255, "start": "2016-06-28 16:36:54.642650", "stderr": "java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, X-Required-Permission, null, X-You-Are-In-Group, Date, X-Hudson, Content-Length, Expires, X-You-Are-Authenticated-As, X-Jenkins-Session, Set-Cookie, Content-Type, Server, X-Content-Type-Options]\n\tat hudson.cli.CLI.getCliTcpPort(CLI.java:284)\n\tat hudson.cli.CLI.<init>(CLI.java:128)\n\tat hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)\n\tat hudson.cli.CLI._main(CLI.java:473)\n\tat hudson.cli.CLI.main(CLI.java:384)\n\tSuppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli\n\t\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1628)\n\t\tat hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:78)\n\t\tat hudson.cli.CLI.connectViaHttp(CLI.java:152)\n\t\tat hudson.cli.CLI.<init>(CLI.java:132)\n\t\t... 3 more", "stdout": "", "stdout_lines": [], "warnings": []}
failed: [192.168.99.9] => (item=git) => {"changed": true, "cmd": ["java", "-jar", "/opt/jenkins-cli.jar", "-s", "http://localhost:8080/", "install-plugin", "git"], "delta": "0:00:00.443905", "end": "2016-06-28 16:36:56.128461", "failed": true, "item": "git", "rc": 255, "start": "2016-06-28 16:36:55.684556", "stderr": "java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, X-Required-Permission, null, X-You-Are-In-Group, Date, X-Hudson, Content-Length, Expires, X-You-Are-Authenticated-As, X-Jenkins-Session, Set-Cookie, Content-Type, Server, X-Content-Type-Options]\n\tat hudson.cli.CLI.getCliTcpPort(CLI.java:284)\n\tat hudson.cli.CLI.<init>(CLI.java:128)\n\tat hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)\n\tat hudson.cli.CLI._main(CLI.java:473)\n\tat hudson.cli.CLI.main(CLI.java:384)\n\tSuppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli\n\t\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1628)\n\t\tat hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:78)\n\t\tat hudson.cli.CLI.connectViaHttp(CLI.java:152)\n\t\tat hudson.cli.CLI.<init>(CLI.java:132)\n\t\t... 3 more", "stdout": "", "stdout_lines": [], "warnings": []}
failed: [192.168.99.9] => (item=sonar) => {"changed": true, "cmd": ["java", "-jar", "/opt/jenkins-cli.jar", "-s", "http://localhost:8080/", "install-plugin", "sonar"], "delta": "0:00:00.551681", "end": "2016-06-28 16:36:57.298915", "failed": true, "item": "sonar", "rc": 255, "start": "2016-06-28 16:36:56.747234", "stderr": "java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, X-Required-Permission, null, X-You-Are-In-Group, Date, X-Hudson, Content-Length, Expires, X-You-Are-Authenticated-As, X-Jenkins-Session, Set-Cookie, Content-Type, Server, X-Content-Type-Options]\n\tat hudson.cli.CLI.getCliTcpPort(CLI.java:284)\n\tat hudson.cli.CLI.<init>(CLI.java:128)\n\tat hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)\n\tat hudson.cli.CLI._main(CLI.java:473)\n\tat hudson.cli.CLI.main(CLI.java:384)\n\tSuppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli\n\t\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1628)\n\t\tat hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:78)\n\t\tat hudson.cli.CLI.connectViaHttp(CLI.java:152)\n\t\tat hudson.cli.CLI.<init>(CLI.java:132)\n\t\t... 3 more", "stdout": "", "stdout_lines": [], "warnings": []}
failed: [192.168.99.9] => (item=ssh) => {"changed": true, "cmd": ["java", "-jar", "/opt/jenkins-cli.jar", "-s", "http://localhost:8080/", "install-plugin", "ssh"], "delta": "0:00:00.499035", "end": "2016-06-28 16:36:58.519917", "failed": true, "item": "ssh", "rc": 255, "start": "2016-06-28 16:36:58.020882", "stderr": "java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, X-Required-Permission, null, X-You-Are-In-Group, Date, X-Hudson, Content-Length, Expires, X-You-Are-Authenticated-As, X-Jenkins-Session, Set-Cookie, Content-Type, Server, X-Content-Type-Options]\n\tat hudson.cli.CLI.getCliTcpPort(CLI.java:284)\n\tat hudson.cli.CLI.<init>(CLI.java:128)\n\tat hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)\n\tat hudson.cli.CLI._main(CLI.java:473)\n\tat hudson.cli.CLI.main(CLI.java:384)\n\tSuppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli\n\t\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1628)\n\t\tat hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:78)\n\t\tat hudson.cli.CLI.connectViaHttp(CLI.java:152)\n\t\tat hudson.cli.CLI.<init>(CLI.java:132)\n\t\t... 3 more", "stdout": "", "stdout_lines": [], "warnings": []}

Any ideas what Im missing?

Thanks

geerlingguy commented 8 years ago

Yeah, unfortunately this is an upstream issue with the Jenkins role as a result of the Jenkins 2.0 switchover—and I'll need to rework this VM a bit to work correctly with Jenkins 2.0.

See: https://github.com/geerlingguy/ansible-role-jenkins/issues/51

geerlingguy commented 8 years ago

You can also edit the vars for this playbook to have an empty set/list for jenkins_plugins and see if it succeeds after that.

maobel commented 8 years ago

I'll try that. Thanks a lot.

geerlingguy commented 8 years ago

This should be fixed upstream. I'm testing an install to see if it's working with this Vagrant config.

geerlingguy commented 8 years ago

This is now fixed—if you see any other errors, please let me know!