Oracle database's control file can't be gotten via FTP when the db instance is up and runing.

Solution Verified - Updated -

Issue

  • We run Oracle database on our RHEL server.
SQL> select status, instance_name from v$instance;

STATUS       INSTANCE_NAME
------------ ----------------
OPEN         ora11gr2

SQL> sho parameter control_files

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
control_files                string  /opt/oracle/app/oradata/ora11g
                         r2/control01.ctl, /opt/oracle/
                         app/flash_recovery_area/ora11g
                         r2/control02.ctl
  • When we try to get Oracle database's control file via FTP, it timeouts and fails if the database instance is up and running.
ftp> cd /tmp/work-fcntl
250 Directory successfully changed.

ftp> get file
227 Entering Passive Mode (10,64,217,75,68,122).
421 Timeout.
  • It looks ftp is trying to acquire read lock with F_RDLCK and waiting with F_SETLKW.
    Strace:
[...]
15:57:32.921257 open("control01.ctl", O_RDONLY|O_NONBLOCK) = 4 <0.000012>
15:57:32.921296 fcntl(4, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = ? ERESTARTSYS (To be restarted) <300.000031>
16:02:32.922601 --- SIGALRM (Alarm clock) @ 0 (0) ---
16:02:32.922700 alarm(1)                = 0 <0.000007>
16:02:32.922732 rt_sigreturn(0x1)       = -1 EINTR (Interrupted system call) <0.000006>
16:02:32.922762 alarm(0)                = 1 <0.000005>
16:02:32.922795 shutdown(0, 0 /* receive */) = 0 <0.000096>
16:02:32.922919 fcntl(0, F_GETFL)       = 0x2 (flags O_RDWR) <0.000006>
16:02:32.922942 fcntl(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000005>
16:02:32.922966 write(0, "421 Timeout.\r\n", 14) = 14 <0.000074>
16:02:32.923063 fcntl(0, F_GETFL)       = 0x802 (flags O_RDWR|O_NONBLOCK) <0.000005>
16:02:32.923085 fcntl(0, F_SETFL, O_RDWR) = 0 <0.000005>
16:02:32.923104 shutdown(0, 2 /* send and receive */) = 0 <0.000060>
16:02:32.923196 exit_group(0)           = ?
Process 22638 detached
[...]
  • Why does this happen? How do we reproduce the same issue?

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Oracle Database

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content