This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233607 - unable to stop constant Authentication Required dialog
Summary: unable to stop constant Authentication Required dialog
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P2 normal with 1 vote (vote)
Assignee: TomasKraus
URL:
Keywords:
: 224482 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-29 17:50 UTC by Kenneth Ganfield
Modified: 2014-05-28 22:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Ganfield 2013-07-29 17:50:44 UTC
I added a GF3.1.2.2 server instance and now I am constantly getting an Authentication Required dialog and there is no way to stop it from reappearing.

One problem is: Authentication for what? The dialog is not very informative.

Clicking cancel dismisses the dialog but it reappears approx 5 seconds later.

Here is some excerpts from the log


INFO [glassfish]: Requested Entity: public id = -//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN, system id = http://glassfish.org/dtds/glassfish-resources_1_5.dtd
INFO [glassfish]: Created GlassFish Server 3.1.2.2 instance with name GlassFish Server 3
WARNING [org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryTypeProvider]: Wrong Classpath entry file:/Applications/NetBeans/glassfish-3.1.2.2/mq/lib/jaxm-api.jar in Library: Java-EE-GlassFish-v3-Prelude

[...]

INFO [glassfish]: Requested Entity: public id = -//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN, system id = http://glassfish.org/dtds/glassfish-resources_1_5.dtd
WARNING [org.netbeans.core.NbAuthenticator]: No authentication set while requesting http://localhost:4848/__asadmin/__locations

[...]

WARNING [org.netbeans.core.NbAuthenticator]: No authentication set while requesting http://localhost:4848/__asadmin/version
WARNING [org.netbeans.core.NbAuthenticator]: No authentication set while requesting http://localhost:4848/__asadmin/__locations
INFO [glassfish]: Storing GlassFish Server 4.0 atributes
Comment 1 TomasKraus 2013-07-29 21:43:59 UTC
This dialog is part of java.net.Authenticator and is being displayed when server responds with HTTP 401 or 403 codes (authentication failure).

It happens only with GlassFish 3 and there is no way to turn this off except disabling server status monitoring code for some server instance.

Check server properties and make sure you have correct user name and password there. If not, you'll be getting those dialogs. 

This is also happening when you have 2 servers with admin interface on the same host and port and they use different credentials, one of them is running and both servers are being checked. So authentication is constantly failing for one of them. Currently no way to stop this. I can try to add some 'disable monitoring' option there.
Comment 2 Stepan Zebra 2013-08-01 09:32:57 UTC
(In reply to comment #1)
> ...
> 
> This is also happening when you have 2 servers with admin interface on the same
> host and port and they use different credentials, one of them is running and
> both servers are being checked. So authentication is constantly failing for one
> of them. Currently no way to stop this. I can try to add some 'disable
> monitoring' option there.

I don't now how common is this kind of setup, but I'm getting often into this situation now.
I install NB 7.4 & GF 4 package and I also have GF 3.1.2.2 which was installed with previous NB. On first IDE startup, both servers are added to the Servers list with username admin and empty password. When I run GF 4 for the first time, a password is generated and saved for it. Afterwards, when I run GF 3, which doesn't have, nor generates some password, the Auth windows starts poping up.
I think more people are likely to run into this unpleasant issue, just because they'll have GF 4 with generated password by default. Therefore, I believe this should be treated somehow for release 7.4.
Comment 3 TomasKraus 2013-08-01 20:51:06 UTC
That's why I have it as P2. I'll stop background checks for server after failed authentication and it will be restarted only with user action (refresh, start, deploy, etc).
Comment 4 TomasKraus 2013-08-01 20:53:05 UTC
With GF4 I can also notify user about this in credentials pop up which is implemented in plugin. Unfortunately in GF3 those java.net.Authenticator pop ups are problem.
Comment 5 TomasKraus 2013-08-01 21:27:45 UTC
*** Bug 224482 has been marked as a duplicate of this bug. ***
Comment 6 gholmer 2013-08-02 12:22:31 UTC
"One problem is: Authentication for what? The dialog is not very informative."

Will you be changing the dialog title so that the user knows what authentication is being requested? Given the high-profile security issues with Java lately, I'd think that would be considered a good idea.

"This is also happening when you have 2 servers with admin interface on the same
host and port and they use different credentials, one of them is running and
both servers are being checked."

That's the case for me; it's not unusual for me to have two GlassFish installations when I am evaluating a new version. I install them myself in /usr/share/glassfish-<version> and set them up the same way.
Comment 7 TomasKraus 2013-08-02 12:40:56 UTC
I know about this use-case and will stop background checks for server after 1st auth failure.

> "One problem is: Authentication for what? The dialog is not very informative."
This is java.net.Authenticator, I can't do much with it.
Comment 8 TomasKraus 2013-08-05 16:00:53 UTC
Checked into GF Tooling Library:
--------------------------------
changeset:   639:71ea41c81d19
summary:     Bug# 233607 - Support to suspend server monitoring

changeset:   640:cd7a0220479c
summary:     Bug# 233607 - Changed authentication failure events
             to cover java.net.Authenticator

Checked into web-main:
----------------------
changeset:   260325:e8bde7c2c2fb
summary:     #233607 - Reduced Authentication Required dialog
             opening a bit, but there are stil some minor issues

changeset:   260326:1c0720927d73
summary:     #233607 - Authentication Required dialog can be stopped using
             Cancel until next user triggered action
             (refresh/deploy/restart/...)

This will make your life much better. User action like refresh will restart background monitoring. But you won't see pop up again when not touching server.

For GF4 there is custom credentials pop up which won't appear again after cancel until you'll restart server.

But is not that simple, this depends on both registered server version and running server version. Think current state is quite user friendly.

Will push later in the evening after few more bug fixes.
Comment 9 TomasKraus 2013-08-05 19:07:38 UTC
Pushing changes into web-main and closing this issue.
Comment 10 Quality Engineering 2013-08-07 02:26:08 UTC
Integrated into 'main-silver', will be available in build *201308062300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e8bde7c2c2fb
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #233607 - Reduced Authentication Required dialog opening a bit, but there are stil some minor issues
Comment 11 ogiebjl 2014-05-28 22:41:12 UTC
Tools > Options > General
Proxy Settings: No Proxy 
[OK]

That will stop the Proxy Authentication (FTP/SFTP) popup. Or set your proxy settings to something that works.