For those, whose applications are running fine but service is not getting registered on eureka server make sure that client and server have the same spring cloud version.
For installing dependencies, I just used the spring initializer to generate the correct pom file, and just replaced my own (this can be seen by pressing "explore"). This is just for anyone having problems.
fyi : the clients will look for port 8761 to get themselves registered. make sure port of eureka server app is 8761 only. else running the eureka client might give http or connect exceptions.
Everyone who is having the same problem with Eureka applications registration: check if your clients have 'spring-cloud-starter-netflix-eureka-client' dependency. I had 'spring-cloud-netflix-eureka-client' (not starter), so it an application won`t register.
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the default one 8761 and it worked fine.
If you are still not able to register "movie-catalog-service" application to Eureka server, then go through spring.io/guides/gs/service-registration-and-discovery/ 1. Download the git project 2. Update the pom as mentioned in git project "eureka-client" and "eureka-server"
Thanks! It worked for me! I only used the pom.xml thas was used for the client application in the link: "The following listing shows the pom.xml file (for the client application) that is created when you choose Maven:"
Can you please make a video how to deploy like a real-time enterprise application ? Either I we have to make a war file of this project or rest api or something else ?
Hi Sir, thanks for the great playlist. I cannot understand how the clients discover that we already have a eureka server and register themselves to it. As I remember, there was a property as eureka.client.service-url.default-zone=, that we needed to add to the application.properties of eureka client, but here we didn't do any such configuration. Can someone please explain.
It's because here eureka server is running on the default host: port so clients are getting registered on the default port. If you run eureka on other host: ports then that will require.
@Kaushik - from the sound of your key taps in this video, it seems that you're using the MacBook models having the scissors keyboard. Correct me if I'm wrong. #generaltrivia
Hello Koushik, thanks for this tutorial. I have one question though. Suppose I have other microservices which are not spring boot or java apps, how I am going to config the service discovery in that scenario?
Getting error while calling the service by service name registered on Eureka Server. Can anybody help???? Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.cloud.netflix.ribbon.RestClientRibbonConfiguration] with root cause
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the default one 8761 and it worked fine.
Hi kaushik . Thanks for the training . I had doubt with respect to eureka server.How does it really work in a production environment , let’s say eureka server started on server A and the micro service is deployed on different instances A,B,C how will the eureka client on B,C know to connect to to eureka server on A , is there a config for server ip and hostname to feed to the client ?
Hi sir, i have registerd some application on eureka server , but it not showing ip as status , its showing UP (1) - DESKTOP-B7NV6OC:users-ws:0. Pls guide me
When creating the spring boot project from the spring initializer, we can search for any starter dependencies we need and add that to our project at the creation time. Are we supposed to remember the exact needed starter dependencies when we have to include it ourselves when the project has been already created?
Hi Kaushik. Thanks for the useful video. i did all steps mentioned by you. am running eureka server and three clients locally as intructed. however, i am getting connection timed out error for any API i am calling via rest template. Please guide on how to resolve that
Dear Koushik, will you please explain how does an Eureka client finds an Eureka Server in case they are located on different machines Or do all the client apps must be located on the same machine as Eureka server to be able to find that right at specific (8761) port.
Hi Koushik and others, Does any one know what is the configurations to be done to run/span the multiple instances of each micro-service. I have watched this particular video many times and not able to understand how we can achieve this?. Your help will be highly appreciated.Thanks.
For me discovery server is not working "Error: Could not find or load main class io.javabrains.discoveryserver.DiscoveryServerApplication". I have downloaded code from github still getting same error. Need Help
After adding the eureka client dependency, the application automatically registers itself with eureka server. how does the client application know which is the server to be registered with, there is no server url provided in client application.properties file. As you mentioned there can be multiple eureka servers.
Heads up for anyone that is following the tutorial with a Java version older than 11, @EnableEurekaClient is deprecated. Adding it now will throw an error.
bro same program i execute but i got bellow error plz provide solution com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect Caused by: java.net.ConnectException: Connection refused: connect com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
For error - Dependency 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' not found, used -> Hoxton.SR1 instead of -> Greenwich.RELEASE Reference-> see pom.xml here spring.io/guides/gs/service-registration-and-discovery/ Also, remember to add the dependencyManagement section for springframework.cloud and also repository section as given on this workshops pom.xml on github
Is there any implementation available for scenario that if my Eureka server is restarted, all my already running microservices get registered automatically.
I was facing compilation error in pom.xml file. We need to tell maven to check spring cloud version explicity using dependency management tag. Refer pom file in this tutorial video @3.17 and make changes to pom file accordingly. Changes needed are adding Dependency Management tag.
Hi, I have a eureka service and a Config server registered to Eureka other Microservices are not registering with Eureka and not communicating with Config server. We are using AWS ECS Fargate. This is a blocker for me. Please suggest me some tips. Thanks in advance.
I am getting "Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]: Factory method 'configurationPropertiesBeans' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata" error while running movie-info-service after adding the dependencies iin pom.xml. Can someone please help.
Hi Sir, Thank you for the videos. You explain very well. I followed exactly same as you. I am able to register my eureka clients and my discovery server also seems pretty fine. But i am not able to see my instances registered on web. It is still showing no instances available. Please can you help with this.
make sure your eureka server and client have same spring cloud version in po,.xml For me this property worked 2020.0.3 fine for latest spring-boot 2.5.3
Error creating bean with name 'configurationPropertiesBeans' => to all who may face this error try downgrading your Springboot version to 2.3.4.RELEASE..if you are using version 2.4.*
Hello Sir , i followed all your steps but on starting the client application , i am getting the below exception - 2019-03-31 11:21:25.909 WARN 6516 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: java.net.ConnectException: Connection refused: connect 2019-03-31 11:21:25.910 WARN 6516 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_UNKNOWN/Prateek-PC:8081 - registration failed Cannot execute request on any known server com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
Sir I am referencing 20 Creating Eureka clients I have done everything what you have shown but movie-info is not getting registered to eureka here are stepts what i have done 1. I started eureka server 2. in movie-info pom I have added all dependency and according to you 3. then I started movie-info still no luck please help me
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the defalut one 8761 and it worked fine.
if anyone use Spring Boot version 2.4.2 and had this issues "org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans'..... " Add this dependency management, it is the same except the version is changed "2020.0.0" this is due compatibility with newer version
With Greenwich.RELEASE, I was getting error while starting the movie-info-service with error: Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$de910e33] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) And after using 2020.0.2, the movie-info-service started fine. Thanks for this info
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the default one 8761 and it worked fine.
Sir I am referencing 20 Creating Eureka clients I have done everything what you have shown but movie-info is not getting registered to eureka here are stepts what i have done 1. I started eureka server 2. in movie-info pom I have added all dependency and according to you 3. then I started movie-info still no luck please help me
I like the way you are teaching the way you are explaining and whole stuff you are doing..Thank youuuuuuuuuuuuuuuuuuu so much.
For those, whose applications are running fine but service is not getting registered on eureka server make sure that client and server have the same spring cloud version.
This was my issue... thanks for the tip !
For installing dependencies, I just used the spring initializer to generate the correct pom file, and just replaced my own (this can be seen by pressing "explore"). This is just for anyone having problems.
Thanks a lott!! Really helped a lot!!
@@messagingapp8496 Awesome!
Genius
@@amprabhleenkaur Amazing
great tip
You are the best, thank you so much, from Peru Bravo bravo!
fyi : the clients will look for port 8761 to get themselves registered. make sure port of eureka server app is 8761 only. else running the eureka client might give http or connect exceptions.
Everyone who is having the same problem with Eureka applications registration: check if your clients have 'spring-cloud-starter-netflix-eureka-client' dependency.
I had 'spring-cloud-netflix-eureka-client' (not starter), so it an application won`t register.
i missed it ..help me thanks !!
thanks alot, this helped :)
Thank you
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the default one 8761 and it worked fine.
If you are still not able to register "movie-catalog-service" application to Eureka server, then go through spring.io/guides/gs/service-registration-and-discovery/
1. Download the git project
2. Update the pom as mentioned in git project "eureka-client" and "eureka-server"
Thanks! It worked for me! I only used the pom.xml thas was used for the client application in the link: "The following listing shows the pom.xml file (for the client application) that is created when you choose Maven:"
thanks for this
Thank you! Finally a real solution.
Can you please make a video how to deploy like a real-time enterprise application ? Either I we have to make a war file of this project or rest api or something else ?
Hi Sir, thanks for the great playlist. I cannot understand how the clients discover that we already have a eureka server and register themselves to it. As I remember, there was a property as eureka.client.service-url.default-zone=, that we needed to add to the application.properties of eureka client, but here we didn't do any such configuration. Can someone please explain.
It's because here eureka server is running on the default host: port so clients are getting registered on the default port. If you run eureka on other host: ports then that will require.
@Kaushik - from the sound of your key taps in this video, it seems that you're using the MacBook models having the scissors keyboard. Correct me if I'm wrong. #generaltrivia
you are simply awesome !!
What if we want to register a client without a port? For example an API Gateway since I'll be using a domain
I could not get my client to register without adding @EnableEurekaClient annotation to the main application class
Coding Mechanic you saved my lofts of time thanks.
Which main class? MovieServiceApplication.java?
@@shankars4281 the one you want to behave like an eureka server.
Thank you sooo mucch
You are a legend , thank you sooooooo soooooooo much 😊
Hello Sir,
Can you please tell the configuration required for the client to find the eureka server or provide any link for reference.
Hello Koushik, thanks for this tutorial. I have one question though. Suppose I have other microservices which are not spring boot or java apps, how I am going to config the service discovery in that scenario?
How can we do the same for a application which is not springboot
Getting error while calling the service by service name registered on Eureka Server. Can anybody help????
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.cloud.netflix.ribbon.RibbonClientConfiguration]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.cloud.netflix.ribbon.RestClientRibbonConfiguration] with root cause
hi , I am able to create eureka server but not able to register client to the server. i tried every thing how to debug this issue.?
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the default one 8761 and it worked fine.
Hi,
Try adding below in client's application.properties
eureka.client.region = default
eureka.client.registryFetchIntervalSeconds = 5
eureka.client.serviceUrl.defaultZone=localhost:8761/eureka/
Hi kaushik . Thanks for the training . I had doubt with respect to eureka server.How does it really work in a production environment , let’s say eureka server started on server A and the micro service is deployed on different instances A,B,C how will the eureka client on B,C know to connect to to eureka server on A , is there a config for server ip and hostname to feed to the client ?
i got it , by setting property "eureka.client.serviceurl.defaultZone=localhost:8761/eureka/" in the application.prop
I am using the 2.3.4 version and i am getting this "Congiuration problem : @bean should be private or final" error. Anyone please?
if discovery server does not work also add to its pom.xml:
com.sun.xml.bind
jaxb-core
2.2.11
best tutorial ever
if the spring boot application is version 2.3.0 then which version of spring cloud i should use
Hi Koushik Kothagal
Can we have Eureka server in Vert.x application..
if then how to configure it.
Thank you
hi
my micro services were not registered with Eureka till I've added the following dependecies to pom.xml: (I didnt see you add it in the video)
org.springframework.cloud
spring-cloud-dependencies
RELEASE
pom
import
Check if you have added starter client
org.springframework.cloud
spring-cloud-starter-netflix-eureka-client
He did, by copying from his github codes. at 3:18.
For anyone still having issues after following all of the steps - changing the port of the server back to localhost:8761 finally fixed my issue.
Could u please explain the working as how eureka server re-Registers the services once eureka itself is restarted.
Hi sir, i have registerd some application on eureka server , but it not showing ip as status , its showing UP (1) - DESKTOP-B7NV6OC:users-ws:0. Pls guide me
iam getting an exception : "java.net.UnknownHostException: rating-data-service". how to resolve this??
Make sure server.port in application.properties is 8761 in discovery-server project, otherwise doesn't work
Or you can add in you registering client application.properties ---> eureka.client.serviceUrl.defaultZone=localhost:8090/eureka/
8090 is my given port number
put the same repository from discovery's pom file into movie microservice in case you are dealing with issues
Thank you very helpful tutorial ! Thanks a Lot
When creating the spring boot project from the spring initializer, we can search for any starter dependencies we need and add that to our project at the creation time. Are we supposed to remember the exact needed starter dependencies when we have to include it ourselves when the project has been already created?
Hi Kaushik. Thanks for the useful video.
i did all steps mentioned by you. am running eureka server and three clients locally as intructed. however, i am getting connection timed out error for any API i am calling via rest template. Please guide on how to resolve that
Never mind. had to configure eureka.instance.hostname=localhost and it worked
Hi sir, one question, why didn't we add spring cloud version for spring Eureka server project?
Is there any source where it mentions you DO NOT need to explicitly add @EnableEurekaClient?
Hey I don't know Java but still I am able to understand spring boot and micro service.. your teaching skills are awesome.
R u Kidding 😜
Dear Koushik, will you please explain how does an Eureka client finds an Eureka Server in case they are located on different machines
Or do all the client apps must be located on the same machine as Eureka server to be able to find that right at specific (8761) port.
Need to specify like this in client application.properties eureka.client.serviceUrl.defaultZone= localhost:8761/eureka/
Hi Koushik and others, Does any one know what is the configurations to be done to run/span the multiple instances of each micro-service. I have watched this particular video many times and not able to understand how we can achieve this?. Your help will be highly appreciated.Thanks.
one way is to dockerize the service and run multiple containers from the service image by exposing different different port
For me discovery server is not working "Error: Could not find or load main class io.javabrains.discoveryserver.DiscoveryServerApplication". I have downloaded code from github still getting same error. Need Help
Copy pom.xml from the github link, I think repository is required. It worked for me.
After adding the eureka client dependency, the application automatically registers itself with eureka server. how does the client application know which is the server to be registered with, there is no server url provided in client application.properties file. As you mentioned there can be multiple eureka servers.
Answer to your question starts as 6:10
Heads up for anyone that is following the tutorial with a Java version older than 11, @EnableEurekaClient is deprecated. Adding it now will throw an error.
bro same program i execute but i got bellow error plz provide solution
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
Caused by: java.net.ConnectException: Connection refused: connect
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
Can you please help me to achieve this over SSL. I have eureka server running over but client connect to it.
For error - Dependency 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' not found,
used -> Hoxton.SR1
instead of -> Greenwich.RELEASE
Reference-> see pom.xml here spring.io/guides/gs/service-registration-and-discovery/
Also, remember to add the dependencyManagement section for springframework.cloud and also repository section as given on this workshops pom.xml on github
why havent you kept the github repo?
Is there any implementation available for scenario that if my Eureka server is restarted, all my already running microservices get registered automatically.
I was facing compilation error in pom.xml file. We need to tell maven to check spring cloud version explicity using dependency management tag. Refer pom file in this tutorial video @3.17 and make changes to pom file accordingly. Changes needed are adding Dependency Management tag.
org.springframework.cloud
spring-cloud-dependencies
${spring-cloud.version}
pom
import
Hi, I have a eureka service and a Config server registered to Eureka other Microservices are not registering with Eureka and not communicating with Config server. We are using AWS ECS Fargate. This is a blocker for me. Please suggest me some tips.
Thanks in advance.
I am facing the same issue if you have got any solution please let me know
No instance available in Eureka portal , please help me out
same problem. if you have resolved the isuue, please help me out. no errors and not registered too
Pretty good.
i had same issue with my pom.xml file but i added the dependencyManagement in the file and it resolved it.
Yes you have to do that...same for me also..
What is the github url for your sample microservices projects
I am getting "Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]: Factory method 'configurationPropertiesBeans' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata" error while running movie-info-service after adding the dependencies iin pom.xml. Can someone please help.
Got the solution.. Thanks!
@@harshagarwal3870 I m also facing that type of error . Can you tell me how to solve this error?
Just change the spring cloud version to the latest for those who see the comments later
Hi Sir,
Thank you for the videos. You explain very well.
I followed exactly same as you. I am able to register my eureka clients and my discovery server also seems pretty fine. But i am not able to see my instances registered on web.
It is still showing no instances available.
Please can you help with this.
make sure your eureka server and client have same spring cloud version in po,.xml For me this property worked 2020.0.3 fine for latest spring-boot 2.5.3
@@vier_rajendra1122Thank you!
Error creating bean with name 'configurationPropertiesBeans' => to all who may face this error try downgrading your Springboot version to 2.3.4.RELEASE..if you are using version 2.4.*
yes this really solved the issue..thanks.
@@miaram4689 you're welcome
how to do this?
Hello Sir , i followed all your steps but on starting the client application , i am getting the below exception -
2019-03-31 11:21:25.909 WARN 6516 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: java.net.ConnectException: Connection refused: connect
2019-03-31 11:21:25.910 WARN 6516 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_UNKNOWN/Prateek-PC:8081 - registration failed Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
add the below and it should work .
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
Sir I am referencing
20 Creating Eureka clients
I have done everything what you have shown
but movie-info is not getting registered to eureka
here are stepts what i have done
1. I started eureka server
2. in movie-info pom I have added all dependency and according to you
3. then I started movie-info
still no luck
please help me
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the defalut one 8761 and it worked fine.
if anyone use Spring Boot version 2.4.2 and had this issues
"org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans'..... "
Add this dependency management, it is the same except the version is changed "2020.0.0" this is due compatibility with newer version
org.springframework.cloud
spring-cloud-dependencies
2020.0.0
pom
import
It was super helpful.
I can to get a solution!! thanks
Sir there is no code in Github .... why ?
github.com/koushikkothagal/spring-boot-microservices-workshop
please let me know your git repo url
Thank you
what about github code ?
github.com/koushikkothagal/spring-boot-microservices-workshop
can i get your github link
can i get the git hub link
github.com/koushikkothagal/spring-boot-microservices-workshop
done
Индийский Навальный
For anyone using Spring Boot 2.5.0, use 2020.0.2
With Greenwich.RELEASE, I was getting error while starting the movie-info-service with error:
Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$de910e33] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
And after using 2020.0.2, the movie-info-service started fine.
Thanks for this info
@@abhisk2283 @Valentin How do we know what version to update to?
for people with compatibility problems
Release train Spring Boot - Spring Cloud compatibility
Release Train Boot Version
2021.0.x aka Jubilee. 2.6.x
2020.0.x aka Ilford. 2.4.x, 2.5.x (Starting with 2020.0.3)
Hoxton 2.2.x, 2.3.x (Starting with SR5)
Greenwich 2.1.x
Finchley 2.0.x
Edgware 1.5.x
Dalston 1.5.x
Instead of Greenwich.RELEASE
I used 2020.0.0
I had a few microservices, i wanted to register them to my Eureka Server, but none of them were getting registered. I was using port:9000 for my Eureka discovery server, then i changed the port to the default one 8761 and it worked fine.
Sir I am referencing
20 Creating Eureka clients
I have done everything what you have shown
but movie-info is not getting registered to eureka
here are stepts what i have done
1. I started eureka server
2. in movie-info pom I have added all dependency and according to you
3. then I started movie-info
still no luck
please help me
I had to add @EnableEurekaClient annotation to the main application
eureka.client.serviceUrl.defaultZone = localhost:8761/eureka
eureka.client.instance.preferIpAddress = true
spring.application.name = eurekaclient
add this in property file in client
Is there any way to find the IP of the registry-server by my registered micro services if my VM of DS got restarted.