This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 468153 - Satellite-5.3.0-RHEL4-re20081022.0 installation: Could not connect to the database
Satellite-5.3.0-RHEL4-re20081022.0 installation: Could not connect to the dat...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
530
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Mráka
Sayli Karmarkar
:
Depends On: 502958
Blocks: 456985
  Show dependency treegraph
 
Reported: 2008-10-23 05:29 EDT by Milan Zazrivec
Modified: 2009-09-10 16:29 EDT (History)
5 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 16:29:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Zazrivec 2008-10-23 05:29:54 EDT
Description of problem:
Satellite-5.3.0-RHEL4-re20081022.0 s390x installation:
# ./install.pl --disconnected --answer-file=/root/answers.txt
...
** Database: Installation complete.
** Database: Setting up database connection.
Could not connect to the database.  Your connection information may be
incorrect.  Error: DBI connect('rhnsat','rhnsat',...) failed: ORA-01034:
ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory (DBD ERROR: OCISessionBegin) at
/usr/lib/perl5/vendor_perl/5.8.5/Spacewalk/Setup.pm line 1102

Obviously database server is unable to start:
# /sbin/runuser -l oracle -c '/usr/bin/db-control start'
Starting database... Filehandle GEN0 opened only for output at /usr/lib/perl5/site_perl/5.8.5/Dobby/DB.pm line 308.
done.

Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL4-re20081022.0 + EmbeddedDB / s390x
spacewalk-web-0.3.2-1.el4
Comment 1 Milan Zazrivec 2008-10-23 07:32:59 EDT
Downgrading to spacewalk-dobby-0.3.1-2.el4 helped (i.e. I was able to start
rhn-database without any errors ...)
Comment 3 Clifford Perry 2008-10-24 13:34:08 EDT
--> Processing Dependency: stringtree-json for package: spacewalk-java
--> Finished Dependency Resolution
Error: Missing Dependency: stringtree-json is needed by package spacewalk-java
Comment 4 Dennis Gilmore 2008-10-24 13:38:01 EDT
cvs diff -u
cvs diff: Diffing .
Index: comps-rhel4-rhnsat53.xml
===================================================================
RCS file: /cvs/devel/comps/comps-rhel4-rhnsat53.xml,v
retrieving revision 1.13
diff -u -r1.13 comps-rhel4-rhnsat53.xml
--- comps-rhel4-rhnsat53.xml    22 Oct 2008 13:41:15 -0000      1.13
+++ comps-rhel4-rhnsat53.xml    24 Oct 2008 17:37:00 -0000
@@ -269,6 +269,7 @@
        <packagereq type="default">SatConfig-generator</packagereq>
        <packagereq type="default">SatConfig-installer</packagereq>
        <packagereq type="default">SatConfig-spread</packagereq>
+       <packagereq type="default">stringtree-json</packagereq>
     </packagelist>
   </group>
 </comps>
Index: comps-rhel5-rhnsat53.xml
===================================================================
RCS file: /cvs/devel/comps/comps-rhel5-rhnsat53.xml,v
retrieving revision 1.14
diff -u -r1.14 comps-rhel5-rhnsat53.xml
--- comps-rhel5-rhnsat53.xml    22 Oct 2008 13:45:11 -0000      1.14
+++ comps-rhel5-rhnsat53.xml    24 Oct 2008 17:37:00 -0000
@@ -206,6 +206,7 @@
        <packagereq type="default">SatConfig-generator</packagereq>
        <packagereq type="default">SatConfig-installer</packagereq>
        <packagereq type="default">SatConfig-spread</packagereq>
+       <packagereq type="default">stringtree-json</packagereq>
     </packagelist>
   </group>
 </comps>
cvs diff: Diffing 6.2
cvs diff: Diffing po
Comment 5 Clifford Perry 2008-10-24 15:10:41 EDT
Satellite-5.3.0-RHEL5-re20081024.1-i386-embedded-oracle.iso 

installs successfully for me. Monitoring has issues, but that was not my main goal here for this ISO. I plan to test the i386 RHEL 4 ISO version as well tonight. I plan to send out email to satellite-devel and satellite-qa lists if these two ISO's look good. I do not have capacity to pre-test ALL arch ISO's. 

Cliff
Comment 6 Clifford Perry 2008-10-24 15:31:13 EDT
Satellite-5.3.0-RHEL4-re20081024.1-i386-embedded-oracle.iso   

Package installation completed without errors. 

Created RHEL 4 Guest on test13-64 with 22 Gig space 
 - gave it 2 gig RAM and 1 gig SWAP
Edited the /etc/sysconfig/rhn/up2date to disable GPG
Registered the system to RHN Hosted
Used Sat 5.3 Cert - redhat-internal-devel.cert
mounted ISO and ran

./install.pl --disconnected

