NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Newly installed NB 7 won't connect to network
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Thu Aug 04, 2011 11:28 am    Post subject: Newly installed NB 7 won't connect to network Reply with quote

I've just installed NB 7.0.1. When first started it wanted to download Junit. But said that it couldn't connect to the network and told me to check the proxy settings (which I don't have). It also won't connect when I try Help|Check for updates (see screenshot).

It's fine in NB 6.9.1. And there's no network problem (or I wouldn't be sending this!).

What's going wrong please?



netbeans fail.png
 Description:
screenshot from help|check for updates.
 Filesize:  22.52 KB
 Viewed:  10729 Time(s)

netbeans fail.png


Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Tue Aug 09, 2011 10:20 am    Post subject: Reply with quote

What - no-one? I don't think it's a firewall issue as my firewall asks me if network activity is allowed, and so far it hasn't done so

I've looked at the network activity and it's trying to connect to dlc.oracle.com and plugins.netbeans.org, both of which are visible and pingable from my machine. But the TCP connection says SYN_SENT and then times out without a reply. The program which is trying to connect is javaw, which I'd expect.

Crying or Very sad
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Tue Aug 09, 2011 11:17 am    Post subject: Reply with quote

Just tried reinstalling both NB and Java - but exactly the same problem.

One discovery - my firewall is telling me that javaw has a rule for address c012:6e0b:: which is an IP6 address - and my machine doesn't have IP6 enabled (no, there's no point in enabling it as my router doesn't have it either).

So has Java7 jumped the gun on universal adoption of IP6?

I'm trying to get onto the Oracle forum to ask there, but it won't accept my username and password so it looks as if I'll have to get another account there. What a performance!
Back to top
Bob McConnell
Posted via mailing list.





PostPosted: Wed Aug 10, 2011 1:13 pm    Post subject: Newly installed NB 7 won't connect to network Reply with quote

From: ptoye

Quote:
What - no-one? I don't think it's a firewall issue as
my firewall asks me if network activity is allowed, and
so far it hasn't done so

I've looked at the network activity and it's trying to
connect to dlc.oracle.com and plugins.netbeans.org, both
of which are visible and pingable from my machine. But
the TCP connection says SYN_SENT and then times out
without a reply. The program which is trying to connect
is javaw, which I'd expect.

[Crying or Very sad]

Ping is worthless as a debugging tool. Not only does it use a different
protocol (ICMP), it is considered a security problem by many
administrators and can easily be disabled or spoofed.

What TCP ports is it trying to connect with? Are those ports open
through both your local firewall software and any physical firewalls
that may be between those computers? Can you open a telnet connection to
those ports? From your description, I suspect the SYN packets are being
dropped by one of the firewalls.

Bob McConnell
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Wed Aug 10, 2011 3:43 pm    Post subject: Reply with quote

Thanks Bob. That's what I'd have thought too. But NB 6.9.1 connects OK - I assume it's to the same site(s) without actually knowing.

The protocol is http. Here's the TCPView screen of both connections - I hope the filenames are obvious.

Unless my firewall's gone bananas I can't see why it should block one and not the other. They're probably different versions of javaw (6 update 23 or 24 and 7) but as I understand it my firewall either trusts a program or asks me whether it should proceed. It seems to have done neither. And according to TCPView it's sent the SYN, so the connection request has got through the firewall.



tcpNB691.png
 Description:
TCPView output from NB 6.9.1
 Filesize:  44.13 KB
 Viewed:  10644 Time(s)

tcpNB691.png



TCP701-1.png
 Description:
TCPview output from NB 7.0.1
 Filesize:  49.25 KB
 Viewed:  10644 Time(s)

TCP701-1.png


Back to top
manooweb



Joined: 11 Aug 2011
Posts: 3

PostPosted: Thu Aug 11, 2011 9:03 am    Post subject: Reply with quote

hello,

OS windows 7 ?

run netbeans with windows administrator rights

+
Manu
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Thu Aug 11, 2011 9:57 am    Post subject: Reply with quote

Nice idea. But doesn't make any difference (except of course that it can't find any of my projects which are in my personal directory).
Back to top
Bob McConnell
Posted via mailing list.





PostPosted: Thu Aug 11, 2011 2:01 pm    Post subject: Newly installed NB 7 won't connect to network Reply with quote

From: ptoye

Quote:
Thanks Bob. That's what I'd have thought too. But NB 6.9.1
connects OK - I assume it's to the same site(s) without
actually knowing.

The protocol is http. Here's the TCPView screen of both
connections - I hope the filenames are obvious.

Unless my firewall's gone bananas I can't see why it
should block one and not the other. They're probably
different versions of javaw (6 update 23 or 24 and 7)
but as I understand it my firewall either trusts a
program or asks me whether it should proceed. It seems
to have done neither. And according to TCPView it's sent
the SYN, so the connection request has got through the
firewall.

There are at least two processes showing TCPV6 listeners, so your
computer appears to have IPv6 enabled. That is one possible cause. Can
you get TCPView to show the IP addresses instead of host names?

There was another thread yesterday about NB7 having problems with the
dual stack (Unable to connect to Internet - Netbeans 7 - LINUX). He
fixed it by adding a line to the netbeans_default_options variable in
netbeans.conf.

-J-Djava.net.preferIPv4Stack=true

It is entirely possible your local firewall software is dropping those
SYN packets. You might try turning off the firewall temporarily to see
if that might be the culprit.

The next step is to capture the network traffic with Wireshark on a
different computer. That's the only way to see what is actually leaving
your NIC.

Bob McConnell
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Thu Aug 11, 2011 4:48 pm    Post subject: Reply with quote

Bob - this is really helpful.

I found that somehow my IP6 had got switched on again (I'm sure I didn't do it), so turned it off on my wireless adapter (which is the one I use) and disabled my Ethernet port entirely.

And the listeners are still there - don't know how they think they'll get any data, though. In fact there are more which are scrolled off the bottom of the screenshot. Possibly there are some internal data connections which want to use IP6 - how on earth would one find out and is it relevant anyway?

I tried again and get the same result. But interestingly, the firewall now sets up a more general rule: allow HTTP requests outbound for JAVAW. Here's screenshot with IP addresses instead of names - but they resolve OK as I'd hope.

NB 6.9.1 works fine - but the connections to dlc.oracle.com end up on a different machine - 92.123.154.72 which resolves to a92-123-154-72.deploy.akamaitechnologies.com whoever they may be. I imagine that Oracle have outsourced some stuff to them.

Anyway I'm about to go on holiday so won't be around here for a few days. Pity - I started the upgrade a week ago in the hope of getting a quick job done. It'll have to wait.



TCP701-4.png
 Description:
As TCP701-1 but with addresses
 Filesize:  40.23 KB
 Viewed:  10595 Time(s)

TCP701-4.png


Back to top
jfcayron



Joined: 11 Aug 2011
Posts: 1

PostPosted: Thu Aug 11, 2011 11:37 pm    Post subject: Reply with quote

ptoye wrote:
Just tried reinstalling both NB and Java - but exactly the same problem.

One discovery - my firewall is telling me that javaw has a rule for address c012:6e0b:: which is an IP6 address - and my machine doesn't have IP6 enabled (no, there's no point in enabling it as my router doesn't have it either).

So has Java7 jumped the gun on universal adoption of IP6?

I'm trying to get onto the Oracle forum to ask there, but it won't accept my username and password so it looks as if I'll have to get another account there. What a performance!


One thing I can tell you is that I was successful with Java 6 and Java 7 (32-bit) on XP (32-bit), I was successful with Java 6 on Windows 7 (64-bit) BUT it did NOT work with Java 7 (64-bit) on Windows 7 (64-bit)

HTH Rolling Eyes
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Tue Aug 23, 2011 10:09 am    Post subject: Reply with quote

I'm using Java7 64-bit so this seems to be the problem.

I wrote a quick and dirty program to set up a socket connection to a well-known web site and it times out. And my firewall tells me that it was trying to use IP6 protocol to an IP4 address, which isn't going to help much. So it looks as if Java 7 64-bit is screwed up. Now, how to get Oracle to mend it?

Come back Sun, all is forgiven.
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Tue Aug 23, 2011 10:32 am    Post subject: Reply with quote

I also tried Bob McConnell's idea of setting -J-Djava.net.preferIPv4Stack=true in the netbeans.conf file.

This seems to have cured the problem of not being able to connect to the server - it's getting updates now OK and it's installed the junit library.

But the connections still time out when I run the quick & dirty program within NetBeans. All the program does is

Code:
    public static void main(String[] args) {
        try {
            Socket s=new Socket("www.ptoye.com", 80);
        } catch (Exception e) {
            System.out.println("Connection fail:"+e);
        }
    }


It times out when running it under the JRE directly as well, so it's not an NB problem now.
Back to top
ptoye



Joined: 08 Dec 2009
Posts: 49
Location: Reading, England

PostPosted: Tue Aug 23, 2011 11:44 am    Post subject: Reply with quote

And if you add -Djava.net.preferIPv4Stack=true to the project's Run|VMOptions box it works (well, at least it doesn't give an error).

