glassfish
  1. glassfish
  2. GLASSFISH-17871

During Update of Linux 3.1 system, Severe error displayed on the screen

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b12
    • Fix Version/s: 3.1.2_b14, 4.0
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Description

      After Updating an OEL5 test system from GF3.1 FCS version (GlassFish Server Open Source Edition 3.1 (build 43) ) to GF 3.1.2 build 12 pkgs, a SEVERE error message is reported when invoking start-domain with --upgrade option. The sequence of steps is:
      o Install GF 3.1 FCS on OEL5 system
      o Configure the default repository to point to the Internal repository and update the install image as follows:

      Once the update is complete, start the domain with "upgrade" option as follows:

      • asadmin start-domain --upgrade domain1

      It's after this command executed when the SEVERE error message is shown. Although the error message is displayed, the system Update succeeds and the functional test scenarios all pass without errors.

      Despite the above, we need to understand the root cause of the Error message which is:

      asadmin start-domain --upgrade domain1
      Nov 30, 2011 5:13:46 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
      INFO: Renamed OSGi persistence store from /export/hudson/workspace/alex-update-x86-gf31/glassfish3/glassfish/domains/domain1/osgi-cache to /export/hudson/workspace/alex-update-x86-gf31/glassfish3/glassfish/domains/domain1/osgi-cache-1322702026577
      Nov 30, 2011 5:13:46 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
      INFO: Successfully launched in 18 msec.
      Launching GlassFish on Felix platform
      Nov 30, 2011 5:13:52 PM org.hibernate.validator.util.Version <clinit>
      INFO: Hibernate Validator 4.2.0.Final
      Nov 30, 2011 5:13:52 PM org.glassfish.config.support.DefaultConfigUpgrade postConstruct
      INFO: Existing default-config detected during upgrade. No need to create default-config.
      Nov 30, 2011 5:13:53 PM com.sun.enterprise.security.admin.cli.SecureAdminConfigUpgrade postConstruct
      INFO: Added admin-listener network listeners to non-DAS configurations
      keytool error: java.lang.Exception: Key pair not generated, alias <glassfish-instance> already exists
      Nov 30, 2011 5:13:53 PM com.sun.enterprise.security.admin.cli.SecureAdminConfigUpgrade postConstruct
      SEVERE: Error upgrading config for secure DAS-to-instance admin traffic
      java.lang.RuntimeException: keytool error: java.lang.Exception: Key pair not generated, alias <glassfish-instance> already exists

      at com.sun.enterprise.security.admin.cli.SecureAdminConfigUpgrade.ensureKeyPairForInstanceAlias(SecureAdminConfigUpgrade.java:347)
      at com.sun.enterprise.security.admin.cli.SecureAdminConfigUpgrade.setupNewDefaultConfig(SecureAdminConfigUpgrade.java:192)
      at com.sun.enterprise.security.admin.cli.SecureAdminConfigUpgrade.postConstruct(SecureAdminConfigUpgrade.java:154)
      at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
      at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
      at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
      at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
      at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
      at org.glassfish.config.support.DomainXml.upgrade(DomainXml.java:166)
      at org.glassfish.config.support.DomainXml.run(DomainXml.java:120)
      at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:176)
      at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:158)
      at com.sun.enterprise.module.bootstrap.Main.createHabitat(Main.java:425)
      at org.jvnet.hk2.osgiadapter.HK2Main.createHabitat(HK2Main.java:96)
      at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:89)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
      [#|2011-11-30T17:13:53.720-0800|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2-b12 (build 12)|#]

      If the same steps are done with GF 3.1.1 Update, the SEVERE error message is not displayed.

        Activity

        Hide
        Alex Pineda added a comment -

        The SEVERE error is also seen on GF3.1.1 updated systems. The error is not displayed on a GF3.0.1 system.

        Show
        Alex Pineda added a comment - The SEVERE error is also seen on GF3.1.1 updated systems. The error is not displayed on a GF3.0.1 system.
        Hide
        Alex Pineda added a comment -

        Re-assigned bug to Tom Mueller for review and comment.

        Show
        Alex Pineda added a comment - Re-assigned bug to Tom Mueller for review and comment.
        Hide
        Tom Mueller added a comment -

        Assigning to Tim. Looks like a secure-admin upgrade problem.

        Show
        Tom Mueller added a comment - Assigning to Tim. Looks like a secure-admin upgrade problem.
        Hide
        Tim Quinn added a comment -

        Fixes checked in.

        3.1.2 branch: 51452
        trunk: 51453

        Project: glassfish
        Repository: svn
        Revision: 51452
        Author: tjquinn
        Date: 2011-12-11 13:53:06 UTC
        Link:

        Log Message:
        ------------
        Fix for 17871

        The logic which upgrades the secure admin configuration incorrectly assumed that the glassfish-instance self-signed cert could not already be present in the keystore and truststore and went ahead and tried to add it to both. In fact the key pair will be there starting with 3.1, so "asadmin start-domain --upgrade" would log error messages.

        These changes bypass the addition of the key pair if glassfish-instance is already present.

        Revisions:
        ----------
        51452

        Modified Paths:
        ---------------
        branches/3.1.2/security/core/src/main/java/com/sun/enterprise/security/admin/cli/SecureAdminConfigUpgrade.java

        Show
        Tim Quinn added a comment - Fixes checked in. 3.1.2 branch: 51452 trunk: 51453 Project: glassfish Repository: svn Revision: 51452 Author: tjquinn Date: 2011-12-11 13:53:06 UTC Link: Log Message: ------------ Fix for 17871 The logic which upgrades the secure admin configuration incorrectly assumed that the glassfish-instance self-signed cert could not already be present in the keystore and truststore and went ahead and tried to add it to both. In fact the key pair will be there starting with 3.1, so "asadmin start-domain --upgrade" would log error messages. These changes bypass the addition of the key pair if glassfish-instance is already present. Revisions: ---------- 51452 Modified Paths: --------------- branches/3.1.2/security/core/src/main/java/com/sun/enterprise/security/admin/cli/SecureAdminConfigUpgrade.java
        Hide
        Alex Pineda added a comment -

        Verified fix in build 15. The error is not seen anymore.

        Show
        Alex Pineda added a comment - Verified fix in build 15. The error is not seen anymore.

          People

          • Assignee:
            Tim Quinn
            Reporter:
            Alex Pineda
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: