My Oracle Support Banner

WebLogic Server JMS Migratable Target's Post and Pre Migration Script Fails to Run (Doc ID 1386231.1)

Last updated on DECEMBER 11, 2017

Applies to:

Oracle WebLogic Server - Version 10.3.3 and later
Information in this document applies to any platform.
***Checked for relevance on 13-Jan-2014***

Symptoms

ServiceMigration is failing because pre- and post- scripts fail to execute when the path for it is given from the console. To replicate this problem, follow these instructions:

  1. Create a domain with Administration Server and 2 managed servers (MS1 and MS2).
  2. Create a cluster and add the two managed servers created in step 1.
  3. Create a Machine and associate the 3 previously created servers to it.
  4. Start Admin Server
  5. Login into Administration console and navigate to the following location: Environment -> Clusters -> ClusterName -> Migration.
  6. Locate the dropdown Migration Basis and change its value to Consensus.
  7. Save changes.
  8. Navigate to the following location to create a JMS Server, targeted to MS1: Environment -> Services -> Messaging -> JMS Servers.
  9. Create a new JMS Server by clicking on new.
    1. Create a File store and target the File store to the Migratable target (MS1). This will request a physical path where the filestore will be stored.
    2. Once the File Store gets created, select the newly created filestore as the Persistent Store for the JMS server. Later, select from the drop down, the MS1 (migratable) option as target for the newly created JMS Server.
    3. Click on finish to finalize the JMS Server creation.
  10. Navigate to Environment -> MigratableTargets.
  11. Select the migratable target MS1 and navigate to tab Configuration -> General
    IMPORTANT:
    If you choose Database in step 6, you need to have 'Database' configured at your end. If this is not in place, an exception like the one below will be thrown:

    An attempt was made to set the migration policy of Migratable target ms1 (migratable) to non-manual. Before automatic migration of any kind can be used, the MigrationBasis must be set in the ClusterMBean. If database is chosen, then DataSourceForAutomaticMigration must be set as well.
  12. Navigate to Environment -> MigratableTargets -> ManagedServer1 (migratableTarget) ->Configuration -> Migration. Select:
    1. Service Migration Policy: Auto-Migrate-Exactly-Once Services
    2. User-Preferred Server: MS1
    3. Constrained Candidate Servers: Select MS1 and MS2
    4. Pre-Migration Script Path: preScript.py
    5. Post-Migration Script Path: postScript.py
    6. Click on Save and activate changes
  13. The changes done require a restart on AdminServer, Managed Server MS1 and MS2. Restart both the managed servers through node manager.
  14. Shutdown managedserver1. Migration should happen successfully.

At this point, sever migration should happen successfully. However it does not. In the MS1 logs, when the server is started initially, the server goes to RUNNING mode and starts logging the following message:

####<Nov 3, 2011 9:09:49 PM IST> <Error> <NodeManager> <akeelar-lap> <MS1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1320334789094> <BEA-300033> <Could not execute command "runScript" on the node manager. Reason: "Error while executing script".>
####<Nov 3, 2011 9:09:49 PM IST> <Error> <Cluster> <akeelar-lap> <MS1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1320334789094> <BEA-000178> <Failed to execute preScript.py because of weblogic.nodemanager.NMException: Error while executing script.
weblogic.nodemanager.NMException: Error while executing script
  at weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClient.java:301)
  at weblogic.nodemanager.client.NMServerClient.executeScript(NMServerClient.java:183)
  at weblogic.nodemanager.client.NMClient.execScript(NMClient.java:191)
  at weblogic.nodemanager.mbean.NodeManagerRuntime.runScript(NodeManagerRuntime.java:592)
  at weblogic.cluster.migration.ScriptExecutor.runNMScript(ScriptExecutor.java:50)
  at weblogic.cluster.migration.ScriptExecutor.runNMScript(ScriptExecutor.java:27)
  at weblogic.cluster.migration.MigratableGroup.activate(MigratableGroup.java:332)
  at weblogic.cluster.singleton.SingletonServicesManager.activateService(SingletonServicesManager.java:195)
  at weblogic.cluster.singleton.SingletonMonitor.migrate(SingletonMonitor.java:657)
  at weblogic.cluster.singleton.SingletonMonitor.access$1000(SingletonMonitor.java:57)
  at weblogic.cluster.singleton.SingletonMonitor$1.run(SingletonMonitor.java:438)
  at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
>

The scripts are placed in $ORACLE_HOME/user_projects/domains/ServiceMigration/bin/service_migration. When preScript.py or postScript.py are specified in the console, the scripts fail to run and the service migration fails. However, the same script works as expected when run as java weblogic.WLST preScript.py.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.