Re: [Neo4j] Neo4j connection timeout between servers

2018-11-28 Thread 'Michael Hunger' via Neo4j
Could you please create this issue in spring data neo4j jira? Thx

Von meinem iPhone gesendet

> Am 28.11.2018 um 08:33 schrieb Siva Punnaivanam :
> 
> Hi Team, 
> 
> We have installed neo4j (neo4j-community-3.4.7-unix.tar) on a Server 1 and 
> our spring boot application deployed on server 2 is using that neo4j database.
> We often getting connection timeout issue in our application and immediately 
> on next try it is working fine. 
> Connection time out is not bcoz of long inactive time. 
> Though we are using application regressively, we are getting connection 
> timeout suddenly in between and on immediate next try it is working fine.
> 
> This is the neo4j property details given in our spring boot application 
> running on server 2. 
> 
> spring.data.neo4j.uri=bolt://X.X.X.X:17687
> spring.data.neo4j.username=neo4j
> spring.data.neo4j.password=xx
> 
> And below is the configuration file we used in our applicaiton to create the 
> connection.
> 
> @EnableNeo4jRepositories(basePackages = "com.metadata.dao", sessionFactoryRef 
> = "userSessionFactory", transactionManagerRef = "userTransactionManager")
> @Configuration
> @EnableTransactionManagement
> public class Neo4jConfiguration {
> 
>   @Value("${spring.data.neo4j.uri}")
>   private String url;
> 
>   @Value("${spring.data.neo4j.username}")
>   private String userName;
> 
>   @Value("${spring.data.neo4j.password}")
>   private String password;
> 
>   @Bean(name = "userSessionFactory")
>   @Primary
>   public SessionFactory bUserSessionFactory() {
>   return new SessionFactory(bUserconfiguration(), 
> "com.metadata.dao.entity");
>   }
> 
>   @Bean
>   public org.neo4j.ogm.config.Configuration bUserconfiguration() {
>   org.neo4j.ogm.config.Configuration configuration = new 
> org.neo4j.ogm.config.Configuration.Builder().uri(url)// "bolt://localhost"
>   .credentials(userName, password)// "user", 
> "secret")
>   .build();
>   return configuration;
>   }
> 
>   @Bean
>   public Neo4jTransactionManager bUserTransactionManager() {
>   return new Neo4jTransactionManager(bUserSessionFactory());
>   }
> 
> }
> 
> And attached is the neo4j connection time out logs we got in our application 
> logs. 
> 
> Please help me to resolve the issue. Kindly let me know if you need any 
> additional information.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 

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


[Neo4j] Neo4j connection timeout between servers

2018-11-28 Thread Siva Punnaivanam
Hi Team, 

We have installed neo4j (neo4j-community-3.4.7-unix.tar) on a Server 1 and 
our spring boot application deployed on server 2 is using that neo4j 
database.
We often getting connection timeout issue in our application and 
immediately on next try it is working fine. 
Connection time out is not bcoz of long inactive time. 
Though we are using application regressively, we are getting connection 
timeout suddenly in between and on immediate next try it is working fine.

This is the neo4j property details given in our spring boot application 
running on server 2. 

spring.data.neo4j.uri=bolt://X.X.X.X:17687
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=xx

And below is the configuration file we used in our applicaiton to create 
the connection.

@EnableNeo4jRepositories(basePackages = "com.metadata.dao", 
sessionFactoryRef = "userSessionFactory", transactionManagerRef = 
"userTransactionManager")
@Configuration
@EnableTransactionManagement
public class Neo4jConfiguration {

@Value("${spring.data.neo4j.uri}")
private String url;

@Value("${spring.data.neo4j.username}")
private String userName;

@Value("${spring.data.neo4j.password}")
private String password;

@Bean(name = "userSessionFactory")
@Primary
public SessionFactory bUserSessionFactory() {
return new SessionFactory(bUserconfiguration(), "com.metadata.dao.entity");
}

@Bean
public org.neo4j.ogm.config.Configuration bUserconfiguration() {
org.neo4j.ogm.config.Configuration configuration = new 
org.neo4j.ogm.config.Configuration.Builder().uri(url)// "bolt://localhost"
.credentials(userName, password)// "user", "secret")
.build();
return configuration;
}

@Bean
public Neo4jTransactionManager bUserTransactionManager() {
return new Neo4jTransactionManager(bUserSessionFactory());
}

}

And attached is the neo4j connection time out logs we got in our 
application logs. 

Please help me to resolve the issue. Kindly let me know if you need any 
additional information.


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"28-Nov-2018 06:53:57.195 SEVERE [Neo4jDriverIO-4-3] 
org.neo4j.driver.internal.logging.JULogger.error [0xce2280f4] Fatal error 
occurred in the pipeline
 java.io.IOException: Connection timed out
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at 
org.neo4j.driver.internal.shaded.io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at 
org.neo4j.driver.internal.shaded.io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1106)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:343)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at 
org.neo4j.driver.internal.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at 
org.neo4j.driver.internal.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:748)

"2018-11-28 06:53:57 [Neo4jDriverIO-4-3] ERROR ChannelErrorHandler - 
[0xce2280f4] Fatal error occurred in the pipeline
"java.io.IOException: Connection timed out
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at 
org.neo4j.driver.internal.shaded.io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at 
org.neo4j.driver.internal.shaded.io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1106)
at 
org.neo4j.driver.internal.shaded.io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:343)
at