EzDevInfo.com

rhel5 interview questions

Top rhel5 frequently asked interview questions

Validating a yum repository for dependencies

I am trying to create a custom rhel5.5 repository for my usage and I am having a hard time validating if I have all the dependencies for every package in my repository.

What I would want to do is do a yum install in dry run on every package in my repository to see if all the dependencies are available.

Is there an easy way to do that?


EDIT I've found the answer. Download yum-utils

yum install yum-utils

and do a repoclosure

repoclosure

It will find all missing dependencies of the repositories that you have set in your /etc/yum.repo.d/*


Source: (StackOverflow)

In Python2.7, undefined symbol importing P4API

On RHEL5 (5.3) I've installed python27, python27-devel, setuptools, gcc44, gcc44-c++, and P4PythonInstaller. All seemingly installed just fine, with no reported errors.

However when I open Python2.7 and attempt to import P4 or P4API I receive the following error:

ImportError: /usr/lib64/python2.7/site-packages/P4API.so: undefined symbol: _ZNSo9_M_insertI1EERSoT_

That looks like a mangled name but it's not clear to me what the original name might be (other than just "insert"), or what library it might need.

I've tried running python with LD_DEBUG=libs and it seems to find all of the libraries it's looking for.

Any thoughts as to what might be going wrong? Google's not helping me much tonight.

Thanks in advance!

Update:

I attempted to build P4Python from source, using the Linux26x86_64 version of P4API, but I'm still receiving the same error.

Update 2:

When running ldd P4API.so on the generated library, I get the following:

librt.so.1 => /lib64/librt.so.1 (0x00002b09f166a000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00002b09f1873000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b09f1c36000)
libm.so.6 => /lib64/libm.so.6 (0x00002b09f1f37000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b09f21ba000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b09f23c8000)
libc.so.6 => /lib64/libc.so.6 (0x00002b09f25e5000)
/lib64/ld-linux-x86-64.so.2 (0x00002b09f10c0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b09f293d000)
libutil.so.1 => /lib64/libutil.so.1 (0x00002b09f2b41000) 

And this is the compiler output:

API Release 2012.1
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying P4.py -> build/lib.linux-x86_64-2.7
running build_ext
building 'P4API' extension
creating build/temp.linux-x86_64-2.7
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c P4API.cpp -o build/temp.linux-x86_64-2.7/P4API.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c PythonClientAPI.cpp -o build/temp.linux-x86_64-2.7/PythonClientAPI.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c PythonClientUser.cpp -o build/temp.linux-x86_64-2.7/PythonClientUser.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c SpecMgr.cpp -o build/temp.linux-x86_64-2.7/SpecMgr.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c P4Result.cpp -o build/temp.linux-x86_64-2.7/P4Result.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c PythonMergeData.cpp -o build/temp.linux-x86_64-2.7/PythonMergeData.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c P4MapMaker.cpp -o build/temp.linux-x86_64-2.7/P4MapMaker.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c PythonSpecData.cpp -o build/temp.linux-x86_64-2.7/PythonSpecData.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c PythonMessage.cpp -o build/temp.linux-x86_64-2.7/PythonMessage.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
gcc44 -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -I/usr/include/expat2 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DID_OS="LINUX26X86_64" -DID_REL="2012.1" -DID_PATCH="511074" -DID_API="2012.1/442152" -DID_Y="2012" -DID_M="08" -DID_D="15" -I/home/bbbrooks/p4python_test/p4api-2012.1.442152 -I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4 -I/usr/include/python2.7 -c PythonActionMergeData.cpp -o build/temp.linux-x86_64-2.7/PythonActionMergeData.o -DOS_LINUX -DOS_LINUX26 -DOS_LINUXX86_64 -DOS_LINUX26X86_64
c++ -pthread -shared -L/usr/kerberos/lib64 -L/usr/lib64/expat2 build/temp.linux-x86_64-2.7/P4API.o build/temp.linux-x86_64-2.7/PythonClientAPI.o build/temp.linux-x86_64-2.7/PythonClientUser.o build/temp.linux-x86_64-2.7/SpecMgr.o build/temp.linux-x86_64-2.7/P4Result.o build/temp.linux-x86_64-2.7/PythonMergeData.o build/temp.linux-x86_64-2.7/P4MapMaker.o build/temp.linux-x86_64-2.7/PythonSpecData.o build/temp.linux-x86_64-2.7/PythonMessage.o build/temp.linux-x86_64-2.7/PythonActionMergeData.o -L/home/bbbrooks/p4python_test/p4api-2012.1.442152 -L/home/bbbrooks/p4python_test/p4api-2012.1.442152/lib -L/usr/lib64 -lclient -lrpc -lsupp -lp4sslstub -lrt -lpython2.7 -o build/lib.linux-x86_64-2.7/P4API.so

Update 3:

I still haven't found a solution to this problem, but I have found a work-around that I believe narrows down the cause.

I installed python2.6 and python26-devel, and was able to compile and use P4Python (both P4 and P4API) just fine. I'm guessing the root of the problem lies somewhere in python27-devel, but I just don't know enough about linux development to identify and fix the root cause.

I'll leave this question open as I'd still like to find a Python2.7 solution, and I'm willing to help track one down.


Source: (StackOverflow)

Advertisements

Default Path for WebLogic site root on RedHat 5

I am flying blind and could use some help. I am a long time windows web developer/web admin and I have inherited a WebLogic 11g/RHEL5 box. I'm trying to figure out where the website files might be.

My only contact with the box is through FTP, and I'm not sure the account I'm using has all of the permissions I need.

Googling led me to check /opt/bea, but there is no/bea folder under /opt. Another possibility was /var/local/WebLogic, but there was no /WebLogic folder.

Any help would be greatly appreciated.


Source: (StackOverflow)

Haproxy Bind Error

Hi there StackOverflow,

I seem to have an error with my haproxy, this is what I get when I try and run it

[ALERT] 208/051346 (5865) : Starting proxy ah1: cannot bind socket
[ALERT] 208/051346 (5865) : Starting proxy ah2: cannot bind socket

I'm running this for a TCP proxy.

This is my config:

#---------------------------------------------------------------------
# Example configuration for a possible web application.  See the
# full configuration options online.
#
#   http://haproxy.1wt.eu/download/1.3/doc/configuration.txt
#
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
    global
    log         127.0.0.1 local2 
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy
    group       haproxy
    daemon

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will 
# use if not designated in their block
#---------------------------------------------------------------------
defaults
    mode        tcp
    log         global
    option      dontlognull
    option      forwardfor
    option      redispatch
    timeout connect 10000 # default 10 second time out if a backend is not found
    timeout client 300000
    timeout server 300000
    maxconn     60000
    retries     3


listen ah1 207.254.9.41:30000
mode tcp
balance leastconn
server ah1_1 46.16.77.23:30000

listen ah2 207.254.9.41:30001
mode tcp
balance leastconn
server ah2_1 46.16.77.23:30001

We're running Red Hat Enterprise Linux 5 (x64)


Source: (StackOverflow)

Ruby on Rails Oracle DB connection

My main database is a local mysql database, however I would like to occasionally connect to an Oracle database directly in my applications code.

The oracle database is hosted on another RHEL server.

I was unsuccessfull tried to install the ruby-OCI8 gem (ERROR: Failed to build gem native extension.)

I am wondering whether the oracle database has to be local in order to use this gem, or if there are any better ways of achieving this.

gem install ruby-oci8

Building native extensions.  This could take a while...
ERROR:  Error installing ruby-oci8:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for load library path...
  LD_LIBRARY_PATH...
    checking /opt/instantclient... yes
  /opt/instantclient/libclntsh.so.11.1 looks like an instant client.
checking for cc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-instant-client
        --without-instant-client
./oraconf.rb:562:in `check_cc': RuntimeError (RuntimeError)
        from ./oraconf.rb:549:in `init'
        from ./oraconf.rb:1001:in `initialize'
        from ./oraconf.rb:343:in `new'
        from ./oraconf.rb:343:in `get'
        from extconf.rb:18
ng
---------------------------------------------------
Error Message:
  C compiler doesn't work correctly.
Backtrace:
  ./oraconf.rb:562:in `check_cc'
  ./oraconf.rb:549:in `init'
  ./oraconf.rb:1001:in `initialize'
  ./oraconf.rb:343:in `new'
  ./oraconf.rb:343:in `get'
  extconf.rb:18
---------------------------------------------------
See:
 * http://ruby-oci8.rubyforge.org/en/HowToInstall.html
 * http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html

I checked the mkmf.log file:

 "gcc -o conftest -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I.   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fs    tack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -fPIC conftest.c  -L. -L/usr/lib64 -L.      -rdynamic -Wl,-export-dynamic     -lruby-static  -lpthread -lrt -ldl -lcrypt -lm   -lc"
  /usr/bin/ld: skipping incompatible /usr/lib/libruby-static.a when searching for -lruby-static
  /usr/bin/ld: cannot find -lruby-static
  collect2: ld returned 1 exit status
  checked program was:
  /* begin */
  1: int main() { return 0; }
  8 /* end */

