14 Replies Latest reply: Oct 7, 2011 7:03 AM by EdStevens RSS

    Linux Error:111:Connection refused & Linux Error:29:Illegal seek

    755562
      I have installed the rpm pack oracle-xe-univ-10.2.0.1-1.0.i386.rpm in Red Hat Enterprise Linux. I was able to install the rpm pack and am able to initiat sqlplus on the server and even run sql queries.
      However i am facing the following issues:-
      1) While browsing http://127.0.0.1:8090/apex for accessing the database home page i am getting the error message "The connection was refused when connecting to http://127.0.0.1:8090/apex" (i have mentioned 8090 as the HTTP port during configuration and this is the URL which was listed after the configuration).
      2) I am unable to start the listerner service.

      Please help me to resolve the above issues.

      Following is the message while checking the listener status:-_

      LSNRCTL> status
      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
      TNS-12541: TNS:no listener
      TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
      Linux Error: 111: Connection refused
      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RHL-Research-001)(PORT=1521)))
      TNS-12541: TNS:no listener
      TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
      Linux Error: 111: Connection refused

      Following is the message while initiating a listener:-_

      LSNRCTL> status
      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
      TNS-12541: TNS:no listener
      TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
      Linux Error: 111: Connection refused
      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RHL-Research-001)(PORT=1521)))
      TNS-12541: TNS:no listener
      TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
      Linux Error: 111: Connection refused

      Following is the content of the listerner.ora file:-_

      [root@RHL-Research-001 admin]# cat listener.ora
      # listener.ora Network Configuration File:

      SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
      (PROGRAM = extproc)
      )
      )

      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      (ADDRESS = (PROTOCOL = TCP)(HOST = RHL-Research-001)(PORT = 1521))
      )
      )

      DEFAULT_SERVICE_LISTENER = (XE)


      Following is the content of /etc/hosts:-_

      [root@RHL-Research-001 admin]# cat /etc/hosts
      # Do not remove the following line, or various programs
      # that require network functionality will fail.
      127.0.0.1 RHL-Research-001 localhost.localdomain localhost
      [root@RHL-Research-001 admin]#

      Following is the pinging status:-_

      [root@RHL-Research-001 admin]# ping RHL-Research-001
      PING RHL-Research-001 (127.0.0.1) 56(84) bytes of data.
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=0 ttl=0 time=0.050 ms
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=1 ttl=0 time=0.049 ms
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=2 ttl=0 time=0.051 ms
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=3 ttl=0 time=0.052 ms
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=4 ttl=0 time=0.050 ms
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=5 ttl=0 time=0.046 ms
      64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=6 ttl=0 time=0.051 ms

      --- RHL-Research-001 ping statistics ---
      7 packets transmitted, 7 received, 0% packet loss, time 6016ms
      rtt min/avg/max/mdev = 0.046/0.049/0.052/0.009 ms, pipe 2

      Thanks,
      SKP
        • 1. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
          sb92075
          I am unable to start the listerner service.
          post results from following command

          env | sort

          Is any type of Operating System Virtualization installed on this system?
          • 2. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
            755562
            Thanks for the quick reply.

            Following is the output of env|sort:-

            [root@RHL-Research-001 admin]# env | sort
            BASH_ENV=/root/.bashrc
            _=/bin/env
            COLORTERM=
            DISPLAY=:0
            G_BROKEN_FILENAMES=1
            GDMSESSION=Default
            GS_LIB=/root/.kde/share/fonts
            GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
            HISTSIZE=1000
            HOME=/root
            HOSTNAME=RHL-Research-001
            INPUTRC=/etc/inputrc
            KDE_MULTIHEAD=false
            KONSOLE_DCOP=DCOPRef(konsole-16837,konsole)
            KONSOLE_DCOP_SESSION=DCOPRef(konsole-16837,session-1)
            LANG=en_US.UTF-8
            LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
            LESSOPEN=|/usr/bin/lesspipe.sh %s
            LOGNAME=root
            LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
            MAIL=/var/spool/mail/root
            NLS_LANG=AMERICAN_AMERICA.AL32UTF8
            OLDPWD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network
            ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
            ORACLE_SID=XE
            PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
            PWD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
            SESSION_MANAGER=local/RHL-Research-001:/tmp/.ICE-unix/9844
            SHELL=/bin/bash
            SHLVL=3
            SSH_AGENT_PID=9779
            SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
            SSH_AUTH_SOCK=/tmp/ssh-cvec9699/agent.9699
            TERM=xterm
            USERNAME=root
            USER=root
            XAUTHORITY=/root/.Xauthority
            XMODIFIERS=@im=none


            Please let me know how the issues can be fixed.

            Thanks,
            Seemanta
            • 3. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
              sb92075
              Is any type of Operating System Virtualization installed on this system?
              Linux Error: 111: Connection refused
              Indicates some sort of OS/Networking misconfiguration

              When all else fails Read The Fine Manual

              http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25144/toc.htm

              By the way, the manual above clearly states that you should NOT be logged onto the OS as user "root"!

              Edited by: sb92075 on Feb 22, 2010 6:39 PM
              • 4. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                755562
                This is a normal dedicated linux installation with no Operating System Virtualization. The OS user "Oracle" is the owner of the oracle software & while connecting to oracle i am doing the SU to change the user context.

                Yes i have refered to the same document hosted at http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25144/toc.htm and have strictly followed steps 4.1 & 4.3 (wherein it says to login with root permissions and install the software). However after doing the same i am unable to connect to http://127.0.0.1:8090/apex/ and further getting errors while starting the listener service.
                • 5. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                  sb92075
                  The listener must be started by the "oracle" user

                  do the following & post the results

                  env | sort
                  lsnrctl start
                  • 6. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                    755562
                    Following is the output of the commands env|sort followed by lnsrctl start:-

                    bash-2.05b$ env|sort
                    BASH_ENV=/root/.bashrc
                    _=/bin/env
                    COLORTERM=
                    DISPLAY=:0
                    G_BROKEN_FILENAMES=1
                    GDMSESSION=Default
                    GS_LIB=/root/.kde/share/fonts
                    GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
                    HISTSIZE=1000
                    HOME=/usr/lib/oracle/xe
                    HOSTNAME=RHL-Research-001
                    INPUTRC=/etc/inputrc
                    KDE_MULTIHEAD=false
                    KONSOLE_DCOP=DCOPRef(konsole-9868,konsole)
                    KONSOLE_DCOP_SESSION=DCOPRef(konsole-9868,session-1)
                    LANG=en_US.UTF-8
                    LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
                    LESSOPEN=|/usr/bin/lesspipe.sh %s
                    LOGNAME=oracle
                    LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
                    MAIL=/var/spool/mail/root
                    NLS_LANG=AMERICAN_AMERICA.AL32UTF8
                    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                    ORACLE_SID=XE
                    PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
                    PWD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
                    SESSION_MANAGER=local/RHL-Research-001:/tmp/.ICE-unix/9844
                    SHELL=/bin/bash
                    SHLVL=4
                    SSH_AGENT_PID=9779
                    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
                    SSH_AUTH_SOCK=/tmp/ssh-cvec9699/agent.9699
                    TERM=xterm
                    USERNAME=root
                    USER=oracle
                    XAUTHORITY=/root/.Xauthority
                    XMODIFIERS=@im=none
                    bash-2.05b$ lsnrctl start

                    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 23-FEB-2010 08:25:33

                    Copyright (c) 1991, 2005, Oracle. All rights reserved.

                    Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait...

                    TNS-12537: TNS:connection closed
                    TNS-12560: TNS:protocol adapter error
                    TNS-00507: Connection closed
                    Linux Error: 29: Illegal seek
                    • 7. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                      sb92075

                      The listener must be started by the "oracle" user
                      The listener must be started by the "oracle" user
                      The listener must be started by the "oracle" user
                      The listener must be started by the "oracle" user


                      NOT root!

                      do the following & post the results

                      env | sort
                      lsnrctl start
                      • 8. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                        755562
                        Still i am getting the same error.

                        I logged-in as oracle and ran the commands env|sort followed by lsnrctl start. Following is the output.

                        bash-2.05b$ env|sort
                        COLORTERM=
                        DISPLAY=:0
                        G_BROKEN_FILENAMES=1
                        GDMSESSION=Default
                        GS_LIB=/usr/lib/oracle/xe/.kde/share/fonts
                        GTK_RC_FILES=/etc/gtk/gtkrc:/usr/lib/oracle/xe/.gtkrc:/usr/lib/oracle/xe/.gtkrc-kde
                        HISTSIZE=1000
                        HOME=/usr/lib/oracle/xe
                        HOSTNAME=RHL-Research-001
                        INPUTRC=/etc/inputrc
                        KDE_MULTIHEAD=false
                        KONSOLE_DCOP=DCOPRef(konsole-17943,konsole)
                        KONSOLE_DCOP_SESSION=DCOPRef(konsole-17943,session-1)
                        LANG=en_US.UTF-8
                        LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
                        LESSOPEN=|/usr/bin/lesspipe.sh %s
                        LOGNAME=oracle
                        LS_COLORS=
                        MAIL=/var/spool/mail/oracle
                        NLS_LANG=AMERICAN_AMERICA.AL32UTF8
                        ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                        ORACLE_SID=XE
                        PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
                        PWD=/usr/lib/oracle/xe
                        SESSION_MANAGER=local/RHL-Research-001:/tmp/.ICE-unix/17894
                        SHELL=/bin/bash
                        SHLVL=3
                        SSH_AGENT_PID=17835
                        SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
                        SSH_AUTH_SOCK=/tmp/ssh-lrb17782/agent.17782
                        TERM=xterm
                        USERNAME=oracle
                        USER=oracle
                        _=/usr/bin/env
                        XAUTHORITY=/usr/lib/oracle/xe/.Xauthority
                        XMODIFIERS=@im=none
                        bash-2.05b$ lsnrctl start

                        LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 23-FEB-2010 08:52:40

                        Copyright (c) 1991, 2005, Oracle. All rights reserved.

                        Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait...

                        TNS-12537: TNS:connection closed
                        TNS-12560: TNS:protocol adapter error
                        TNS-00507: Connection closed
                        Linux Error: 29: Illegal seek
                        • 9. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                          sb92075
                          cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
                          mv listener.ora listener.ora.sav
                          lsnrctl start


                          CUT lines above & PASTE into terminal window owned by user "oracle"

                          CUT commands & results then PASTE back here
                          • 10. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                            755562
                            I had to re-install the linux server and install the oracle rpm again ... resulting in delayed reply.

                            Currently still i am unable to access http://127.0.0.1:8090/apex. The following error message is being displayed
                            "The connection was refused when attempting to contact http://127.0.0.1:8090/apex"

                            However now the listener service has started successfully.

                            Following is the output of the command lsnrctl status:-

                            bash-2.05b$ lsnrctl status

                            LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 24-FEB-2010 17:55:02

                            Copyright (c) 1991, 2005, Oracle. All rights reserved.

                            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
                            STATUS of the LISTENER
                            ------------------------
                            Alias LISTENER
                            Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
                            Start Date 24-FEB-2010 17:35:26
                            Uptime 0 days 0 hr. 19 min. 36 sec
                            Trace Level off
                            Security ON: Local OS Authentication
                            SNMP OFF
                            Default Service XE
                            Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
                            Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
                            Listening Endpoints Summary...
                            (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
                            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=selinux)(PORT=1521)))
                            Services Summary...
                            Service "PLSExtProc" has 1 instance(s).
                            Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
                            Service "XE" has 1 instance(s).
                            Instance "XE", status BLOCKED, has 1 handler(s) for this service...
                            Service "XE_XPT" has 1 instance(s).
                            Instance "XE", status BLOCKED, has 1 handler(s) for this service...
                            The command completed successfully

                            Following is the output of the command env|sort:-

                            bash-2.05b$ env|sort
                            COLORTERM=gnome-terminal
                            DISPLAY=:0.0
                            G_BROKEN_FILENAMES=1
                            GDMSESSION=Default
                            GNOME_DESKTOP_SESSION_ID=Default
                            GTK_RC_FILES=/etc/gtk/gtkrc:/usr/lib/oracle/xe/.gtkrc-1.2-gnome2
                            HISTSIZE=1000
                            HOME=/usr/lib/oracle/xe
                            HOSTNAME=selinux
                            INPUTRC=/etc/inputrc
                            LANG=en_US.UTF-8
                            LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
                            LESSOPEN=|/usr/bin/lesspipe.sh %s
                            LOGNAME=oracle
                            LS_COLORS=
                            MAIL=/var/spool/mail/oracle
                            NLS_LANG=AMERICAN_AMERICA.AL32UTF8
                            ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                            ORACLE_SID=XE
                            PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/lib/oracle/xe/bin
                            PWD=/usr/lib/oracle/xe
                            SESSION_MANAGER=local/selinux:/tmp/.ICE-unix/4320
                            SHELL=/bin/bash
                            SHLVL=2
                            SSH_AGENT_PID=4365
                            SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
                            SSH_AUTH_SOCK=/tmp/ssh-Jsbl4320/agent.4320
                            TERM=xterm
                            USER=oracle
                            _=/usr/bin/env
                            WINDOWID=27268667
                            XAUTHORITY=/usr/lib/oracle/xe/.Xauthority
                            XMODIFIERS=@im=none
                            bash-2.05b$


                            Please let me know how to resolve this issue of accessing the database home page at http://127.0.0.1:8090/apex.

                            Thanks,
                            SKP
                            • 11. Re: Linux Error:111:Connection refused
                              792407
                              Hi I had the same problem and I moved the listener.ora to listener.ora.sav and tried starting the listener and the listener started succesfully. Here is the output
                              **********************************************************************************************************************************************8
                              LSNRCTL> start
                              Starting /opt/oracle/product/11gr2/db/bin/tnslsnr: please wait...

                              TNSLSNR for Linux: Version 11.2.0.1.0 - Production
                              Log messages written to /opt/oracle/diag/tnslsnr/itspdw01/listener/alert/log.xml
                              Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=itspdw01)(PORT=1521)))

                              Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
                              STATUS of the LISTENER
                              ------------------------
                              Alias LISTENER
                              Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
                              Start Date 18-AUG-2010 21:09:17
                              Uptime 0 days 0 hr. 0 min. 0 sec
                              Trace Level off
                              Security ON: Local OS Authentication
                              SNMP OFF
                              Listener Log File /opt/oracle/diag/tnslsnr/itspdw01/listener/alert/log.xml
                              Listening Endpoints Summary...
                              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=itspdw01)(PORT=1521)))
                              The listener supports no services
                              The command completed successfully
                              **********************************************************************************************************************

                              however my problem started when I was trying to create a database gateway for MS SQL server. I edited the listener.ora to include the db gateway information.

                              your help is appreiated.
                              • 12. Re: Linux Error:111:Connection refused
                                sb92075
                                I moved the listener.ora to listener.ora.sav and tried starting the listener and the listener started succesfully.
                                Normal & expected behavior.
                                Since V10.1, no listener.ora is required to start the listener; if you are willing to accept standard default values (like port=1521).
                                • 13. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                                  728486
                                  sb92075, thank you for mentioning that renaming the listener.log file and restarting the listener helped. That is what fixed my problem to when I received that same 'Linux Error:111:Connection refused' message upon trying to start the listener, the first time. When I looked the listener.log had grown to 2.1G, so needless to say we have a cron to write. :)
                                  • 14. Re: Linux Error:111:Connection refused & Linux Error:29:Illegal seek
                                    EdStevens
                                    Roy Prowell the 3rd wrote:
                                    sb92075, thank you for mentioning that renaming the listener.log file and restarting the listener helped. That is what fixed my problem to when I received that same 'Linux Error:111:Connection refused' message upon trying to start the listener, the first time. When I looked the listener.log had grown to 2.1G, so needless to say we have a cron to write. :)
                                    "needless to say we have a cron to write."

                                    To do what?