[JAVA-714] Connection refused by Java driver but allowed by shell Created: 13/Dec/12 Updated: 15/Dec/12 Resolved: 15/Dec/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.9.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Prasan Kaikini | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac 10.7.5 |
||
| Description |
|
I had been able to connect and work with the database, but all of a sudden I started getting "Connection refused" errors. I can still connect to mongod from the command line. I checked the bug reports and changed host from "localhost" to 127.0.0.1. But that hasn't helped. Here's the stack-trace: Here's my Spring configuration for Mongo: <mongo:db-factory id="mongoDbFactory" dbname="hledb" host="127.0.0.1" port="27017"/> |
| Comments |
| Comment by Jeffrey Yemin [ 15/Dec/12 ] |
|
OK, thanks for the update. Let me know if you figure out what Tomcat is doing to cause this problem, as perhaps others are encountering it as well. |
| Comment by Prasan Kaikini [ 15/Dec/12 ] |
|
Here's my /etc/hosts: Thanks for letting me not to use 2.9.1. Also, I think it had something to do with my Tomcat. I wrote a small Java test program to try to access mongo without Tomcat, and it worked. I restarted Tomcat, but that didn't help. I restarted my laptop, but that didn't help either. So I reinstalled Tomcat and that fixed it. |
| Comment by Jeffrey Yemin [ 15/Dec/12 ] |
|
Anything interesting in /etc/hosts? Can you post it? |
| Comment by Jeffrey Yemin [ 15/Dec/12 ] |
|
Not sure what's happening here, but wanted to let you know ASAP not to use 2.9.1 as it contains a serious bug. Please upgrade to 2.9.3 or 2.10.1. |