Source: (StackOverflow)

How To Uninstall And Then Install Java In RHEL 5 (Linux) I Am Getting Error? [closed]

Hi i need to install the latest version of java in mu RHEL 5 i successfully uninstall it from my os but when i try to install it again i am getting error i am pasting the whole thing i did with error

[root@localhost bin]# rpm -qa | grep jdk
jdk-1.5.0_14-fcs
[root@localhost bin]# rpm -e jdk-1.5.0_14-fcs
[root@localhost bin]# rpm -qa | grep jdk
[root@localhost bin]# yum install java
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating Red Hat repositories.
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.

Error Message:
    Service not enabled for system profile: "192.168.1.105"
Error Class Code: 31
Error Class Info: 
     This system does not have a valid entitlement for Red Hat Network.
     Please visit https://rhn.redhat.com/rhn/systems/SystemEntitlements.do
     or login at https://rhn.redhat.com, and from the "Your RHN" tab,
     select "Subscription Management" to enable RHN service for this system.
Explanation:
    Your organization does not have enough Management entitlements to register this
    system to Red Hat Network. Please notify your organization administrator of this error. 
    You should be able to register this system after your organization frees existing 
    or purchases additional entitlements. Additional entitlements may be purchased by your
    organization administrator by logging into Red Hat Network and visiting
    the 'Subscription Management' page in the 'Your RHN' section of RHN.

    A common cause of this error code is due to having mistakenly setup an
    Activation Key which is set as the universal default.  If an activation key is set
    on the account as a universal default, you can disable this key and retry to avoid
    requiring a Management entitlement.
