[GLASSFISH-16013] RestartRequired: changing http port does not trigger restart required message for a standalone instance Created: 16/Feb/11  Updated: 08/Jul/11  Resolved: 07/Jul/11

Status: Closed
Project: glassfish
Component/s: web_container
Affects Version/s: 3.1_b43
Fix Version/s: 3.1.1_b05

Type: Bug Priority: Major
Reporter: lidiam Assignee: Amy Roh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

promoted build b43


Attachments: JPEG File change-ins-http-port.JPG    
Tags: 3_1_1-approved, 3_1_1-verified

 Description   

Steps to reproduce:

1. Create a standalone instance and start it.
2. Go to instance's configuration, System Properties page and click on Instance Values link for HTTP port.
5. On the next page change the port to a new value, e.g. 28880, and save.
6. Go to instance's page and notice it's still running and does not report requiring restart. CLI reports instance as running as well:

  1. a list-instances
    in1 running

Attempting to access server on the newly specified port fails (28880), while it still responds on the old, default port 28080, hence restart is clearly required for the changes to take effect. The General tab for the instance lists new http port, even though the server is not listening on that port. This is misleading.



 Comments   
Comment by lidiam [ 16/Feb/11 ]

Testing of this feature was earlier blocked by http://java.net/jira/browse/GLASSFISH-14283.

Comment by Tom Mueller [ 17/Feb/11 ]

This is similar to issue GLASSFISH-15987.

If we automatically trigger a restart required notice when any system property is changed, then this bug will be resolved too.

Comment by Scott Fordin [ 18/Mar/11 ]

Added topic under "Restart Required" umbrella issue (http://java.net/jira/browse/GLASSFISH-16040) in 3.1 Release Notes.

Comment by Tom Mueller [ 21/Mar/11 ]

This issue turns out to be unrelated to issue 15987, since 15987 is specifically about system properties that are used in the JavaConfig.

Comment by Tom Mueller [ 22/Mar/11 ]

The root cause of this issue is that the ConfigListener that listens for changes to the NetworkListeners for the web container does not listen for changes to system properties, even though it resolved a system property in order to get the value of the port.

This appears to be an issue in the WebConfigListener class.

Note: a change in the port value due to a system property change may come from the domain, config, cluster, or server object. For example of a listener that listens for system property changes in all of these objects, see the GenericJavaConfigListener class in the core/kernel module.

Reassigning to the web container component.

Comment by Amy Roh [ 23/Mar/11 ]

Sending core/kernel/src/main/java/com/sun/enterprise/v3/admin/listener/GenericJavaConfigListener.java
Sending web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java
Sending web/web-glue/src/main/java/com/sun/enterprise/web/reconfig/WebConfigListener.java
Transmitting file data ...
Committed revision 45700.

Fixed in web container so NotProcessed is triggered for SystemProperty events.

[#|2011-03-23T19:34:28.854-0700|WARNING|glassfish3.2|null|_ThreadID=21;_ThreadName=Thread-1;|Unprocessed event : UnprocessedChangeEvent

{PropertyName=system-property, OldValue = null, NewValue = GlassFishConfigBean.com.sun.enterprise.config.serverbeans.SystemProperty, Source = GlassFishConfigBean.com.sun.enterprise.config.serverbeans.Server}

, reason = The system-property, HTTP_LISTENER_PORT, that is referenced by the Java configuration, was modified, when = 1300934068647|#]

Although UnprocessedChangeEvent gets triggered correctly and displayed in instance's server.log, Admin GUI doesn't show restart required sign. Assigning to Admin GUI team to investigate and to display the sign correctly in the GUI.

Comment by Amy Roh [ 05/Apr/11 ]

Assigning it back to myself to fix dynamic reconfig to happen rather than returning UnprocessedChangeEvent when System Property for ports have been updated.

Comment by Amy Roh [ 07/Apr/11 ]

Fixed. Added dynamic reconfig support for http port on standalone instance.

Sending core/kernel/src/main/java/com/sun/enterprise/v3/services/impl/DynamicConfigListener.java
Sending core/kernel/src/main/java/com/sun/enterprise/v3/services/impl/GrizzlyService.java
Sending web/web-glue/src/main/java/com/sun/enterprise/web/reconfig/WebConfigListener.java
Committed revision 45965.

Comment by Amy Roh [ 10/May/11 ]

Why fix this issue in 3.1.1?


A partial fix (svn 45700) for issue 16013 went into the 3.1.1 branch because the 3.1.1 branch was created after the partial patch went in. Since the branch was created, the complete fix (svn 45965) was committed to the trunk to ignore unrelated events. The same should apply to the branch.

Which is the targeted build of 3.1.1 for this fix?

Build 5.

Do regression tests exist for this issue?

No.

Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

SQE webtier tests

Comment by scatari [ 10/May/11 ]

Approved.

Comment by lidiam [ 06/Jul/11 ]

Tested on ogs-3.1.1-b11-07_04_2011-aix.zip and the issue is still present. Changed HTTP_LISTENER_PORT of standalone instance, in1, to 85 but there is no restart required message:

/export/sqe/lidia/glassfish3/glassfish % asadmin list-instances
in1 running
cl1in1 running
cl1in2 running
Command list-instances executed successfully.

However, the fix may have affected a different issue just logged: http://java.net/jira/browse/GLASSFISH-16976.

Comment by lidiam [ 07/Jul/11 ]

Attaching screenshot of changed http port.

Comment by Amy Roh [ 07/Jul/11 ]

There is no restart required message because restart is not required.

After changing the instance's HTTP_LISTENER_PORT, accessing server on the newly specified port should succeed.

Generated at Tue Mar 03 03:55:32 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.