We have recently upgraded our production environment from Karaf 3 to Karaf 4.1.4. Everything seems to be fine in production. But we are facing issue when upgrading our "pax-exam" to use Karaf 4.1.4. After upgrading , our test suit is always inconsistent. Simply put, we are not able to make a REST call. Getting "Connection refused" error. On debugging more we found the port is not listening and that the CONNECTION is not established between our application and the Karaf container. Test suit fails 6 out of 10 times because of this issue. How to resolve this inconsistency ? Why is the port not getting binded sometimes ?
Note: No issues with Firewall / security
More Details :
Karaf version - 4.1.4
org.ops4j.pax.exam version - 4.11.0
Jetty server version - 9.3.21.v20170918
org.ops4j.pax.web version - 6.0.9
org.glassfish.jersey.version - 2.25.1
Once the container starts , all the bundles are up and ACTIVE and all the features are in STARTED state. We then fetch the customized port (available port) and update the corresponding osgi properties. But the update is not successful and getting the below error.
2018-06-05 13:53:39,065 ERROR [Activator.java:380] Unable to start pax web server: null - o.o.p.w.s.i.Activator
java.lang.NullPointerException: null
at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:527)
at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:81)
at org.ops4j.pax.web.service.jetty.internal.ServerControllerFactoryImpl$1.start(ServerControllerFactoryImpl.java:164)
at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:787)
at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.configure(ServerControllerImpl.java:97)
at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:347)
at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateConfig$1(Activator.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Related
I'm currently upgrading an application from Spring Boot 2.7.7 to Spring Boot 3.0.2 and hit a 404 at the tomcat.
The interesting thing is that the application works fine on my local machine, but not in the Azure Cloud.
I have the log-level set to DEBUG for org.springframework.web and with Spring Boot 2.7.7 I see the call received in the logs (on Azure) for actuator/info, whereas in Spring Boot 3 I see the application starting successfully but then no further logs.
Any ideas what it could be or what I can try out to debug further?
The problem is related to a change in Tomcat version in Spring 2.7.8 (and therefore also Spring Boot 3.x) in relation to the Java-Agent used in Docker / within Azure.
Update to the latest java-agent version in the Docker-Image:
DockerFile
FROM eclipse-temurin:17
COPY "myBuiltApplication.jar" "app.jar"
ADD "https://github.com/microsoft/ApplicationInsights-Java/releases/download/**3.4.8**/applicationinsights-agent-*3.4.8*.jar" "agent.jar"
EXPOSE 80
ENTRYPOINT [ "java", "-javaagent:agent.jar", "-jar", "app.jar"]
Make sure that no other agent is active from Azure
I had to remove the JAVA_TOOL_OPTIONS and StartupBootstrapper from the docker run:
- docker run -d --expose=80 --name myapp
JAVA_TOOL_OPTIONS=-javaagent:/agents/java/applicationinsights-agent-codeless.jar -e StartupBootstrapper=Microsoft.ApplicationInsights.StartupBootstrapper -e
I experienced the same issue with Spring Boot version 2.7.8 with the exact same behavior: Starting the app local in IDE as well as starting the docker image locally worked perfect. When running this image in Azure as an App Service no http call is going to spring. For me it looks like Tomcat has an issue as the 404 seems to be produced by Tomcat.
Downgrading to Spring Boot 2.7.7 fixed the issue again.
Hello I have started to learn Apache Flink. I have tried to install Flink version 1.7.2 in my Macosx 10.14.3 and for checking purpose, i started local cluster mode by writing start-cluster.sh from my cmd by the reference of flink doc.when I have opened Dispatcher’s web frontend at http://localhost:8081 in my browser it shows 403 forbidden error. I have gone through the Flink log file and I have found
Caused by: org.apache.flink.util.FlinkException: Could not create the DispatcherResourceManagerComponent.
Caused by: java.net.BindException: Address already in use
Here is my screenshot of my log file . kindly help me to solve this problem . I am running java 1.8
From reference of Jira, It was bug in version 1.7 but It is now resolved in 1.7.2 . The Dispatcher frontend is working after changing rest port value into 8089(since 8081 very common port the default value might conflict ) in flink-conf.yml .
http://www.alternatestack.com/development/apache-flink-change-port-for-web-front-end/
I have installed MobileFirst Console at WebSphere Application Server 8.5.5.0.
Next I've installed my MobileFirst application. Unfortunately console shows message:
No runtime enviroment deployed in this server.
I found these errors in logs:
000000ab WASRuntimeMBe I Bean '*' does not exist.
000000ab RuntimeServic I No mxbeans found
SEVERE: Received status 500 for GET http://localhost:8080/worklightadmin/management-apis/1.0/loginAudit
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/worklightadmin/management-apis/1.0/loginAudit
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor>Impl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1676)
************ Start Display Current Environment ************
WebSphere Platform 8.5.5.0 [BASE 8.5.5.0 gm1319.01] running with process name >localhostNode01Cell\localhostNode01\server1 and process id 19180
Host Operating System is Linux, version 3.10.0-123.el7.x86_64
Java version = 1.6.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
was.install.root = /opt/IBM/WebSphere/AppServer
user.install.root = /opt/IBM/WebSphere/AppServer/profiles/AppSrv01
Java Home = /opt/IBM/WebSphere/AppServer/java/jre
You did not supply enough information nor replied back to any of the additional questions asked.
Therefore I will assume you are using MobileFirst Server 7.0, which is not recommended to deploy on WebSphere 8.5.5.0; you should first upgrade to WebSphere 8.5.5.4 or 8.5.5.5 and re-deploy again. If failure occurs still, be more responsive and provide the requested information.
I have downloaded apache karaf2.3.3 (on felix) on several CentOS6.4 machines. I see this issue only in a few machines. When I try to install a feature using the following commands
$KARAF_HOME/bin/start
$KARAF_HOME/bin/client "features:install myfeature"
I get the following stack trace:
WARN org.apache.sshd.client.session.ClientSessionImpl - Exception caught
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Looks like client fails to connect to karaf. Firewall is shutdown on all of the machines. Anyone knows why this could be failing? The feature gets happily installed if run karaf in console mode with /bin/karaf and type in the same command
My guess is that the port you defined for the remote Karaf console was already in use by another application before the Karaf installation. As such the wrong application accepts the link, cannot make anything of the data and resets the connection. I would suggest to stop Karaf, check with netstat or via telnet localhost <port> whether the port Karaf is configured to listen on is already in use, and find the related application. As an alternative, you can configure Karaf to use a different (not used) port. See for example this page
I'm using:
Spring Tool Suite Version: 3.2.0.RELEASE
Tomcat v7.0.42
When I just run my tomcat server everything is fine but I'm unable to debug it even locally. It produces following error:
Startich Apache Tomcat v7.0.42 at localhost has encoutered a problem.
Server Apache Tomcat v7.0.42 bat localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
I've tried the following:
increase the timeout.
remove all the apps before starting the debugging.
install new instance of tomcat (the only configuration that I've did on fresh install is turning on Use Tomcat installation and Never publish automatically).
But it didn't help, I still can only run the tomcat, without the debug option. Does anyone know how to make this debugging work?
When I've used new, clear workspace for Spring Tool Suite, debugging started to work.
Cheers,