Issue Details (XML | Word | Printable)

Key: GLASSFISH-16013
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Amy Roh
Reporter: lidiam
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

RestartRequired: changing http port does not trigger restart required message for a standalone instance

Created: 16/Feb/11 02:11 PM   Updated: 08/Jul/11 10:35 PM   Resolved: 07/Jul/11 05:18 AM
Component/s: web_container
Affects Version/s: 3.1_b43
Fix Version/s: 3.1.1_b05

Time Tracking:
Not Specified

File Attachments: 1. JPEG File change-ins-http-port.JPG (71 kB) 07/Jul/11 12:01 AM - lidiam

Environment:

promoted build b43


Tags: 3_1_1-approved 3_1_1-verified
Participants: Amy Roh, lidiam, scatari, Scott Fordin and Tom Mueller


 Description  « Hide

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.



lidiam added a comment - 16/Feb/11 02:14 PM

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


Tom Mueller added a comment - 17/Feb/11 07:01 AM

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.


Scott Fordin added a comment - 18/Mar/11 01:14 PM

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


Tom Mueller added a comment - 21/Mar/11 09:35 AM

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


Tom Mueller added a comment - 22/Mar/11 07:19 AM

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.


Amy Roh added a comment - 23/Mar/11 07:41 PM

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.


Amy Roh added a comment - 05/Apr/11 12:39 PM

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


Amy Roh added a comment - 07/Apr/11 10:18 AM

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.


Amy Roh added a comment - 10/May/11 10:52 AM

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


scatari added a comment - 10/May/11 11:13 AM

Approved.


lidiam added a comment - 06/Jul/11 11:56 PM

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.


lidiam added a comment - 07/Jul/11 12:01 AM

Attaching screenshot of changed http port.


Amy Roh added a comment - 07/Jul/11 12:51 AM

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.