[#GLASSFISH-14868] Error while creating a network

advertisement
[GLASSFISH-14868] Error while creating a network listener in a new
configuration. Created: 29/Nov/10 Updated: 28/Feb/11 Resolved: 22/Dec/10
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Closed
glassfish
admin_gui
3.1
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
shaline
Fixed
None
Not Specified
Tags:
3_1-approved, 3_1-verified
3.1_ms08
Priority:
Assignee:
Votes:
Major
srinik76
0
Not Specified
Not Specified
OS: Solaris Sparc 10
Browser: firefox 3.6
Description
Build used : GF 3.1 nightly dated 11/29.
Create a new configuration (ins1-config) by copying from default-config.
Create a new standalone instance by referring this new ins1-config and start the instance.
Under ins1-config/Network-config/Protocols, create a new protocol (ins1-protocol) with
"server" as default server and all values default.
Under ins1-config/Network-config/Network-listeners, create a new listener by selecting the new
protocol "(ins1-protocol)", and all other values default. click "Ok" button. We see the below
Error:
"Error An error has occurred
An error occurred during replication"
server.log has the below:
[#|2010-11-29T17:19:42.645-0800|SEVERE|glassfish3.1|org.glassfish.admingui|_Thre
adID=15;_ThreadName=Thread-1;|RestResponse.getResponse() failed. endpoint = 'ht
tp://localhost:4848/management/domain/configs/config/ins1-config/network-config/
network-listeners/network-listener'; attrs = '
{port=8888, enabled=true, threadpo ol=http-thread-pool, protocol=ins1-protocol, transport=tcp,
address=0.0.0.0, jk enabled=null, name=ins1-listener, target=instance1}
'; RestResponse:
{"message": "An error occurred during replication","exit_code":"FAILURE"}
"|#]
[#|2010-11-29T17:19:43.065-0800|INFO|glassfish3.1|javax.enterprise.system.std.co
m.sun.enterprise.server.logging|_ThreadID=15;_ThreadName=Thread-1;|com.sun.webui
.jsf.component.DropDown::The current value of component propertyForm:propertyShe
et:propertSectionTextField:prop1:vs does not match any of the selections.
Did you forget to reset the value after changing the options? |#]
Comments
Comment by srinik76 [ 29/Nov/10 ]
Tried in my workspace it works fine. Not able to reproduce. I will update my workspace and try it. (My workspa
updated last weekend, I do not see any changes within 3 days in this code, any way i will try with latest workspa
update you)
If possible test it once again in your build and let me know your observation.
Comment by Anissa Lam [ 30/Nov/10 ]
I have the latest code, (just did svn update), and i can reproduce the problem following the exact same step.
However, this is NOT GUI issue.
If you use the CLI command to create the network listener, you will see the following :
%asadmin create-network-listener --listenerport 3434 --target ST-config --protocol testP testListener
org.glassfish.api.admin.CommandException: remote failure: An error occurred during replication
FAILURE: Command create-network-listener failed on server instance ST: org.glassfish.api.admin.CommandEx
remote failure: Protocol testP has neither a protocol nor a port-unification configured
Command create-network-listener failed.
So, GUI is displaying this error correctly.
Not sure if this 'admin' or 'grizzle' issue. Tom can dispatch.
Comment by Tom Mueller [ 30/Nov/10 ]
The problem here is related to a missing command:
asadmin create-http --target ST-config --default-virtual-server server testP
If this command is executed before the create-network-listener command, then the error does not occur via asadm
This sequence of commands reproduces the error message:
asadmin create-local-instance i1
asadmin start-instance i1
asadmin create-protocol --target i1 testP
asadmin create-network-listener --listenerport 3434 --target i1 --protocol testP testL
However, if the create-http command above is inserted after the create-protocol, then there is no error.
Comment by Tom Mueller [ 30/Nov/10 ]
Anissa, can you please verify that the admin console is correctly calling the create-http command in this case?
Comment by srinik76 [ 09/Dec/10 ]
Issue 15055 and 14846 are because of same reason. When SSL is not available for the listener it throws error.
Comment by srinik76 [ 14/Dec/10 ]
created a blocking Issue 15159
create-ssl and update ssl attributes have inconsistent attribute names in REST API
Comment by Anissa Lam [ 14/Dec/10 ]
I can see that blocks .
However, I don't see why this bug depends on the fix of SSL attribute name
As Tom points out, the fix of this bug is to create the <http> element first before creating network-listener.
So, the sequence GUI should perform is:
1. create protocol
2. create http
3. create-network-listener
Please look into this.
Comment by srinik76 [ 14/Dec/10 ]
The actual issue is fixed.
While saving I face some other issues, because
Now same SSL GUI page is used for both edit and create. During create the backend attributes come as different
during edit it is different.
So both the cases we need consistent attributes.So I have raised 15159 for fixing this.
Comment by srinik76 [ 21/Dec/10 ]
How bad is its impact? (Severity)
During protocol creation it will not creates http and ssl element. Also ssl creation/updation is not possible under
listener,protocol, iiop listener.
How often does it happen? Will many users see this problem? (Frequency)
When ever user tries to create protocol using GUI and also updation of SSL
How much effort is required to fix it? (Cost)
fix is ready
What is the risk of fixing it and how will the risk be mitigated? (Risk)
No risk in fixing. Just adding create-ssl and create-http rest request before updating ssl, http elements.
Index: common/src/main/resources/shared/sslPrepare.inc
===================================================================
— common/src/main/resources/shared/sslPrepare.inc (revision 43863)
+++ common/src/main/resources/shared/sslPrepare.inc (working copy)
@@ -55,7 +55,8 @@
}
if (! #
{requestScope.exist}
){
setPageSessionAttribute(key="edit" value="#
{false}" )
- gf.getDefaultValues(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}")
+ gf.createEntity(endpoint="#{pageSession.createSslUrl}" attrs="#{pageSession.valueMap}"
convertToFalse="#{pageSession.convertToFalseList}");
+ gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json" valueMap="#{pageSession.valueMap}");
convertToDifferentCiphersGroup(ciphers="#{pageSession.valueMap['ssl3TlsCiphers']}"
CommonCiphersList="#{pageSession.selectedCommon}"
EphemeralCiphersList="#{pageSession.selectedEphemeral}"
@@ -65,6 +66,7 @@
//set the following for including buttons.inc
setPageSessionAttribute(key="convertToFalseList" value={"ssl3Enabled" "tlsEnabled" "clientAuthEnabled" })
+setPageSessionAttribute(key="skipAttrsList", value={"sslInactivityTimeout"});
setPageSessionAttribute(key="showDefaultButton" value="#{false}
")
setPageSessionAttribute(key="hasPropertySheet" value="#
{true}" )
setPageSessionAttribute(key="hasPropertyTable" value="#{false}" )
Index: common/src/main/resources/shared/sslButtons.inc
===================================================================
— common/src/main/resources/shared/sslButtons.inc (revision 43863)
+++ common/src/main/resources/shared/sslButtons.inc (working copy)
@@ -66,7 +66,7 @@
<!command
convertCiphersItemsToStr(common="#{pageSession.selectedCommon}"
ephemeral="#{pageSession.selectedEphemeral}" other="#{pageSession.selectedOther}"
ecc="#{pageSession.selectedEcc}" ciphers="#{requestScope.ciphers}")
mapPut(map="#{pageSession.valueMap}" key="ssl3TlsCiphers" value="#{requestScope.ciphers}")
- gf.createEntity(endpoint="#{pageSession.selfUrl}" attrs="#{pageSession.valueMap}"
convertToFalse="#{pageSession.convertToFalseList}");
+ gf.createEntity(endpoint="#{pageSession.selfUrl}" attrs="#{pageSession.valueMap}"
skipAttrs="#{pageSession.skipAttrsList}" convertToFalse="#{pageSession.convertToFalseList}");
prepareSuccessfulMsg();
gf.redirect(page="#{selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alert
/>
Index: web/src/main/resources/grizzly/protocolNewButtons.inc
===================================================================
— web/src/main/resources/grizzly/protocolNewButtons.inc (revision 43829)
+++ web/src/main/resources/grizzly/protocolNewButtons.inc (working copy)
@@ -66,8 +66,13 @@
if ("#{pageSession.valueMap['noCompressionUserAgents']} = #{null}") {
listAdd(list="#{pageSession.skipAttrsList}" value="noCompressionUserAgents");
}
- gf.createEntity(endpoint="${newProxy}/#{pageSession.valueMap['Name']}/#{pageSession.childType2}"
+ mapPut(map="#{pageSession.httpMap}" key="target" value="#{pageSession.valueMap['target']}")
+ gf.createEntity(endpoint="${newProxy}/#{pageSession.valueMap['Name']}/create-http"
attrs="#{pageSession.httpMap}"
+ onlyUseAttrs={"target", "defaultVirtualServer"});
+
+ gf.createEntity(endpoint="${newProxy}/#{pageSession.valueMap['Name']}/http"
+ attrs="#{pageSession.httpMap}"
onlyUseAttrs={"enableCometSupport", "defaultVirtualServer", "serverName", "redirectPort"}
convertToFalse={"uploadTimeoutEnabled", "cometSupportEnabled", "dnsLookupEnabled", "rcmSupportEnable
"traceEnabled", "authPassThroughEnabled", "chunkingEnabled", "xpoweredBy"},
skipAttrs="#{pageSession.skipAttrsList}"
Index: web/src/main/resources/grizzly/ssl.layout
===================================================================
— web/src/main/resources/grizzly/ssl.layout (revision 43829)
+++ web/src/main/resources/grizzly/ssl.layout (working copy)
@@ -61,8 +61,13 @@
setPageSessionAttribute(key="childType" value="ssl")
setPageSessionAttribute(key="parentUrl",
value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/networkconfig/protocols/protocol/#{pageSession.Name}");
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}");
+ setPageSessionAttribute(key="createSslUrl",
value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/networklisteners/network-listener/#{pageSession.listenerName}/create-ssl");
setPageSessionAttribute(key="rest-api" value="true");
setPageSessionAttribute(key="showCancelButton" value="#{true}
")
+ createMap(result="#
{pageSession.valueMap}");
+ mapPut(map="#{pageSession.valueMap}
" key="target" value="server");
+#include "/common/shared/targetsConfig.inc"
+ mapPut(map="#
{pageSession.valueMap}
" key="certName" value="");
#include "/common/shared/sslPrepare.inc"
/>
</event>
Comment by Anissa Lam [ 21/Dec/10 ]
I reviewed the code. Looks fine to me. thanks.
Comment by srinik76 [ 22/Dec/10 ]
Added code in ssl common code to create ssl if ssl element does not exist before updation
Sending common/src/main/resources/shared/sslButtons.inc
Sending common/src/main/resources/shared/sslPrepare.inc
Sending web/src/main/resources/grizzly/protocolNewButtons.inc
Sending web/src/main/resources/grizzly/ssl.layout
Transmitting file data ....
Committed revision 44029.
Comment by srinik76 [ 22/Dec/10 ]
checked in the fix
Generated at Tue Feb 09 10:41:52 UTC 2016 using JIRA 6.2.3#6260sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.
Download