So far setting up DB... expect though for the installation to complete.
Comment 7 Milan Zazrivec 2008-10-25 06:17:21 EDT
I'm seeing the same error on s390x / rhel4  with the latest compose:

# /sbin/runuser -l oracle -c '/usr/bin/db-control start'
Starting database... Filehandle GEN0 opened only for output at 
/usr/lib/perl5/site_perl/5.8.5/Dobby/DB.pm line 308.
done.
Comment 8 Clifford Perry 2008-10-25 09:04:42 EDT
yes - same here. Code change made by Michael recently works fine for RHEL 5, but RHEL 4's perl seems not like the code change. I was looking last night, but this stuff is new to me, so was not getting very far. 

Michael or Milan, my RHEL 4 system is IP:

10.10.77.142

normal root login, if you care to try to test/fix on a RHEL 4 system. 

-bash-3.00$ db-control start
Starting database... Filehandle GEN0 opened only for output at /usr/lib/perl5/site_perl/5.8.5/Dobby/DB.pm line 308.
done.
-bash-3.00$ 

Line 308 is:

      sysread $rds->[0], $buffer, 1024;

Diff to 0.3.1-2 shows:

--- 1/usr/lib/perl5/site_perl/5.8.5/Dobby/DB.pm 2008-10-24 22:30:35.000000000 +0200
+++ 3/usr/lib/perl5/site_perl/5.8.5/Dobby/DB.pm 2008-10-24 22:31:17.000000000 +0200
@@ -19,9 +19,11 @@
 use PXT::Config;
 use Dobby::Log;
 
+use IO::Select ();
+use IPC::Open2 ();
+
 use Carp qw/carp croak/;
 
-use File::Temp qw/tempfile/;
 use File::Spec::Functions;
 use IO::Handle;
 
@@ -288,30 +290,42 @@
 
   $ENV{ORACLE_SID} = $self->config->get("sid");
   $ENV{ORACLE_HOME} = $self->config->get("oracle_home");
-  my ($wr, $tmpfile) = tempfile(DIR => "/tmp", SUFFIX => '.sql');
-
-  $wr->print("CONNECT / AS SYSDBA\n");
-
-  for my $command (@commands) {
-    Dobby::Log->log("    sent: $command");
-    $wr->print("$command\n");
-  }
-
-  $wr->print("EXIT\n");
-  close $wr;
 
   my $sqlplus = catfile($self->config->get("oracle_home"), 'bin', 'sqlplus');
-  my $pid = open(RD, join(" ", $sqlplus, '-S', '/nolog', '@' . $tmpfile, '|'));
-
-  while (<RD>) {
-    Dobby::Log->log("    read: $_");
+  my($chld_out, $chld_in);
+  my $pid = IPC::Open2::open2($chld_out, $chld_in, $sqlplus, '-S', '/nolog');
+  my $s = IO::Select->new($chld_out, $chld_in);
+  $chld_in->print("CONNECT / AS SYSDBA\n");
+  while ($s->handles and my ($rds, $wrs, $errs) = IO::Select->select($s, $s, $s)) {
+    if (defined $errs and @$errs) {
+      for my $e (@$errs) {
+        $s->remove($e);
+        $e->close;
+      }
+    }
+    elsif (defined $rds and @$rds) {
+      my $buffer = '';
+      sysread $rds->[0], $buffer, 1024;
+      if (length($buffer) == 0) {
+        $s->remove($rds->[0]);
+      } else {
+        Dobby::Log->log("    read: $buffer");
+      }
+    }
+    elsif (defined $wrs and @$wrs) {
+      if (@commands) {
+        my $command = shift @commands;
+        Dobby::Log->log("    sent: $command");
+        $wrs->[0]->print("$command\n");
+      } else {
+        $wrs->[0]->print("EXIT\n");
+        $s->remove($wrs->[0]);
+        $wrs->[0]->close;
+      }
+    }
   }
 
-  close RD;
-
   Dobby::Log->log("Completed sqlplus conversation");
-
-  unlink $tmpfile;
 }
 
 sub connect {
Comment 9 Michael Mráka 2008-10-29 09:57:20 EDT
Fixed in git repo

commit 1547f587d39d3fd96f658e78ec0abbeb2c116d94
    468153 - don't mix read and write fds
Comment 10 Michael Mráka 2008-10-29 10:33:48 EDT
Packages spacewalk-dobby-0.3.4-1*.
Comment 11 Sayli Karmarkar 2009-06-15 11:19:09 EDT
verified. No errors in installation.
Comment 12 John Matthews 2009-08-13 10:30:14 EDT
Move to RELEASE_PENDING

We've installed multiple versions of ISO 7/24 on RHEL4/5 and database connections are working.
Comment 13 Brandon Perkins 2009-09-10 16:29:36 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

Note You need to log in before you can comment on or make changes to this bug.