So when I run my service instance. It does not register itself to the discovery server. And there is no error, so I am not able to identify the problem here .
application.properties of my service looks like this and application.properties of the discovery server can be seen in the screenshot attached.
spring.application.name = service
eureka.client.service-url.defaultZone =http://localhost:8761/eureka/
Eureka dashboard at localhost:8761 shows that there are no instances available for this service.

You have to add this dependency in your pom.xml, that will give your service a reason to stay up:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Moreover, I think you should refactor your application.properties file for Eureka default zone part, like that:
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=true
eureka.client.fetchRegistry=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With