oracle啟動錯誤提示---hostname原因導致

來源:互聯網
上載者:User

標籤:hostname   oracle   start   

#剛開始直接root使用者登入,在etc目錄,切換到oracle,輸入lsnrctl start啟動oracle時提示"lsnrctl: command not found"[[email protected]_test etc]# su oracle[[email protected]_test etc]$ lsnrctl startbash: lsnrctl: command not found
#切換回root使用者,cd /根目錄, 再次su - oracle ,輸入lsnrctl start啟動oracle,這次正常啦.[[email protected]_test ~]$ cd /[[email protected]_test /]$ su -rootsu: invalid option -- ‘r‘Try `su --help‘ for more information.[[email protected]_test /]$ su - rootPassword: [[email protected]_test ~]# su - oracle[[email protected]_test ~]$ [[email protected]_test ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-JUL-2016 22:06:57Copyright (c) 1991, 2011, Oracle.  All rights reserved.Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionLog messages written to /u01/app/oracle/diag/tnslsnr/loveyao_test/listener/alert/log.xmlError listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))TNS-12545: Connect failed because target host or object does not exist TNS-12560: TNS:protocol adapter error  TNS-00515: Connect failed because target host or object does not exist   Linux Error: 25: Inappropriate ioctl for deviceListener failed to start. See the error message(s) above...[[email protected]_test ~]$ #如上所示: oracle啟動失敗,提示"Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))TNS-12545: Connect failed because target host or object does not exist"#hosts檔案導致,切換root修改hosts檔案,重新啟動oracle可以正常啟動. 具體操作如下:[[email protected]_test alert]$ su - rootPassword: [[email protected]_test ~]# [[email protected]_test ~]# [[email protected]_test ~]# vi /etc/hosts127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6~#將hosts檔案localhost 修改成主機名稱hostname的名字,注意: vi /etc/sysconfig/network 檔案可以修改hostname的名字(這裡修改後需要重啟系統).[[email protected]_test ~]# vi /etc/hosts127.0.0.1   loveyao_test localhost.localdomain localhost4 localhost4.localdomain4::1         localhost localhost.localdomain localhost6 localhost6.localdomain6~[[email protected]_test ~]# su - oracle[[email protected]_test ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-JUL-2016 22:23:22Copyright (c) 1991, 2011, Oracle.  All rights reserved.Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionLog messages written to /u01/app/oracle/diag/tnslsnr/loveyao_test/listener/alert/log.xmlListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=loveyao_test)(PORT=1521)))Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias                     LISTENERVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionStart Date                04-JUL-2016 22:23:22Uptime                    0 days 0 hr. 0 min. 0 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Log File         /u01/app/oracle/diag/tnslsnr/loveyao_test/listener/alert/log.xmlListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=loveyao_test)(PORT=1521)))The listener supports no servicesThe command completed successfully[[email protected]_test ~]$ #查看oracle監聽連接埠1521[[email protected]_test ~]$ ss -tanlRecv-Q Send-Q               Local Address:Port                 Peer Address:Port 0      128                             :::111                            :::*     0      128                              *:111                             *:*     0      128                             :::1521                           :::*     0      128                             :::25493                          :::*     0      128                             :::22                             :::*     0      128                              *:22                              *:*     0      128                      127.0.0.1:631                             *:*     0      128                            ::1:631                            :::*     0      100                            ::1:25                             :::*     0      100                      127.0.0.1:25                              *:*     0      128                              *:39108                           *:*     [[email protected]_test ~]$


本文出自 “LOVE_瑤” 部落格,請務必保留此出處http://20161215.blog.51cto.com/2276215/1795750

oracle啟動錯誤提示---hostname原因導致

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.