5 Replies Latest reply on Apr 24, 2019 6:33 AM by Manu Alphonse

    Cannot start listener from dbca due to port being used

    T.Boyd

      DB version: 18.3

      OS : Oracle Linux 7.6

       

      I had successfully installed 18c oracle database software in my test laptop running on Oracle Linux 7.6 .

      While trying to create a database using dbca, I am trying to configure a listener. But, I am getting the below error. But, nobody is using port 1521 in this laptop as shown in the netstat output below. In fact , if I use any port, I get the same error.

      ListenerError.png

       

       

      To fix this:

      I tried disabling Wifi network interface

      I tried disabling firewall

      I tried assigning an IP (10.80.16.238) to this laptop's physical network card using nmtui utility. Physical interface name: p5p1

      I tried disabling the WiFi adapter

       

      Still , I keep getting the same error. I re-ran runInstaller with every change mentioned above. Tried removing everything from /tmp directory. I tried rebooting the machine too.

       

      Details below.

       

      ---- Firewall is down
      
      [root@depsy237 ~]# systemctl status firewalld
      ● firewalld.service - firewalld - dynamic firewall daemon
         Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
         Active: inactive (dead) since Tue 2019-04-23 18:46:24 +07; 19s ago
           Docs: man:firewalld(1)
        Process: 4766 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
       Main PID: 4766 (code=exited, status=0/SUCCESS)
      
      Apr 23 16:35:43 depsy237.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
      Apr 23 16:35:49 depsy237.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
      Apr 23 18:46:23 depsy237.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
      Apr 23 18:46:24 depsy237.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
      [root@depsy237 ~]# 
      [root@depsy237 ~]# 
      [root@depsy237 ~]# 
      
      --- Current state of /etc/hosts
      --- I tried adding depsy237.localdomain to the 127.0.0.1 line. No luck
      [root@depsy237 ~]# cat /etc/hosts
      127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 
      ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
      10.80.16.238  depsy237.localdomain
      [root@depsy237 ~]# 
      [root@depsy237 ~]# 
      [root@depsy237 ~]# 
      
      [root@depsy237 ~]# hostname
      depsy237.localdomain
      [root@depsy237 ~]# 
      
      
      --- I can ping depsy237.localdomain
      
      [root@depsy237 ~]# ping depsy237.localdomain
      PING depsy237.localdomain (10.80.16.238) 56(84) bytes of data.
      64 bytes from depsy237.localdomain (10.80.16.238): icmp_seq=1 ttl=64 time=0.021 ms
      64 bytes from depsy237.localdomain (10.80.16.238): icmp_seq=2 ttl=64 time=0.038 ms
      64 bytes from depsy237.localdomain (10.80.16.238): icmp_seq=3 ttl=64 time=0.044 ms
      64 bytes from depsy237.localdomain (10.80.16.238): icmp_seq=4 ttl=64 time=0.050 ms
      ^C
      --- depsy237.localdomain ping statistics ---
      4 packets transmitted, 4 received, 0% packet loss, time 3081ms
      rtt min/avg/max/mdev = 0.021/0.038/0.050/0.011 ms
      [root@depsy237 ~]# 
      
      
      
      ------- Nobody is using 1521 port
      [root@depsy237 ~]# netstat -anp | grep 1521
      [root@depsy237 ~]#
      

       

       

      --- IP details

       

      [root@depsy237 ~]# ifconfig -a
      lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
              inet 127.0.0.1  netmask 255.0.0.0
              inet6 ::1  prefixlen 128  scopeid 0x10<host>
              loop  txqueuelen 1000  (Local Loopback)
              RX packets 444  bytes 42192 (41.2 KiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 444  bytes 42192 (41.2 KiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      p5p1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
              inet 10.80.16.238  netmask 255.0.0.0  broadcast 10.255.255.255
              ether 84:8f:69:a9:4c:73  txqueuelen 1000  (Ethernet)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
              inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
              ether 52:54:00:bf:61:1d  txqueuelen 1000  (Ethernet)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      virbr0-nic: flags=4098<BROADCAST,MULTICAST>  mtu 1500
              ether 52:54:00:bf:61:1d  txqueuelen 1000  (Ethernet)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 192.168.5.3  netmask 255.255.255.0  broadcast 192.168.5.255
              inet6 fe80::51ad:8844:8b6c:d5ba  prefixlen 64  scopeid 0x20<link>
              ether ac:72:89:81:12:b2  txqueuelen 1000  (Ethernet)
              RX packets 35241  bytes 10314217 (9.8 MiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 8058  bytes 1916322 (1.8 MiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      [root@depsy237 ~]#
      
      [root@depsy237 ~]# nmcli
      wlp3s0: connected to RND_CD
              "Intel Centrino 1030"
              wifi (iwlwifi), AC:72:89:81:12:B2, hw, mtu 1500
              ip4 default
              inet4 192.168.5.3/24
              route4 0.0.0.0/0
              route4 192.168.5.0/24
              inet6 fe80::51ad:8844:8b6c:d5ba/64
              route6 fe80::/64
              route6 ff00::/8
      
      virbr0: connected to virbr0
              "virbr0"
              bridge, 52:54:00:BF:61:1D, sw, mtu 1500
              inet4 192.168.122.1/24
              route4 192.168.122.0/24
      
      p5p1: connected to p5p1
              "Realtek RTL8111/8168/8411"
              ethernet (r8169), 84:8F:69:A9:4C:73, hw, mtu 1500
              inet4 10.80.16.238/8
              route4 10.0.0.0/8
      
      lo: unmanaged
              "lo"
              loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
      
      virbr0-nic: unmanaged
              "virbr0-nic"
              tun, 52:54:00:BF:61:1D, sw, mtu 1500
      
      DNS configuration:
              servers: 8.8.8.8
              interface: wlp3s0
      
      Use "nmcli device show" to get complete information about known devices and
      "nmcli connection show" to get an overview on active connection profiles.
      
      Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.
      [root@depsy237 ~]#
      
        • 1. Re: Cannot start listener from dbca due to port being used
          EdStevens

          T.Boyd wrote:

           

          DB version: 18.3

          OS : Oracle Linux 7.6

           

          I had successfully installed 18c oracle database software in my test laptop running on Oracle Linux 7.6 .

          While trying to create a database using dbca, I am trying to configure a listener. But, I am getting the below error. But, nobody is using port 1521 in this laptop as shown in the netstat output below. In fact , if I use any port, I get the same error.

          ListenerError.png

           

           

          To fix this:

          I tried disabling Wifi network interface

          I tried disabling firewall

          I tried assigning an IP (10.80.16.238) to this laptop's physical network card using nmtui utility. Physical interface name: p5p1

          I tried disabling the WiFi adapter

           

          Still , I keep getting the same error. I re-ran runInstaller with every change mentioned above. Tried removing everything from /tmp directory. I tried rebooting the machine too.

           

          Details below.

           

          1. ----Firewallisdown
          2. [root@depsy237~]#systemctlstatusfirewalld
          3. ●firewalld.service-firewalld-dynamicfirewalldaemon
          4. Loaded:loaded(/usr/lib/systemd/system/firewalld.service;enabled;vendorpreset:enabled)
          5. Active:inactive(dead)sinceTue2019-04-2318:46:24+07;19sago
          6. Docs:man:firewalld(1)
          7. Process:4766ExecStart=/usr/sbin/firewalld--nofork--nopid$FIREWALLD_ARGS(code=exited,status=0/SUCCESS)
          8. MainPID:4766(code=exited,status=0/SUCCESS)
          9. Apr2316:35:43depsy237.localdomainsystemd[1]:Startingfirewalld-dynamicfirewalldaemon...
          10. Apr2316:35:49depsy237.localdomainsystemd[1]:Startedfirewalld-dynamicfirewalldaemon.
          11. Apr2318:46:23depsy237.localdomainsystemd[1]:Stoppingfirewalld-dynamicfirewalldaemon...
          12. Apr2318:46:24depsy237.localdomainsystemd[1]:Stoppedfirewalld-dynamicfirewalldaemon.
          13. [root@depsy237~]#
          14. [root@depsy237~]#
          15. [root@depsy237~]#
          16. ---Currentstateof/etc/hosts
          17. ---Itriedaddingdepsy237.localdomaintothe127.0.0.1line.Noluck
          18. [root@depsy237~]#cat/etc/hosts
          19. 127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4
          20. ::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6
          21. 10.80.16.238depsy237.localdomain
          22. [root@depsy237~]#
          23. [root@depsy237~]#
          24. [root@depsy237~]#
          25. [root@depsy237~]#hostname
          26. depsy237.localdomain
          27. [root@depsy237~]#
          28. ---Icanpingdepsy237.localdomain
          29. [root@depsy237~]#pingdepsy237.localdomain
          30. PINGdepsy237.localdomain(10.80.16.238)56(84)bytesofdata.
          31. 64bytesfromdepsy237.localdomain(10.80.16.238):icmp_seq=1ttl=64time=0.021ms
          32. 64bytesfromdepsy237.localdomain(10.80.16.238):icmp_seq=2ttl=64time=0.038ms
          33. 64bytesfromdepsy237.localdomain(10.80.16.238):icmp_seq=3ttl=64time=0.044ms
          34. 64bytesfromdepsy237.localdomain(10.80.16.238):icmp_seq=4ttl=64time=0.050ms
          35. ^C
          36. ---depsy237.localdomainpingstatistics---
          37. 4packetstransmitted,4received,0%packetloss,time3081ms
          38. rttmin/avg/max/mdev=0.021/0.038/0.050/0.011ms
          39. [root@depsy237~]#
          40. -------Nobodyisusing1521port
          41. [root@depsy237~]#netstat-anp|grep1521
          42. [root@depsy237~]#

           

           

          --- IP details

           

          1. [root@depsy237~]#ifconfig-a
          2. lo:flags=73<UP,LOOPBACK,RUNNING>mtu65536
          3. inet127.0.0.1netmask255.0.0.0
          4. inet6::1prefixlen128scopeid0x10<host>
          5. looptxqueuelen1000(LocalLoopback)
          6. RXpackets444bytes42192(41.2KiB)
          7. RXerrors0dropped0overruns0frame0
          8. TXpackets444bytes42192(41.2KiB)
          9. TXerrors0dropped0overruns0carrier0collisions0
          10. p5p1:flags=4099<UP,BROADCAST,MULTICAST>mtu1500
          11. inet10.80.16.238netmask255.0.0.0broadcast10.255.255.255
          12. ether84:8f:69:a9:4c:73txqueuelen1000(Ethernet)
          13. RXpackets0bytes0(0.0B)
          14. RXerrors0dropped0overruns0frame0
          15. TXpackets0bytes0(0.0B)
          16. TXerrors0dropped0overruns0carrier0collisions0
          17. virbr0:flags=4099<UP,BROADCAST,MULTICAST>mtu1500
          18. inet192.168.122.1netmask255.255.255.0broadcast192.168.122.255
          19. ether52:54:00:bf:61:1dtxqueuelen1000(Ethernet)
          20. RXpackets0bytes0(0.0B)
          21. RXerrors0dropped0overruns0frame0
          22. TXpackets0bytes0(0.0B)
          23. TXerrors0dropped0overruns0carrier0collisions0
          24. virbr0-nic:flags=4098<BROADCAST,MULTICAST>mtu1500
          25. ether52:54:00:bf:61:1dtxqueuelen1000(Ethernet)
          26. RXpackets0bytes0(0.0B)
          27. RXerrors0dropped0overruns0frame0
          28. TXpackets0bytes0(0.0B)
          29. TXerrors0dropped0overruns0carrier0collisions0
          30. wlp3s0:flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu1500
          31. inet192.168.5.3netmask255.255.255.0broadcast192.168.5.255
          32. inet6fe80::51ad:8844:8b6c:d5baprefixlen64scopeid0x20<link>
          33. etherac:72:89:81:12:b2txqueuelen1000(Ethernet)
          34. RXpackets35241bytes10314217(9.8MiB)
          35. RXerrors0dropped0overruns0frame0
          36. TXpackets8058bytes1916322(1.8MiB)
          37. TXerrors0dropped0overruns0carrier0collisions0
          38. [root@depsy237~]#
          39. [root@depsy237~]#nmcli
          40. wlp3s0:connectedtoRND_CD
          41. "IntelCentrino1030"
          42. wifi(iwlwifi),AC:72:89:81:12:B2,hw,mtu1500
          43. ip4default
          44. inet4192.168.5.3/24
          45. route40.0.0.0/0
          46. route4192.168.5.0/24
          47. inet6fe80::51ad:8844:8b6c:d5ba/64
          48. route6fe80::/64
          49. route6ff00::/8
          50. virbr0:connectedtovirbr0
          51. "virbr0"
          52. bridge,52:54:00:BF:61:1D,sw,mtu1500
          53. inet4192.168.122.1/24
          54. route4192.168.122.0/24
          55. p5p1:connectedtop5p1
          56. "RealtekRTL8111/8168/8411"
          57. ethernet(r8169),84:8F:69:A9:4C:73,hw,mtu1500
          58. inet410.80.16.238/8
          59. route410.0.0.0/8
          60. lo:unmanaged
          61. "lo"
          62. loopback(unknown),00:00:00:00:00:00,sw,mtu65536
          63. virbr0-nic:unmanaged
          64. "virbr0-nic"
          65. tun,52:54:00:BF:61:1D,sw,mtu1500
          66. DNSconfiguration:
          67. servers:8.8.8.8
          68. interface:wlp3s0
          69. Use"nmclideviceshow"togetcompleteinformationaboutknowndevicesand
          70. "nmcliconnectionshow"togetanoverviewonactiveconnectionprofiles.
          71. Consultnmcli(1)andnmcli-examples(5)manualpagesforcompleteusagedetails.
          72. [root@depsy237~]#

          What happens if you do NOT select 'create a new listener'?

           

          Creating a listener really should be separate from creating a database, if for no other reason than that there should NOT be a one-to-one relationship.

           

          One single listener, using the default name of LISTENER and the default port of 1521, is quite capable of -- indeed, WAS DESIGNED TO -- service multiple databases of multiple versions running from multiple homes.  Multiple listeners simply adds complications, and for no gain whatsoever.  My usual installation sequence is 1) install the software - software install only, not selecting to create a database; 2) from a command prompt, execute '$ORACLE_HOME/bin/lsnrctl start'; 3) use dbca to create a database without selecting 'create a new listener'.

           

          Forget dbca for the moment.  Just go to $ORACLE_HOME/network/admin and delete or rename (thus effectively removing) any 'listener.ora' file.  Then execute $ORACLE_HOME/bin/lsnrctl start, and show us the result.

          1 person found this helpful
          • 2. Re: Cannot start listener from dbca due to port being used
            T.Boyd

            Thank You Ed.

            As you had suggested, I just exited from dbca and issued lsnrctl start and the listener was started.

            Not sure, why I was getting error from dbca.

             

            Still no listener.ora in ORACLE_HOME/network/admin though. Maybe bcoz I am using the default port 1521.

             

            [oracle@depsy237 admin]$ pwd

            /u01/app/oracle/product/18.3/dbhome_1/network/admin

            [oracle@depsy237 admin]$

            [oracle@depsy237 admin]$ ls -l

            total 8

            drwxr-xr-x. 2 oracle oinstall 4096 Feb  8  2018 samples

            -rw-r--r--. 1 oracle oinstall 1441 Aug 27  2015 shrept.lst

            [oracle@depsy237 admin]$

             

             

            Two months back, I had the same port issue from dbca. My linux admin colleague did something at the network layer and I managed to start the listener at dbca itself. But, I don't remember what he did.

             

            Anyway, I will bear you sequence(steps) in mind. Thank You.

             

            [oracle@depsy237 ~]$ which lsnrctl
            /u01/app/oracle/product/18.3/dbhome_1/bin/lsnrctl
            [oracle@depsy237 ~]$ 
            [oracle@depsy237 ~]$ 
            [oracle@depsy237 ~]$ lsnrctl start
            
            LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 23-APR-2019 21:05:31
            
            Copyright (c) 1991, 2018, Oracle.  All rights reserved.
            
            Starting /u01/app/oracle/product/18.3/dbhome_1/bin/tnslsnr: please wait...
            
            TNSLSNR for Linux: Version 18.0.0.0.0 - Production
            Log messages written to /u01/app/oracle/diag/tnslsnr/depsy237/listener/alert/log.xml
            Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=depsy237.localdomain)(PORT=1521)))
            
            Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
            STATUS of the LISTENER
            ------------------------
            Alias                     LISTENER
            Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
            Start Date                23-APR-2019 21:05:34
            Uptime                    0 days 0 hr. 0 min. 2 sec
            Trace Level               off
            Security                  ON: Local OS Authentication
            SNMP                      OFF
            Listener Log File         /u01/app/oracle/diag/tnslsnr/depsy237/listener/alert/log.xml
            Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=depsy237.localdomain)(PORT=1521)))
            The listener supports no services
            The command completed successfully
            [oracle@depsy237 ~]$ 
            [oracle@depsy237 ~]$ ps -ef | grep inherit
            oracle   26814     1  0 21:05 ?        00:00:00 /u01/app/oracle/product/18.3/dbhome_1/bin/tnslsnr LISTENER -inherit
            oracle   26861  7176  0 21:06 pts/0    00:00:00 grep --color=auto inherit
            [oracle@depsy237 ~]$ 
            
            • 3. Re: Cannot start listener from dbca due to port being used
              EdStevens

              The listener does not require a listener.ora file.  Without that file, the listener is quite happy to start with all default values, including running on port 1521.

               

              Also of note, if there is no SID_LIST section in listener.ora - or if there is no listener.ora at all, when the listener starts it will report 'The listener supports no services', as you saw.  This is not a problem.  The listener is simply waiting for an active database instance to perform a dynamic registration with the listener.  Obviously, if you have not yet created a database there will be no databases to register.

               

              If you do have a listener.ora and include a SID_LIST section, the listener will report those services as 'status unknown'.  Again, this is not a problem and is exactly by design.

               

               

              I can't explain why the DBCA operation would report a problem.  I simply know that due to a variety of issues I long ago separated software installation from database creation, and separated database creation from listener operations, and have never had any of the issues commonly reported when trying to let one GUI interface handle it all as a single operation.

              1 person found this helpful
              • 4. Re: Cannot start listener from dbca due to port being used
                Dude!

                Just reading some of the last comments.... Keep in mind that the listener is normally started in the grid home and Grid Infrastructure installation which provides the ASM instance, not Oracle home. DBCA will use whatever listener is installed. It is no problem to run just one listener. The listener is only used for authentication and negotiating connection ports and can easily service multiple databases.

                • 5. Re: Cannot start listener from dbca due to port being used
                  Manu Alphonse

                  Another potential fix for your original issue from dbca:

                   

                  Qualify the short hostname into the /etc/hosts:

                   

                  i.e modify

                   

                  10.80.16.238  depsy237.localdomain

                   

                  to:

                   

                  10.80.16.238  depsy237.localdomain  depsy237

                   

                   

                  Source : MOS Doc ID 2277154.1

                  1 person found this helpful