file://var/cache/yum/rhel-i386-server-5/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/rhel-i386-server-5/repodata/repomd.xml'
Trying other mirror.
file://var/cache/yum/rhel-i386-server-vt-5/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/rhel-i386-server-vt-5/repodata/repomd.xml'
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk.i386 1:1.6.0.0-1.23.1.9.10.el5_7 set to be updated
--> Processing Dependency: tzdata-java for package: java-1.6.0-openjdk
--> Running transaction check
---> Package tzdata-java.i386 0:2011l-4.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch Version                       Repository          Size
================================================================================
Installing:
 java-1.6.0-openjdk i386 1:1.6.0.0-1.23.1.9.10.el5_7   rhel-i386-server-5  38 M
Installing for dependencies:
 tzdata-java        i386 2011l-4.el5                   rhel-i386-server-5 180 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 38 M
Is this ok [y/N]: y
Downloading Packages:


Error Downloading Packages:
  tzdata-java-2011l-4.el5.i386: failure: getPackage/tzdata-java-2011l-4.el5.i386.rpm from rhel-i386-server-5: [Errno 256] No more mirrors to try.
  1:java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7.i386: failure: getPackage/java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7.i386.rpm from rhel-i386-server-5: [Errno 256] No more mirrors to try.

How to install the latest version of java please help me out

Thanks in Advance


Source: (StackOverflow)

Mongo DB installation on RHEL 5.11 x64