So there's a workaround - I'll suggest that this is publicised a bit better until Oracle get off their backsides and mend it.
Back to top
hcqbach



Joined: 25 Aug 2011
Posts: 1

PostPosted: Thu Aug 25, 2011 8:22 am    Post subject: Reply with quote

Have had same problem. Many thanks to ptoye and Bob McConnell for time spent investigating and for Bob’s “-J-Djava.net.preferIPv4Stack=true” work-around, which also solved my problem.

Here are the results of my investigations into several scenarios.

Scenario 1:
• Win 7 Home Premium (64 bit)
• Java 1.7.0 (64 bit)
• NB 7.0.1
• McAfee Antivirus Plus Firewall

Netbeans cannot access internet for plugin updater (Tools->Plugins->Reload catalog failed) nor for Help->Check for updates. Note: Giving javaw.exe, java.exe, and netbeans.exe full access rights through firewall did not help.

However, shutting down the firewall entirely did fix the problem. (Putting the above –J-D… line in the netbeans_default_options variable in netbeans.conf file also worked.)

Conclusion: The problem has something to do with the firewall.

*************************************************************
Scenario 2:
• Different machine but same as Scenario 1, except that win 7 and Java 1.7.0 were both 32 bit.

Results were exactly the same.

Conclusion: 64-bit vs. 32-bit is not the problem.

