19c初始化数据库的时候,提示端口占用,但查不到占用的程序。这个问题很诡异,如果按照提示的思路去查,找占用端口的进程,就走入了错误的方向。
很多同学都遇到过这个问题,有必要再把这个问题重新写一篇文章了。
[root@Redhat72 ~]# lsof -i TCP:1521[root@Redhat72 ~]# netstat -itpa|grep 1521
查看/etc/hosts文件,发现hostname的地址没有配置:
[root@Redhat72 ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
加上后解决。
————————————————
版权声明:本文为CSDN博主「姚远ACE」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_43424368/article/details/107582753
133.1.0.1 east01 east01.wlmqapp
这里的配置当然也和listener.ora中的参数相关,通常监听地址是指定hostname,但/etc/hosts里面又没有指定hostname的ip地址,这就是问题。下面是监听配置文件的一个例子:
$ cat /u01/app/19.0.0/grid/network/admin/listener.ora#Backup file is /u01/app/grid/crsdata/dell/output/listener.ora.bak.dell.grid line added by Agent# listener.ora Network Configuration File: /u01/app/19.0.0/grid/network/admin/listener.ora# Generated by Oracle configuration tools. LISTENER1 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dell)(PORT = 1522)) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dell)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) )