I am trying to install MongoDB 3.0.0 on one of the sandbox which has RHEL linux 5.11 64bit

I was able to download all the packages using yum command mentioned in the official document here MongoDB Installation

I am trying to run following command as per the documentation

semanage port -a -t mongod_port_t -p tcp 27017

and it is giving me below error.

/usr/sbin/semanage port -a -t mongod_port_t -p tcp 27017
libsepol.context_from_record: type mongod_port_t is not defined
libsepol.context_from_record: could not create context structure
libsepol.port_from_record: could not create port structure for range 27017:27017 (tcp)
libsepol.sepol_port_modify: could not load port range 27017 - 27017 (tcp)
libsemanage.dbase_policydb_modify: could not modify record value
libsemanage.semanage_base_merge_components: could not merge local modifications into policy
/usr/sbin/semanage: Could not add port tcp/27017

I have root access on this sandbox but I am really clueless what this means. Can someone please help me installing MongoDB or if someone can share the alternative steps to successfully install MongoDB.


Source: (StackOverflow)

mod_rewrite seemingly broken with latest httpd upgrade

At our office, our security team has been running yum updates on our rhel5 servers. One of the affected packages is the httpd package. Before the update, we were successfully able to utilize mod_rewrite in apache to direct all traffic from accessing the directory alone to a file titled browse.php, but after the updates were ran, the rewrite rules mysteriously quit working. The version of httpd prior to the yum update was 2.2.3-45.el5, and after the update, it was 2.2.3-45.el5_6.1. The rewrite rule as displayed in the httpd.conf file reads (with substitutions of the directory and file names):

RewriteEngine on
RewriteRule ^/directory(?:/)?$ /directory/browse.php [R=permanent,L]

Now when we browse to the application via the url http://domain/directory, the page will not redirect, and will instead consume CPU until crashing the system (I've seen somewhere in the range of several dozen lingering processes), while going to the url: http://domain/directory/ (the difference being in the final /) will redirect the user to http://domain/directory/browse.php properly.

As tests, we are unable to replicate this on any other rhel5 servers. We've commented out the rewrite rules in the configuration, relying on an index.html file to handle the redirect in the tag to no avail. I've enabled and reviewed the server-status page on apache, the processes are stuck on the reply stage, and they are not getting logged in any apache logs (error, access, nothing). I've moved the code base into a separate directory and am able to redirect to it successfully without any rewrite rules when in another directory(relying on the aforementioned index.html file). I've recreated the problematic directory with a simple index.html file and it won't load. I've also been able to create an arbitrary directory in the document root for apache and placed a simple index.html file in it, which loads properly, it is only that specific directory that is proving problematic. We do sit behind a bluecoat proxy server, but I've eliminated that from the list of possibilities by replicating the issue when going directly to the server. We've rolled back the version of apache, and attempted to recreate this on other servers by doing partial updates to see if any specific package is causing it, unsuccessful in replicating the issue.

The following code is the contents of my httpd.conf file excluding the above rewrite lines:

ServerTokens ProductOnly
TraceEnable Off
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000


StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0

