Build failed with an exception

363 views
Skip to first unread message

umesa...@gmail.com

unread,
Dec 1, 2015, 6:22:40 AM12/1/15
to eureka_netflix
I am getting the following error while trying to build eureka. I am trying to resolve this issue from many days. I am new to eureka and developing a proof of concept on micro services .please help me as soon as posssible.

C:\Users\shaiku\Documents\GitHub> cd eureka
C:\Users\shaiku\Documents\GitHub\eureka [master +0 ~1 -0]> ./gradlew clean build
Inferred project: eureka, version: 1.3.5-SNAPSHOT
Publication mavenNebula not found in project :.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
Publication named 'mavenNebula' does not exist for project ':' in task ':artifactoryPublish'.
None of the specified publications matched for project ':' - nothing to publish.
:clean
:eureka-client:clean
:eureka-client-archaius2:clean
:eureka-client-jersey2:clean
:eureka-core:clean
:eureka-examples:clean
:eureka-resources:clean
:eureka-server:clean
:eureka-server-karyon3:clean
:eureka-test-utils:clean
:assemble UP-TO-DATE
:license UP-TO-DATE
:check UP-TO-DATE
:eureka-client:compileJava
C:\Users\shaiku\Documents\GitHub\eureka\eureka-client\src\main\java\com\netflix\discovery\DiscoveryClient.java:1580: warning: non-varargs call of varargs method with inexact argument ty
pe for last parameter;
new String[]{serviceUrl, urlPath, String.valueOf(response.getStatus())});
^
cast to Object for a varargs call
cast to Object[] for a non-varargs call and to suppress this warning
C:\Users\shaiku\Documents\GitHub\eureka\eureka-client\src\main\java\com\netflix\discovery\util\ExceptionsMetric.java:54: error: cannot find symbol
if (exceptionCounters.putIfAbsent(exceptionName, counter) == null) {
^
symbol: method putIfAbsent(String,Counter)
location: variable exceptionCounters of type Map<String,Counter>
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
:eureka-client:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':eureka-client:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Appreciate your help.

Tomasz Bak

unread,
Dec 1, 2015, 11:12:21 AM12/1/15
to eureka_...@googlegroups.com
Eureka requires Java8 to compile.
/Tomasz


--
You received this message because you are subscribed to the Google Groups "eureka_netflix" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eureka_netfli...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

umesa...@gmail.com

unread,
Dec 2, 2015, 2:20:31 AM12/2/15
to eureka_netflix
Thanks a lot Tomasz for the reply. I tried java 8 it was running but again the build was failed showing the following error. Please give me solution to this.

Missing header in: eureka-client\src\test\java\com\netflix\discovery\shared\resolver\AsyncResolverTest.java
Missing header in: eureka-client\src\test\java\com\netflix\discovery\util\DiscoveryBuildInfoTest.java
Missing header in: eureka-client\src\test\java\com\netflix\discovery\shared\resolver\aws\TestEurekaHttpResolver.java
Missing header in: eureka-client\src\test\java\com\netflix\discovery\shared\resolver\aws\EurekaHttpResolverTest.java
:eureka-client:license
:eureka-client:test
12:20:07.297 [pool-2-thread-2] DEBUG c.n.d.s.r.aws.ApplicationsResolver - Retrieved endpoint list [AwsEndpoint{ serviceUrl='http://instance2.eurekaRead.com:8080/context', region='region
', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance0.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance1.eurekaRead.
com:8080/context', region='region', zone='us-east-1c'}]
12:20:07.297 [pool-2-thread-1] DEBUG c.n.d.s.r.aws.EurekaHttpResolver - Retrieved endpoint list [AwsEndpoint{ serviceUrl='http://instance2.eurekaRead.com:8080/context', region='region',
zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance0.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance1.eurekaRead.co
m:8080/context', region='region', zone='us-east-1c'}]
12:20:07.300 [pool-2-thread-2] DEBUG c.n.d.s.r.a.ZoneAffinityClusterResolver - Local zone=us-east-1c; resolved to: [AwsEndpoint{ serviceUrl='http://instance0.eurekaRead.com:8080/context
', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance2.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://inst
ance1.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}]
12:20:07.303 [pool-2-thread-1] DEBUG c.n.d.s.r.a.ZoneAffinityClusterResolver - Local zone=us-east-1c; resolved to: [AwsEndpoint{ serviceUrl='http://instance0.eurekaRead.com:8080/context
', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance2.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://inst
ance1.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}]
12:20:07.304 [pool-2-thread-2] DEBUG c.n.d.shared.resolver.AsyncResolver - Resolved to [AwsEndpoint{ serviceUrl='http://instance0.eurekaRead.com:8080/context', region='region', zone='us
-east-1c'}, AwsEndpoint{ serviceUrl='http://instance2.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}, AwsEndpoint{ serviceUrl='http://instance1.eurekaRead.com:8080/co
ntext', region='region', zone='us-east-1c'}]
12:20:07.306 [pool-2-thread-1] DEBUG c.n.d.shared.resolver.AsyncResolver - Resolved to [AwsEndpoint{ serviceUrl='http://instance0.eurekaRead.com:8080/context', region='region', zone='us
-east-1c'}, AwsEndpoint{ serviceUrl='http://instance2.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}, AwsEndpoint{ s
erviceUrl='http://instance1.eurekaRead.com:8080/context', region='region', zone='us-east-1c'}]

com.netflix.discovery.shared.transport.EurekaHttpClientsTest > testCanonicalResolver FAILED
java.lang.AssertionError at EurekaHttpClientsTest.java:169

148 tests completed, 1 failed, 2 skipped
:eureka-client:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':eureka-client:test'.
> There were failing tests. See the report at: file:///C:/Users/shaiku/Documents/GitHub/eureka/eureka-client/build/reports/tests/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 11 mins 57.714 secs


C:\Users\shaiku\Documents\GitHub\eureka [master +0 ~1 -0]>


Please reply as soon as possible.

umesa...@gmail.com

unread,
Dec 2, 2015, 4:53:18 AM12/2/15
to eureka_netflix, umesa...@gmail.com
Plz reply me anyone.... please help me to solve the above error....

Tomasz Bak

unread,
Dec 2, 2015, 11:17:51 AM12/2/15
to eureka_...@googlegroups.com
I am not able to replicate this issue on Mac OS X or Linux. I can see you run this build on Windows, so this is most likely OS specific corner case that we do not cover. You can bypass the tests completely by running:
./gradlew -x test build
/Tomasz

On Wed, Dec 2, 2015 at 1:53 AM, <umesa...@gmail.com> wrote:
Plz reply me anyone.... please help me to solve the above error....

umesa...@gmail.com

unread,
Dec 4, 2015, 1:00:02 AM12/4/15
to eureka_netflix
Thanks a lot tomasz. It worked. Eureka has build successfully.
After that, we need to copy the war artifacts to tomcat webapps. How to do that?
Actually i am trying to run a git hub project(https://github.com/paulc4/microservices-demo). For that, they have given the following steps.
1. In each window, change to the directory where you cloned the demo.
2. In the first window, build the application using mvn clean package
3. In the same window run: java -jar target/microservice-demo-0.0.1-SNAPSHOT.jar registration
4. Switch to the second window and run: java -jar target/microservice-demo-0.0.1-SNAPSHOT.jar accounts
5. In the third window run: java -jar target/microservice-demo-0.0.1-SNAPSHOT.jar web
6. In your favorite browser open the same two links: http://localhost:1111 and http://localhost:3333
7.You should see servers being registered in the log output of the first (registration) window. As you interact you should logging in the second and third windows.

8. In a new window, run up a second account-server using HTTP port 2223:
java -jar target/microservice-demo-0.0.1-SNAPSHOT.jar accounts 2223
9. Allow it to register itself
10. Kill the first account-server and see the web-server switch to using the new account-server - no loss of service.

I have followed till step 6, when i open eureka dashboard i am able to see two appliations has registetred. But how to kill a first account server and run second account server to check no loss of service.

Do we need to change the ports in the code?I have no idea how eureka is geeting the instances and how it is running . Please help me understand this and some help how to run this project.

I am really sorry if i am asking stupid questions . I am just a graduate and i need to run this project as proof of concept on micro services. Please help me.

Tomasz Bak

unread,
Dec 4, 2015, 12:19:40 PM12/4/15
to eureka_...@googlegroups.com
Each application probably runs Eureka client that is doing registration/heartbeating automatically. As soon as you kill/terminate the process, no more heartbeats are sent from the application to Eureka server, and after configured amount of time (default = 3 * heartbeat interval, which itself is 30sec), the registration record is removed.
/Tomasz

Reply all
Reply to author
Forward
0 new messages