Skip FOLIO Project Navigation

Problem to build okapi-core


#1

Hello,

I am new to FOLIO e and I am having some trouble with building okapi-core (I am following the developer’s curriculum tutorial). I am trying the command mvn install and I have the following result:

The problems seems to be in some test related to the surefire plugin. I looked through every surefire report and found some errors in the okapi.ModuleTest. The file is presented bellow:

Test set: okapi.ModuleTest

Tests run: 42, Failures: 0, Errors: 28, Skipped: 0, Time elapsed: 104.11 sec <<< FAILURE! - in okapi.ModuleTest
testNotFound1 Time elapsed: 1.83 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testSystemInterfaces1 Time elapsed: 0.05 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testProxy1 Time elapsed: 0.045 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testInternalModule1 Time elapsed: 0.052 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testUiModule1 Time elapsed: 0.048 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testRedirect1 Time elapsed: 0.045 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testVersion1 Time elapsed: 0.047 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

Latter on, in the same file, I have some errors like this:

Test set: okapi.ModuleTest

Tests run: 42, Failures: 0, Errors: 28, Skipped: 0, Time elapsed: 104.11 sec <<< FAILURE! - in okapi.ModuleTest
testNotFound1 Time elapsed: 1.83 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testSystemInterfaces1 Time elapsed: 0.05 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testProxy1 Time elapsed: 0.045 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testInternalModule1 Time elapsed: 0.052 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testUiModule1 Time elapsed: 0.048 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testRedirect1 Time elapsed: 0.045 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

testVersion1 Time elapsed: 0.047 sec <<< ERROR!
io.netty.channel.AbstractChannel$AnnotatedConnectException: Conexão recusada: localhost/127.0.0.1:9238
Caused by: java.net.ConnectException: Conexão recusada

Is there any way I can solve this?
Thank you in advance,

Camila F. Bezerra


#2

Sorry, the other errors look like this:

testHeader2 Time elapsed: 0 sec <<< ERROR!
java.net.UnknownHostException: dev-folio: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)
Caused by: java.net.UnknownHostException: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)

testSemVer2 Time elapsed: 0.001 sec <<< ERROR!
java.net.UnknownHostException: dev-folio: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)
Caused by: java.net.UnknownHostException: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)

testDiscoveryNodes2 Time elapsed: 0 sec <<< ERROR!
java.net.UnknownHostException: dev-folio: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)
Caused by: java.net.UnknownHostException: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)

testOneModule2 Time elapsed: 0 sec <<< ERROR!
java.net.UnknownHostException: dev-folio: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)
Caused by: java.net.UnknownHostException: dev-folio: Nome ou serviço desconhecido
at okapi.ModuleTest.(ModuleTest.java:136)


#3

I followed those instructions to build Okapi.

It compiles successfully for me in both both situations, i.e. the “On-machine” and the “Virtualbox/vagrant” environments.

Try removing okapi (rm -rf $FOLIO_ROOT/okapi) and then do the ‘git clone’ and ‘mvn clean install’ steps again.


#4

That re-clone probably will not help. They all sound like networking issues while doing database tests. Were you using the “Virtualbox/vagrant” environment? Have you tried the “On-machine” instructions instead? It would just need Java and Maven installed to get that far.


#5

I am using “on-machine” instructions. I tried to install okapi in another VM as test and it works perfectly.
I used the nmap command and it seems that port 9238 is blocked. I am searching a way to modify the port state and solve this.


#6

The problem was about my hostname. I had to insert my machine hostname in the /etc/hosts file.
After that, the okapi-core build were sucessful.


#7

Thanks for following through. That note should assist other people that may encounter that problem.