Listen 80
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
LoadModule php5_module        /usr/lib/httpd/modules/libphp5.so
AddType application/x-httpd-php .php
Include conf.d/*.conf
ExtendedStatus On
User apache
Group apache
ServerAdmin root@localhost
ServerName **OMITTED**
UseCanonicalName On
DocumentRoot "/var/www/html"

    Options FollowSymLinks
    AllowOverride None


    Options  FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all



DirectoryIndex browse.php index.html index.php
AccessFileName .htaccess

    Order allow,deny
    Deny from all

TypesConfig /etc/mime.types
DefaultType text/plain

    MIMEMagicFile conf/magic

HostnameLookups Off
ErrorLog logs/error_**OMITTED**_log
LogLevel warn
LogFormat "%h \"%{X-Forwarded-For}i\" \"%{X-Forwarded-Host}i\" %u %t \"%r\" \"%{Host}i\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_**OMITTED**_log  combined
ServerSignature On
Alias /icons/ "/var/www/icons/"

    Options  MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all


    DAVLockDB /var/lib/dav/lockdb

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/error/"


    
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    


BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from all


AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE text/html
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate_log deflate

FileETag none
ErrorDocument 404 /directory/404.html

Header set Expires "Thu, 15 Apr 2020 20:00:00 GMT"


Source: (StackOverflow)

Jython 2.5.3 and time.sleep

I'm developing a small in house alternative to Tripwire, so I've coded a small script to hash files in a JBoss EAP server, and store the path and the hash in a MySQL database.

Every day the script compares the hashes in the filesystem with those saved in the DB, so any change is logged and finally reported using JasperServer.

The script runs at night using cron, to avoid a large number of scripts quering the DB at the same time it uses time.sleep(RANDOM_NUMBER_OF_SECONDS) before doing the fun stuff, but sometimes time.sleep seems to sleep forever and the script ends without any error, I check the mail cron sends and no error is logged. Any help would be appreciated. I'm Using jython-standalone-2.5.3, IBM's JDK and RHEL 5.6 running inside VMWare.

I just found http://bugs.jython.org/issue1974 and a code comment seems to point that OS signals can cause this behavior, but not sure if this is my case.

If you want to see the code checkout at http://code.google.com/p/pysnapshot/

Luis GarcĂ­a Bustos.


Source: (StackOverflow)

RHEL5 Linux ODBC Issues

Am trying to move my compiled C code that connects to mssql database servers from using the datadirect odbc drivers to using the unixodbc driver manager (version 2.3.1)/ freetds drivers (version 0.91) which are already compiled for 64 bit and available.

Am able to successfully compile it on 64 bit RHEL5 Linux by linking in libodbc which has already been compiled. But I get the error net.c:350: tds_select: Assertion 'timeout_seconds >= 0' failed multiple times when I run the code and the database connection fails. The environment variables I set are ODBCINI, ODBCHOME and LDD_LIBRARY_PATH (which is set to the libraries in the unixodbc path).

The driver in the odbcinst file is set to the path where libtdsodbc.so is located.

Am I missing something here. The permissions on the odbc.ini, odbcinst.ini files appear to be fine.


Source: (StackOverflow)

File can't be found in a small fraction of submitted jobs

I'm trying to run a very large set of batch jobs on a RHEL5 cluster which uses a Lustre file system. I was getting a strange error with roughly 1% of the jobs: they could't find a text file they are all using for steering. A script that reproduces the error looks like this:

#!/usr/bin/env bash

#PBS -t 1-18792
#PBS -l mem=4gb,walltime=30:00
#PBS -l nodes=1:ppn=1
#PBS -q hep
#PBS -o output/fit/out.txt
#PBS -e output/fit/error.txt

cd $PBS_O_WORKDIR
mkdir -p output/fit
echo 'submitted from: ' $PBS_O_WORKDIR 

files=($(ls ./*.txt | sort)) # <-- NOTE THIS LINE

cat batch/fits/fit-paths.txt

For some small fraction of jobs, the error stream output would show:

cat: batch/fits/fit-paths.txt: No such file or directory

Weird enough, but it gets stranger.


When I change the files=($(ls ./*.txt | sort)) line to

files=($(ls batch/fits/*.txt | sort))

The jobs run without errors! Needless to say, this is far from satisfying: I'd rather not have my jobs depend on black magic (although black magic is better than no magic).

Any idea what's going on here?


Source: (StackOverflow)

Bulk insert in cassandra causing read timeout

Sadly I found a question very similar to mine, but with no real answer nohostavailableexception-while-bulk-loading-data-into-cassandra

I'm using Cassandra 2.0.8 installed on a RHEL 5 VM with 8 Cores and 8 GB of RAM. I am running it as a single node for now.

I am trying to initialize it by migrating data off my oracle database. So I have a program that selects from the oracle table and then inserts into cassandra (in a loop) Biggest table has 500,000 records.

During the operation my program keeps dying with read-timeout errors. I tried increasing all the time out values in cassandra.yaml but it doesn't help.

com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.DriverException: Timeout during read))
        at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:65)
        at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256)
        at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172)
        at com.datastax.driver.core.SessionManager.execute(SessionManager.java:92)
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.DriverException: Timeout during read))
        at com.datastax.driver.core.RequestHandler.sendRequest(RequestHandler.java:103)
        at com.datastax.driver.core.RequestHandler$1.run(RequestHandler.java:175)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

My cassandra.yaml timeout settings are

# How long the coordinator should wait for read operations to complete read_request_timeout_in_ms: 15000
# was 5000

# How long the coordinator should wait for seq or index scans to complete range_request_timeout_in_ms: 20000
# was 10000

# How long the coordinator should wait for writes to complete write_request_timeout_in_ms: 30000
# was 20000

# How long a coordinator should continue to retry a CAS operation
# that contends with other proposals for the same row cas_contention_timeout_in_ms: 1000

# How long the coordinator should wait for truncates to complete
# (This can be much longer, because unless auto_snapshot is disabled
# we need to flush first so we can snapshot before removing the data.) truncate_request_timeout_in_ms: 300000
# was 60000

# The default timeout for other, miscellaneous operations request_timeout_in_ms: 20000
# was 10000

Anyone know how to fix this issue? or a better way to migrate data from 1 place to another (note that some tables are not that simple to migrate, I need to do some extra queries before inserting)


Source: (StackOverflow)

Perl: V 5.8.8 : Can't locate auto/XML/LibXSLT/new.al on CentOS5/RHEL5

I am getting Can't locate auto/XML/LibXSLT/new.al error on my CentOS5 machine installed Perl 5.8.8

This issue is related with libxml2 and perl modules XML::LibXML, XML::LibXSLT. For both version in 1.70.

Upon settling both modules, further I am getting error for

Can't locate auto/XML/LibXSLT/new.al

which seems to be a autoload function of LibXSLT, But surprisingly I am not finding any file as new.al.

Here is the code snippet through which I am getting this error

use XML::LibXML;
use XML::LibXSLT;
my $parser = XML::LibXML->new;
my $xslt = XML::LibXSLT->new;

Any Help would be appreciated.


Source: (StackOverflow)

Logrotate Weekly on a specific day of the week?

So this is driving me crazy. I'm running logrotate on a weekly basis for a few different logs and it works as I expect. However, the log rotation occurs on Sunday, which coincides with the completion of some processing that logs to those directories which are to be rotated. In a nutshell, I would like to rotate these log files on Thursday, prior to this processing, and I would like to keep the "fix" within the logrotate configurations themselves (vice manually running logrotate --force, or placing this within the script).

I'm running RHEL5 with the following configurations:

cat /etc/logrotate.d/custom
/var/log/mpxx/mpxx_log {
  daily
  rotate 30
  compress
  missingok
  olddir /var/log/mpxx.old/
  create 644 user user
  dateext
}
/var/log/mpxx/repo.log /var/log/mpxx/stop_repo.log {
  weekly
  rotate 90
  compress
  missingok
  olddir /var/log/mpxx.old/
  create 644 user user
  dateext
}

cat /var/lib/logrotate.status
"/var/log/mpxx/repo.log" 2015-4-12
"/var/log/mpxx/stop_repo.log" 2015-4-12

I manually rotated the logs with logrotate --force /etc/logrotate.d/custom on Friday April 10th when I noticed the issue. Then, I manually edited the logrotate.status file to reflect the following:

"/var/log/mpxx/repo.log" 2015-4-9
"/var/log/mpxx/stop_repo.log" 2015-4-9

Unfortunately, my manual run of logrotate, and my edits to the status file did not keep logrotate from rotating the log files on April 12th, as noted previously.

How can I force logrotate to perform the rotation on a weekly basis, but on a specific day of the week? My searches and research haven't turned up much.

Thanks in advance!


Source: (StackOverflow)

Adding time stamps to memcached logging

Is it possible to add in time stamps to entries created by -v, -vv, or -vvv in memcached?

Currently my setup has -vv logging, and it's being written to file, but having a time stamp would be useful in case I need to go back.


Source: (StackOverflow)