Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin port and server port not getting registered after upgrading the SpringBoot from 2.6.6 to 3.3.3. #3655

Open
rohit-jangir-codes opened this issue Sep 12, 2024 · 6 comments

Comments

@rohit-jangir-codes
Copy link

Spring Boot Admin Server information

  • Version:

  • Spring Boot version:

  • 3.3.3

  • Configured Security:

  • Webflux or Servlet application:

Client information

  • Spring Boot versions:

  • Used discovery mechanism:

Description

I have upgraded my springBoot project from 2.6.6 to 3.3.3 after upgrading my application server port and admin ports are not working.

  • dependencies:
  • <camel.version>4.7.0</camel.version>
  • <spring.boot.version>3.3.3</spring.boot.version>
  • org.springframework.boot
  • spring-boot-starter-actuator
  • 3.3.3
  • de.codecentric
  • spring-boot-admin-starter-client
  • 3.3.3
  • org.apache.camel.springboot
  • camel-spring-boot-starter
  • 4.7.0

<server.port>6991</server.port>

<server.admin.port>6992</server.admin.port>

<services.port>6993</services.port>

Here the services.port is working as expected. But I don't see the admin and server ports getting registered and when checked via command prompt I see that the ports are not listening.

(cxfrs://http://0.0.0.0:6993/

@erikpetzold
Copy link
Member

Hi @rohit-jangir-codes

it would have been nice if you filled out the template.

To me it is unclear if you tried to update your Spring Boot Admin server or your services that get monitored with Spring Boot Admin.

In which configuration file do you have these xml tags with the port definitions?

Which application server are you using?

Are there any error messages in the logs?

We cannot help if you just say that it is not working.

@rohit-jangir-codes
Copy link
Author

rohit-jangir-codes commented Sep 16, 2024

Hi @erikpetzold ,

I hope the information below is helpful.

The dependencies are there in the POM files with the server tags.

<camel.version>4.7.0</camel.version>
<spring.boot.version>3.3.3</spring.boot.version>

org.apache.camel.springboot camel-spring-boot-starter ${camel.version} de.codecentric spring-boot-admin-starter-client 3.3.3 org.springframework.boot spring-boot-starter-actuator ${spring.boot.version}

I'm using default springboot server Jetty

When I run the application in the DEBUG mode, I see this error:

java.lang.UnsupportedOperationException: 'SO_REUSEPORT' not supported
at java.base/sun.nio.ch.ServerSocketChannelImpl.setOption(ServerSocketChannelImpl.java:212)
at org.eclipse.jetty.server.ServerConnector.setSocketOption(ServerConnector.java:355)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:336)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at org.eclipse.jetty.server.Server.doStart(Server.java:398)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:481)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:184)
at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:53)
at org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:95)
at org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:91)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:130)
at org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.doStart(CxfRsConsumer.java:85)
at org.apache.camel.support.service.BaseService.start(BaseService.java:113)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:126)
at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3170)

@erikpetzold
Copy link
Member

This is just a jetty debug message, telling you that a specific feature is not available. This is not an error.

Normally the apps do not get configured via pom.xml (this is the file to configure the maven build process). So put your dependencies there, but not your port-configuration.

There may be placeholders in your project, that get filled with these properties during build time, but in general your configuration options should be in application.yaml (or application.properties).

Can you provide a sample repo on github that shows your issue?

@rohit-jangir-codes
Copy link
Author

Can't share the repo here.

Using this plugin to replace the port in application.properties

com.google.code.maven-replacer-plugin
replacer
${com.google.code.maven-replacer-plugin.version}


prepare-package

replace




${project.build.directory}/config/application.properties


@server.port@
${server.port}


@services.port@
${services.port}


@server.admin.port@
${server.admin.port}



@ulischulte
Copy link
Contributor

@rohit-jangir-codes
To rule out other errors, have you tried moving the configurations to the application.(.yml|properties) as described above?

@rohit-jangir-codes
Copy link
Author

Yes, tried that. But nothing different!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants