question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spring Boot Admin results in error 500

See original GitHub issue

Hi

I am trying to register a client with admin server using client starter. Following is the version of jar being used: spring-boot-admin-server-1.3.1.jar spring-boot-admin-server-ui-1.3.1.jar spring-boot-admin-starter-client-1.3.1.jar spring-boot-1.3.5.RELEASE.jar Spring 4.2.4

Server is up and I am able to view the UI.

Following error is receiver when trying to register a client:

SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: statusInfo must not be null!] with root cause
java.lang.IllegalArgumentException: statusInfo must not be null!
    at org.springframework.util.Assert.notNull(Assert.java:115)
    at de.codecentric.boot.admin.model.Application.<init>(Application.java:42)
    at de.codecentric.boot.admin.model.Application$Builder.build(Application.java:133)
Following is the application.properties for the client

endpoints.health.enabled=true
endpoints.health.sensitive=false
management.health.status.order=UP,DOWN,UNKNOWN
server.port = 9000
management.port: 9000
management.address: 127.0.0.1
management.contextPath=/admin
spring.boot.admin.url=http://localhost:8080
info.version=@project.version@

It is a very simple code for test:

Server:

@SpringBootApplication
@EnableAdminServer
public class SpringAdmin {

            public static void main(String[] args) {
                SpringApplication.run(SpringAdmin.class, args);
            }

        }

Client:

package test;

import org.springframework.beans.factory.annotation.Autowired;
@Controller
@EnableAutoConfiguration
@ComponentScan(basePackages = "test")
public class SpringBoot {

    @Autowired
    CountService service;

        @RequestMapping(value = "/hello",method = RequestMethod.GET)
        @ResponseBody
        String home() {
            service.exampleMethod();
            return "hello.jsp";
        }

       public static void main(String[] args) throws Exception {
            //System.setProperty("spring.jmx.enabled", "false");
            //System.setProperty("server.port", "8081");
            SpringApplication.run(SpringBoot.class);

        }


       @Bean
        public static Endpoint exampleEndpoint() {
            return new Endpoint<String>() {
                @Override
                public String getId() {
                    return "hello";
                }

                @Override
                public boolean isEnabled() {
                    return true;
                }

                @Override
                public boolean isSensitive() {
                    return false;
                }

                @Override
                public String invoke() {
                    return "hello";
                }
            };
        }

}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
VineetJTcommented, May 31, 2016

Seems the issue happens only when using port 8080 on server. I changed to other port and seems to resolve the issue.

On a side note, is there any way to use JAVA 6 with admin and client? Right now we are using JRE6 and it seems to be compatible class error.

0reactions
koktoghaycommented, Jul 6, 2016

I also encountered the same problem.I upgraded the package version to the same version and solved the problem.All version is 1.3.3 spring-boot-admin-server-1.3.3.jar spring-boot-admin-server-ui-1.3.3.jar spring-boot-admin-starter-client-1.3.3.jar

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Spring Boot returns 500 Internal Server Error instead of ...
Spring Boot returns 500 Internal Server Error instead of desired 403 Forbidden ... I am using spring-security-web:5.6.3 to build a RESTful API.
Read more >
codecentric/spring-boot-admin - Gitter
"status": 500, "error": "Internal Server Error", "message": "Request processing failed; nested exception is java.lang.IllegalArgumentException: Input is ...
Read more >
What is “HTTP 500 Internal Server Error” and How to Fix It?
The HTTP 500 error, in particular, indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. In other...
Read more >
How to Fix a 500 Internal Server Error on Your WordPress Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request.
Read more >
1. Enabling Production-ready Features - Spring
If you wish to configure custom security for HTTP endpoints (for example, to allow only users with a certain role to access them),...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found