I was able to setup Jenkins 2.361.1 in Tomcat 9.0.67. It is running perfectly fine in http://localhost:8080/jenkins but if I try to restart tomcat by using shutdown.bat and then startup.bat, I get the following errors:
...
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/jenkins] startup failed due to previous errors
INFO [main] hudson.lifecycle.Lifecycle.onStatusUpdate Stopping Jenkins
INFO [main] jenkins.model.Jenkins$16.onAttained Started termination
SEVERE [main] jenkins.model.Jenkins$16.onTaskFailed Failed NioChannelSelector.cleanUp
java.lang.IllegalArgumentException: Unable to inject class jenkins.slaves.NioChannelSelector
at hudson.init.TaskMethodFinder.lookUp(TaskMethodFinder.java:130)
...
http://localhost:8080 will still work fine but http://localhost:8080/jenkins displays a 404 page
Why am I getting that error even if I didn't change a thing after Tomcat shutdown? I used the zip file download to install Tomcat not the service installer.
The only workaround that works so far for me is to delete the jenkins folder inside the webapps folder and let tomcat redeploy it again. After doing that, no error occurred and jenkins worked just like before.
Related
So i have deployed jenkins.war into the tomcat docker container but apparently when i try to open this jenkins.war file i end up getting HTTP Status 404 – Not Found error,
What i expect is a jenkins page to be opened, I went through the docker logs and i found these errors
17-Sep-2020 10:21:25.176 WARNING [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Failed to scan JAR [war:file:/usr/local/tomcat/webapps/jenkins.war*/WEB-INF/lib/spring-webmvc-2.5.6.SEC03.jar] from /WEB-INF/lib
java.nio.file.AccessDeniedException: /usr/local/tomcat/temp/jar_cache7070370173706501058.tmp
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
17-Sep-2020 10:21:26.629 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
17-Sep-2020 10:21:26.954 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
17-Sep-2020 10:21:26.960 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/jenkins] startup failed due to previous errors
What is it that i'm missing, Please help me out with your suggestions.
I'm trying to connect to a SonarQube server running on my machine in a Docker.
I installed the SonarLint plugin in IntelliJ, when I create the new connection to the server, given the token to the plugin, it shows:
Failed to connect the server. Please check the configuration. Error:
Fail to request http://localhost:9000/api/system/status
this URL works in the browser, giving back
{"id":"BF41A1F2-AWlcxJRKJ9-nWLU3WeGl","version":"7.6.0.21501","status":"UP"}
in the SonarLint log it says:
Caused by: java.net.ProtocolException: Unexpected status line:
I just pulled the last sonarqube image from docker repository and run it with only the port forwarding option (-p 9000:9000)
My environment:
SonarQube server version: 7.6.0.21501 ;
Java: 1.8.0_181
Docker: 2.0.0.3 (31259)
IntelliJ: Community 18.3.5
I found a workaround.
use the machine name instead localhost.
I am running SonarQube on both java and javascript code inside a CentOS VM. I pulled the sonarqube docker image and am running the container. I exposed port 9000 and am able to open up localhost:9000 and interact with the sonarqube gui. When I run the sonar-scanner from the command line on the JavaScript code using this command:
sonar-scanner -Dsonar.projectKey=javascript_code -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -Dsonar.login=admin -Dsonar.password=admin
I get a fully analyzed project. As well as the JavaScript code I can run it on the Java code using the maven build. Both work correctly from the command line.
When I add it into a Jenkins Pipeline I do the exact same commands and get the following:
Error: SonarQube server [http://localhost:9000] can not be reached
Caused by: Fail to get bootstrap index from server
Caused by: Failed to connect to localhost:9000
Caused by: Connection refused (Connection refused)
I also tried when starting the container to use --network="host" instead of publishing port 9000, but it still does not connect from the Jenkins Pipeline. Everything works correctly when I am running the commands from the Command Line, just when I try to put it into a Jenkins Pipeline.
Any suggestions on how to fix this? Thanks.
*Edit: Using the sonarqube plugin I was able to get my analysis to run as a Jenkins Job. However, when I try to add the analysis into the pipeline I get the same SonarQube server cannot be reached error. It says it skips my project because the project has been banned form the build due to previous failures and gives me this error message:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar (default-cli) on project sonarqubeproj:
Unable to execute SonarQube: Fail to get bootstrap index from server: unexpected end of stream on Connection{localhost:9000, proxy=DIRECT hostAddress=localhost/127.0.0.1:9000 cipherSuite=none protocol=http/1.1}: \n not found: limit=0 content=… -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar (default-cli) on project feedback-tool-ui: Unable to execute SonarQube
The problem you are facing is most likely related to how you run jenkins.
I assume you also run jenkins via docker. this means that in the context of jenkins, localhost is not your host system, but the jenkins container. This means you need to adapt your sonarqube-url to reference the host system.
Therefore you have multiple options:
use the public ip of the host system
use the docker ip of the host system
resolve the ip via dns. docker has an internal DNS and if those container run in the same network, you can normally reach them by containername.
sidenote:
i am not sure if you are using docker-compose or kubernetes, but if you are not using it, you might also want to dive into docker-compose as it is just a simple yaml-config in which you can easily start up servers.
Getting the below exception while starting the spring boot application.
Exception:
Caused by: org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /null/swagger-resources/configuration/ui
Swagger gradle dependencies versions are as below
compile('io.springfox:springfox-swagger2:2.7.0')
compile('io.springfox:springfox-swagger-ui:2.7.0')
you need close like this browser tab.
my spring boot application port is 8888, when i close this tab and restart my spring boot application, the error is gone.
Hopefully it is the issue with IntelliJ editor. I'm running multiple microservices on different ports and shutting them down once the work is done, but IJ editor might have cached the port(which it already shut down) and causing this confusion and error. I have restarted the service with a different port, and the error is gone.
Note: In general, we will get BIND ERROR : Address already in use, if any other service is running on the same port.
I recently deployed my application into local JBoss server and everything works just fine. Then I try to migrate the application into JBoss/wildfly-12 Server (Docker version) and now having a problem.
Here's a look into the log file:
TRACE [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) Scan complete
TRACE [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) Scanning directory D:\ for deployment content changes
TRACE [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) Scan complete
INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Server will resume
ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0215: Failed to resume activity org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1#58921a50. To resume normal operation it is recommended that you restart the server.
I tried to restart the server but this problem always come. Afterwards, I tried to google up the problem and found this. I am not sure this is the right solution. Does anyone have the same problem?
Thank you very much!