*************************************************************
Scenario 3:
• Third machine, but same OS/Java/NB configuration as Scenario 1 (i.e., 64 bit). (But with Win 7 Professional, not Home Premium.)
• Windows Firewall

No problem!

Conclusion: The problem is related either to differences in firewall settings or operations between the two brands.

*************************************************************
Scenario 4:
• Same machine, OS, and firewall as Scenario 2 (32 bit)
• Java 1.6.0_14 and NB 6.7.1 (32 bit)

No problem.

Conclusion: The problem lies in the interaction between some feature that changed in Java and/or NB between the “6” and “7” versions and something in the difference between the firewalls.

Hope this helps. For now, I’m going to use the netbeans.conf fix and go back to the work I have to do for my job.
Back to top
Bob McConnell
Posted via mailing list.





PostPosted: Fri Aug 26, 2011 1:28 pm    Post subject: Newly installed NB 7 won't connect to network Reply with quote

From: hcqbach

Quote:
Have had same problem. Many thanks to ptoye and Bob
McConnell for time spent investigating and for Bob's
"-Djava.net.preferIPv4Stack=true" work-around, which
also solved my problem.

As much as I would like to take credit for this, I simply recognized the
problem and found this solution via Google. I have run into similar
problems setting up BSD and Linux boxen in mixed OS environments without
any IPv6 routers. But my normal solution is to disable IPv6 on all of
them by blacklisting those kernel modules.

Bob McConnell
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo