eureka sample service startup issues

1,414 views
Skip to first unread message

vladimir kramnik

unread,
Jun 15, 2013, 6:06:45 PM6/15/13
to eureka_...@googlegroups.com
hi karthik/ and anybody else who can help:

* running eureka server with jety on port 9090.
** following change in build.gradle : 
apply plugin: 'jetty'

jettyRunWar{
    httpPort = 9090
    }

got the eureka server started on 9090, verified by going to => http://localhost:9090/eureka ( see a META-INF file)
so now, "cd eureka-server/; ./runservice.sh" and consistently i get the following no matter what i do.
(properties file follow after the output of runservice.sh) 

not sure what i am doing is anywhere close to what it should be...
thanks much,
-volodya
=================================================================================================

2013-06-15 14:21:58,367 INFO  com.netflix.discovery.DiscoveryClient:553 [main] [fetchRegistry] Disable delta property : false
2013-06-15 14:21:58,367 INFO  com.netflix.discovery.DiscoveryClient:555 [main] [fetchRegistry] Application is null : false
2013-06-15 14:21:58,367 INFO  com.netflix.discovery.DiscoveryClient:557 [main] [fetchRegistry] Registered Applications size is zero : true
2013-06-15 14:21:58,368 INFO  com.netflix.discovery.DiscoveryClient:560 [main] [fetchRegistry] Application version is -1: true
2013-06-15 14:21:58,475 WARN  com.netflix.discovery.DiscoveryClient:834 [main] [makeRemoteCall] Action: Refresh  => returned status of 404 from http://localhost:9090/eureka/v2/apps/
2013-06-15 14:21:58,476 ERROR com.netflix.discovery.DiscoveryClient:851 [main] [makeRemoteCall] Can't get a response from http://localhost:9090/eureka/v2/apps/
Can't contact any eureka nodes - possibly a security group issue?
java.lang.RuntimeException: Bad status: 404
at com.netflix.discovery.DiscoveryClient.makeRemoteCall(DiscoveryClient.java:837)
at com.netflix.discovery.DiscoveryClient.makeRemoteCall(DiscoveryClient.java:757)
at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:615)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:562)
at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:199)
at com.netflix.discovery.DiscoveryManager.initComponent(DiscoveryManager.java:73)
at com.netflix.eureka.SampleEurekaService.registerWithEureka(SampleEurekaService.java:59)
at com.netflix.eureka.SampleEurekaService.main(SampleEurekaService.java:138)
=================================================================================================

contents of : conf/sampleservice/sample-eureka-service.properties
eureka.region=defaultZone
eureka.name=sampleservice
eureka.vipAddress=localhost
eureka.port=9090
eureka.preferSameZone=true
eureka.shouldUseDns=false
eureka.us-east-1.availabilityZones=default
eureka.serviceUrl.default=http://localhost:9090/eureka/v2/

contents of : conf/eureka-client-test.properties ( used by eureka.environment=test )
eureka.serviceUrl.default=http://localhost:9090/eureka/v2
eureka.serviceUrl.defaultZone=http://localhost:9090/eureka/v2
eureka.serviceUrl.default.defaultZone=http://localhost:9090/eureka/v2

contents of :runservice.sh 
here changed eureka.region frpom default to defaultZone

java -Deureka.region=defaultZone -Deureka.environment=test -Deureka.client.props=sample-eureka-service -cp $TEST_CLASSPATH com.netflix.eureka.SampleEurekaService

CLASSPATH:CLASSPATH:testlibs/WEB-INF/lib/annotations-2.0.0.jar:testlibs/WEB-INF/lib/annotations-2.0.0.jar:testlibs/WEB-INF/lib/archaius-core-0.4.1.jar:testlibs/WEB-INF/lib/asm-3.1.jar:testlibs/WEB-INF/lib/aws-java-sdk-1.3.27.jar:testlibs/WEB-INF/lib/blitz4j-1.18.jar:testlibs/WEB-INF/lib/commons-codec-1.4.jar:testlibs/WEB-INF/lib/commons-collections-3.2.1.jar:testlibs/WEB-INF/lib/commons-configuration-1.8.jar:testlibs/WEB-INF/lib/commons-lang-2.6.jar:testlibs/WEB-INF/lib/commons-logging-1.1.1.jar:testlibs/WEB-INF/lib/eureka-client-1.1.98.jar:testlibs/WEB-INF/lib/eureka-core-1.1.98.jar:testlibs/WEB-INF/lib/guava-11.0.1.jar:testlibs/WEB-INF/lib/httpclient-4.1.2.jar:testlibs/WEB-INF/lib/httpcore-4.1.2.jar:testlibs/WEB-INF/lib/jackson-core-asl-1.8.9.jar:testlibs/WEB-INF/lib/jackson-mapper-asl-1.8.9.jar:testlibs/WEB-INF/lib/jersey-apache-client4-1.8.jar:testlibs/WEB-INF/lib/jersey-bundle-1.9.1.jar:testlibs/WEB-INF/lib/jettison-1.2.jar:testlibs/WEB-INF/lib/jsr305-1.3.9.jar:testlibs/WEB-INF/lib/jsr311-api-1.1.1.jar:testlibs/WEB-INF/lib/log4j-1.2.17.jar:testlibs/WEB-INF/lib/servo-core-0.4.26.jar:testlibs/WEB-INF/lib/slf4j-api-1.6.4.jar:testlibs/WEB-INF/lib/slf4j-log4j12-1.6.1.jar:testlibs/WEB-INF/lib/stax-api-1.0.1.jar:testlibs/WEB-INF/lib/xercesImpl-2.4.0.jar:testlibs/WEB-INF/lib/xmlpull-1.1.3.1.jar:testlibs/WEB-INF/lib/xpp3_min-1.1.4c.jar:testlibs/WEB-INF/lib/xstream-1.4.2.jar:build/classes/main:conf/sampleservice




nk...@netflix.com

unread,
Jun 17, 2013, 1:06:24 PM6/17/13
to eureka_...@googlegroups.com
Can you also verify, whether the url:  http://localhost:9090/eureka/v2/apps/ is reachable after you start your jetty server? 

daniel....@gmail.com

unread,
Jun 17, 2013, 5:29:40 PM6/17/13
to eureka_...@googlegroups.com
Right, wait until http://localhost:9090/eureka/v2/apps/ starts serving up an xml page, it takes 3 minutes or so for me. Until then, you'll have either 102 connection refused or 404 errors.

Your server is running under some zone, probably defaultZone? Check the output that looks like 2013-06-17 14:16:57,151 WARN com.netflix.discovery.DiscoveryClient:1150 [main] [getZoneOffset] DISCOVERY: Could not pick a zone based on preferred zone settings. My zone - myZone, preferSameZone- false. Defaulting to myZone

However, by default it's set to region eureka.region=default in eureka-client.properties. I am not sure if the sample service won't find the server because it says in sample-eureka-service.properties a different region and preferSameRegion=true

I'm still working on these same issues myself, but with the way you have it set up you may need to change eureka.serviceUrl.default=http://localhost:9090/eureka/v2/ to eureka.serviceUrl.defaultZone=http://localhost:9090/eureka/v2/ in sample-eureka-service.properties
Reply all
Reply to author
Forward
0 new messages