lisenter更改主機名之后監(jiān)聽不到服務(wù)

lisenter更改主機名之后監(jiān)聽不到服務(wù)

為金壇等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計制作服務(wù),及金壇網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為做網(wǎng)站、成都網(wǎng)站設(shè)計、金壇網(wǎng)站設(shè)計,以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達到每一位用戶的要求,就會得到認(rèn)可,從而選擇與我們長期合作。這樣,我們也可以走得更遠!

環(huán)境描述,linux redhat5.4 + oracle 11.2.0.1

主機名:zky.zhan

主機ip:192.168.214.10

實例SID:zky
                

問題展現(xiàn)

            如果將listenter.ora中監(jiān)聽地址(HOST = zky.zhan)參數(shù)更改為監(jiān)聽主機網(wǎng)絡(luò)地址(HOST = 192.168.214.10)后。發(fā)現(xiàn)服務(wù)監(jiān)聽不到服務(wù)器,一直顯示no server ,通過網(wǎng)絡(luò)服務(wù)也不能登錄到數(shù)據(jù)庫。

查看tnsname.ora參數(shù)

[oracle@zky /]$ cat /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ZKY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.214.10)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = zky)
    )
  )


查看listener.ora參數(shù)

我們將默認(rèn)的zky.zhan修改為ip地址

[oracle@zky /]$ cat /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER1 = ON

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
#    (ADDRESS = (PROTOCOL = TCP)(HOST = zky.zhan)(PORT = 1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.214.10)(PORT = 1521))

    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

啟動監(jiān)聽

發(fā)現(xiàn)The listener supports no services,一直監(jiān)聽不到服務(wù)

[oracle@zky /]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 24-APR-2016 05:34:11

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

Starting /u01/app/oracle/product/11.2.0/grid/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/zky/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.214.10)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.214.10)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                24-APR-2016 05:34:11
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/zky/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.214.10)(PORT=1521)))
The listener supports no services
The command completed successfully

數(shù)據(jù)庫登錄也顯示無監(jiān)聽

[oracle@zky /]$ sqlplus system/oracle_4U@zky

SQL*Plus: Release 11.2.0.1.0 Production on Sun Apr 24 05:37:17 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

解決方法
        在糾結(jié)多日之后發(fā)現(xiàn)當(dāng)使用ping主機名zky.zhan時發(fā)現(xiàn)默認(rèn)解析為127.0.0.1。于是在試探的狀態(tài)下將本地解析127.0.0.1修改為192.168.214.10后發(fā)現(xiàn)可以正常使用。

更改host

[root@zky /]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1              zky.zhan zky localhost.localdomain localhost
#::1            localhost6.localdomain6 localhost6

192.168.214.10 zky.zhan zky localhost.localdomain localhost


重啟監(jiān)聽后服務(wù)自己監(jiān)聽到了

[oracle@zky /]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 24-APR-2016 05:43:40

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.214.10)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                24-APR-2016 05:34:11
Uptime                    0 days 0 hr. 9 min. 29 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/zky/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.214.10)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "zky" has 1 instance(s).
  Instance "zky", status READY, has 1 handler(s) for this service...
Service "zkyXDB" has 1 instance(s).
  Instance "zky", status READY, has 1 handler(s) for this service...
The command completed successfully

登錄數(shù)據(jù)庫成功

[oracle@zky /]$ sqlplus system/oracle_4U@zky

SQL*Plus: Release 11.2.0.1.0 Production on Sun Apr 24 05:44:59 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      zky
db_unique_name                       string      zky
global_names                         boolean     FALSE
instance_name                        string      zky
lock_name_space                      string
log_file_name_convert                string
service_names                        string      zky

當(dāng)前題目:lisenter更改主機名之后監(jiān)聽不到服務(wù)
網(wǎng)頁路徑:http://muchs.cn/article44/jpdche.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計、網(wǎng)站內(nèi)鏈企業(yè)建站、網(wǎng)站排名商城網(wǎng)站、App設(shè)計

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化