[Errno 2] No Such File Or Directory Error While Using sysupgrade --clean To Upgrade Installation To OAG (Doc ID 2068371.1)

Last updated on APRIL 25, 2016

Applies to:

Oracle API Gateway - Version 11.1.2 and later
Information in this document applies to any platform.


Using version of Oracle API Gateway

When attempting to upgrade an OAG installation to OAG using the steps outlined in the documentation (<Document:1931302.1> How To Upgrade An OAG Cluster Installation To Version), the following error occurs:

# ProductName=sysupgrade-control 7.4.0-2015-07-28 rev. 732a7d4 (Linux.x86_64)
# CurrentDate=...
# CurrentDateUTC=...
# TZ=...

 Tracing to directory: /u01/app/oracle/product/middleware/oag. filename: sysupgrade.log
 Going to move and backup the NEW groups directory and sysupgrade output directory (if they exist).
 Please shut down NEW node manager(s) and API Gateway(s) if they are running on any node.

 API Gateway System Upgrade
 System upgrade output directory is: /u01/app/oracle/product/middleware/oag.
 System upgrade log files are written to: /u01/app/oracle/product/middleware/oag.
 Upgrading from: 6.3.1 (-1) (--clean) to: 7.4.0 (7) (/u01/app/oracle/product/middleware/oag.
 This is a single node system.
 Trace level: INFO
 (enter ctrl-c to quit any time)

 Step 1/4 - Exporting data
 Installing export component to old system ...
 Installing 6.x specific scripts ...

 Exporting data from old system. This can take some time. Please wait...
 Unknown exception
 Exception from: sysupgrade. Description: Traceback (most recent call last):
  File "/u01/app/oracle/product/middleware/oag.", line 232, in wrap
  result = fn()
  File "/u01/app/oracle/product/middleware/oag.", line 60, in _Control__run
  while not self.__runState():
  File "/u01/app/oracle/product/middleware/oag.", line 60, in _Control__run
  while not self.__runState():
  File "/u01/app/oracle/product/middleware/oag.", line 244, in _Control__runState
  File "/u01/app/oracle/product/middleware/oag.", line 339, in _Control__exportFromOld
  exitStatus = execute(self.userInput.oldvdistdir, workingDir, args, credentials)
  File "/u01/app/oracle/product/middleware/oag.", line 222, in execute
  p = Popen(args, stdout=PIPE, stdin=PIPE, stderr=STDOUT, cwd=workingDir, env=newEnv)
  File "/u01/app/oracle/product/middleware/oag.", line 751, in __init__
  self._execute_child(args, executable, preexec_fn, close_fds,
  File "/u01/app/oracle/product/middleware/oag.", line 1249, in _execute_child
  raise OSError(errno.ENOENT, os.strerror(errno.ENOENT), cwd)
OSError: [Errno 2] No such file or directory: '/u01/app/oracle/product/middleware/oag.'


The issue can be reproduced with the following steps:

1. OAG is up and running (with a default installation).
2. Install OAG in a different location, separate from the location where the version is installed.
3. Start the upgrade script (sysupgrade --clean) as indicated in the documentation.
4. The error will be sent to the sysupgrade.log file.


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms