[JAVA-471] Internet connectivity + Java GlassFish + Connections Created: 15/Nov/11  Updated: 11/Sep/19  Resolved: 15/Nov/11

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Critical - P2
Reporter: jagadesh paladugula Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows7 64 bit


Attachments: Text File stack trace.txt    

 Description   

I am accessing Mongo from Java. Using 2.7 Javadriver with Glassfish as server.

Question I have is regarding a weired situation I am facing.

When I dissconnect from internet, all the connections which are open(from java) are closed. I can see this on the mongo server log.

When I connect back to internet, my glass fish server runs and when I try to do something it fails as all the connections are closed and it is not creating a new connection.

Even I stop mongodb server and start it back doesn't work. I have to stop & start the glass fish server with mongo server works.

Any Idea whats going on..



 Comments   
Comment by jagadesh paladugula [ 15/Nov/11 ]

Ok Thx. I appreciate for your time.

Comment by Scott Hernandez (Inactive) [ 15/Nov/11 ]

No, this is not a bug. It is issue with your machine (network) configuration.

This has nothing to do with the mongo java driver nor mongodb and completely part of your network configuration for the local machine. I suggest you read up on networking, name resolution, or find someone to help you on that front.

Using 127.0.0.1 will bypass all of these issues and may be a fine solution if you can't find other help, nor address the underlying network configuration.

Comment by jagadesh paladugula [ 15/Nov/11 ]

Hey, its working when I give 127.0.0.1
But it fails when I give localhost. I think when I give localhost, internally it gets ip address.
Is this a bug. Not sure

Comment by Scott Hernandez (Inactive) [ 15/Nov/11 ]

Connect to 127.0.0.1 (loopback address) or get help from your network/sys-admin to address your machine connection issues.

If you connect via an address which is not permanent then you will get issues like this, as you have found.

Comment by jagadesh paladugula [ 15/Nov/11 ]

I connect to mongodb with localhost:27017.

But, when I tried ipconfig, the ipaddress is(14.96.115.169) which is different form the above one and its changeing every time when I disconnect and connect.

How should I solve this one

Comment by Scott Hernandez (Inactive) [ 15/Nov/11 ]

What does the machine network configuration look like, ips, subnets, and routes? Is this address (14.99.100.23) set via DHCP?

I think you need to connect via localhost (127.0.0.1) or a private address with mongodb which isn't tied to your internet address.

Generated at Thu Feb 08 08:52:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.