• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Spring mongodb connection failure

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on spring mongodb application [Environment: jdk 1.7, tomcat7 and CentOs system, Framework: spring 3.x, mongo-2.10],
We used `mongotemplate` to interface with mongo instance.
Initially application works fine but over a period of time we are experiencing mongodb connection failure problem.

We have tried to resolve the issue by changing mongo properties, also made changes related to tcp-keep-alive and networking settings
but still facing the same problem. After getting an error we checked mongo service it was running. Now we have to restart the tomcat to make the application working.

Application Configurations



Mongo.properties:



Exception

org.springframework.dao.DataAccessResourceFailureException: can't call something : localhost/127.0.0.1:27017/pat_queue; nested exception is com.mongodb.MongoException$Network: can't call something : localhost/127.0.0.1:27017/pat_queue at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:56) at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:1551) at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1462) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1260) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1249) at
 
Fire me boy! Cool, soothing, shameless self promotion:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic