When server change IP, Oracle DB failed to start.

$ sudo  /etc/init.d/oracle-xe-18c  start
Starting Oracle Net Listener.
Starting Oracle Database instance XE.
Oracle Database instance XE started.

Failed to start Oracle Net Listener using /opt/oracle/product/18c/dbhomeXE/bin/tnslsnr and Oracle Database using /opt/oracle/product/18c/dbhomeXE/bin/sqlplus.

Well we can try to see what’s happening.

$ sudo su - oracle
$ export ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
$ export ORACLE_BASE=/opt/oracle
$ export PATH=$PATH:$ORACLE_HOME/bin
$ lsnrctl start

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 27-SEP-2019 17:10:38

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

TNS-01106: Listener using listener name LISTENER has already been started
-bash-4.2$ lsnrctl stop

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 27-SEP-2019 17:10:44

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
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=10.80.32.75)(PORT=1521)))
The command completed successfully

This is happening when we change the host IP.

Need to change the listener.ora. By default the used localhost and IP, just change those two into 0.0.0.0.

# listener.ora Network Configuration File: /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
# Generated by Oracle configuration tools.

DEFAULT_SERVICE_LISTENER = XE

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      )
    )
  )