When starting up Spring Boot I get the following error:
Failed to start bean
'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry';
nested exception is com.rabbitmq.stream.StreamException
and the cause of the error is:
java.net.UnknownHostException: 4e31343111e9: Temporary failure in name
resolution
The authentication passes fine for RabbitMQ - if I change the credentials then it fails at that before even reaching this stage.
Spring Boot is running using a Docker container and the RabbitMQ host is also on another host running in a container (with 5552 port open).
The error was that there was no advertised host and port for streams in the rabbit instance - this was resolved once that was added as the explicit host IP address.
I am trying to connect my application to Signoz. It only works when both application and Signoz are running in the same machine. If I pull the application in another machine, I am getting timed out error.
ERROR io.opentelemetry.exporter.internal.grpc.OkHttpGrpcExporter - Failed to export spans. The request could not be executed. Full error message: connect timed out
My application is deployed in Wildfly so I have add the following JAVA_OPTS to the standalone.conf.bat
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:c:/signoz/opentelemetry-javaagent.jar -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://MyOtherServer:4318 -Dotel.resource.attributes=""service.name=MyService"""
opentelemetry-javaagent by default expects gRPC protocol that is usualy listening on port 4317.
If your collector listens on 4318, it is otlp-http. That means you must also set
-Dotel.exporter.otlp.protocol=http/protobuf
Source: https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#otlp-exporter-span-metric-and-log-exporters
I tried to start my spring boot application on centos server with this command line.
SPRING_PROFILES_ACTIVE=prd java -jar ./build/libs/port_switcher-0.0.1-SNAPSHOT.jar
But I got an error message that the port is already in used.
then looked up process list which is used in the port number using netstat
but there is no process that uses the port number
and then I rerun my spring boot application without SPRING_PROFILES_ACTIVE variable. (it was an mistake that forget that variable)
at that time spring boot application run successfully.
I really want to know what problem is in my application properties
this command occur error
SPRING_PROFILES_ACTIVE=prd java -jar ./build/libs/port_switcher-0.0.1-SNAPSHOT.jar
this command works fine
java -jar ./build/libs/port_switcher-0.0.1-SNAPSHOT.jar
application-prd.properties
#Server
server.address=xxx.xxx.xxx.xxx
server.port=9090
#Devtools
spring.devtools.livereload.enabled=true
spring.devtools.restart.enabled=true
# Logging
logging.level.org.springframework.web=INFO
logging.level.com.kakao.portswitcher=INFO
logging.path=logs
server.tomcat.basedir=./
server.tomcat.accesslog.enabled=true
#server.tomcat.accesslog.file-date-format=.yyyy-MM-dd
server.tomcat.accesslog.rotate=true
server.tomcat.accesslog.suffix=.log
server.tomcat.accesslog.prefix=access
server.tomcat.accesslog.directory=logs
server.tomcat.accesslog.buffered=true
#Jackson
spring.jackson.property-naming-strategy=SNAKE_CASE
# Status check file
status.file=./port_switcher_status
Can you try this :
java -jar -Dspring.profiles.active=prd ./build/libs/port_switcher-0.0.1-SNAPSHOT.jar
I am using cargo maven plugin for start/stop tomcat and deploy wars for running integration test.
Declared jmxremote.port 10082 in cargo jvmargs.
I have given different cargo.servlet.port than the default one.
Most of the times, not facing any issues. But atleast once a day, facing the below issue while restarting the tomcat.
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 10082; nested exception is:
java.net.BindException: Address already in use
How can I overcome the issue.
Thanks.
Great explaination here: http://www.curiouslycorrect.com/blog/2011/01/shutting-down-tomcat-when-running-with-maven-cargo-and-jmx/
Apparently the new JVM for shutdown uses the same system properties and tries to a=start another JMX instance using the same JMX port.
In intelliJ 12.0 on ubuntu 12.04 with glassfish 3.1.2.2, I'm trying to launch my web application in debug mode but I've got this error message:
Error starting domain domain1.
The server exited prematurely with exit code 134.
Before it died, it produced the following output:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741]
I try to change the port 9009 in the domain.xml by another one but it was unsuccessful.
Could you help me to fix this problem?
Thank you
I had this same problem too a few weeks ago. I dont remember 100% what I changed but I know it has to do with the file $GLASSFISH_HOME/glassfish/domains/domain1/config/domain.xml. If I recall I think I changed the following line:
<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=9009" system-classpath="" classpath-suffix="">
In particular server and suspend flags. When I set them like this the error you described above went away.
I had the same problem, and was because the debug port 9009 had beeen occupied by the DbVisualizer application. DbVisualizer uses some random ports, and at this time, it chosed the 9009. In my case, I only had to close DbVisualizer and GlassFish started up in debug mode fine.
So, check out no processes have occupied your Glassfish debug port.
Another possible solution is to change this port, or use shared memory.
Regards
In recent versions of IntelliJ the application is aware of invalid settings for debug mode. If this is the case, when you open the Run/Debug configuration of your Java EE server, in the bottom you will see a warning message:
Just press the fix button and you will fix your 'domain.xml' configuration file.
This is also explained in this tutorial: https://www.jetbrains.com/help/idea/2016.1/developing-a-java-ee-application.html
For the future poor soul that has the same issue as me:
One of the tools that comes with Gigabyte mainboards (gCloud I believe) registers a Windows service on port 9009. This port then shows up in netstat -ano as being in use by PID 4 (Windows system something).