正在连接到192.168.1.118 不能打开到主机的连接, 在端口 1521: 连接失败

本文详细阐述了在连接远程数据库时遇到的问题及解决方法,包括修改listener.ora文件中的设置,将localhost替换为计算机名,以成功建立连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

远程连接数据库提示:

正在连接到192.168.1.118 不能打开到主机的连接, 在端口 1521: 连接失败。


解决方法:将数据库服务器listener.ora中的localhost改为计算机名。

root@ImmortalWrt:~# tcpdump -i br-lan -nn 'arp' tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on br-lan, link-type EN10MB (Ethernet), snapshot length 262144 bytes 23:19:48.700409 ARP, Request who-has 192.168.2.190 tell 192.168.2.11, length 46 23:19:48.818338 ARP, Request who-has 192.168.2.159 tell 192.168.2.159, length 46 23:19:48.857705 ARP, Request who-has 192.168.2.118 tell 192.168.2.118, length 46 23:19:48.951036 ARP, Request who-has 192.168.2.193 tell 192.168.2.193, length 46 23:19:49.741960 ARP, Request who-has 192.168.2.190 tell 192.168.2.11, length 46 23:19:50.765910 ARP, Request who-has 192.168.2.190 tell 192.168.2.11, length 46 23:19:53.645945 ARP, Request who-has 192.168.2.113 tell 192.168.2.11, length 46 23:19:53.698932 ARP, Reply 192.168.2.113 is-at 7c:c2:94:5d:1d:9f, length 46 23:19:56.644027 ARP, Request who-has 192.168.2.2 tell 192.168.2.1, length 46 23:19:56.644043 ARP, Reply 192.168.2.2 is-at 00:0c:29:88:a8:5d, length 28 23:19:56.901893 ARP, Request who-has 192.168.2.11 tell 192.168.2.1, length 46 23:19:56.902638 ARP, Reply 192.168.2.11 is-at 00:0c:29:b3:d9:93, length 46 23:19:58.822726 ARP, Request who-has 192.168.2.159 tell 192.168.2.159, length 46 23:19:58.859986 ARP, Request who-has 192.168.2.118 tell 192.168.2.118, length 46 23:19:58.953302 ARP, Request who-has 192.168.2.193 tell 192.168.2.193, length 46 23:20:00.207269 ARP, Request who-has 192.168.2.12 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.207683 ARP, Reply 192.168.2.12 is-at b8:97:5a:eb:2b:49, length 46 23:20:00.208557 ARP, Request who-has 192.168.2.13 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.208847 ARP, Reply 192.168.2.13 is-at 00:0c:29:c3:6f:66, length 46 23:20:00.210712 ARP, Request who-has 192.168.2.1 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.211301 ARP, Reply 192.168.2.1 is-at a4:a9:30:cd:d2:4c, length 46 23:20:00.212879 ARP, Request who-has 192.168.2.160 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.213905 ARP, Request who-has 192.168.2.11 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.214100 ARP, Reply 192.168.2.11 is-at 00:0c:29:b3:d9:93, length 46 23:20:00.252506 ARP, Reply 192.168.2.160 is-at 54:ef:44:46:85:9a, length 46 23:20:00.309073 ARP, Request who-has 192.168.2.182 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.310294 ARP, Request who-has 192.168.2.201 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.312394 ARP, Reply 192.168.2.182 is-at 54:ef:44:46:67:92, length 46 23:20:00.314036 ARP, Request who-has 192.168.2.214 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.332624 ARP, Request who-has 192.168.2.234 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28 23:20:00.337297 ARP, Reply 192.168.2.234 is-at 54:ef:44:46:83:1a, length 46 23:20:00.362484 ARP, Reply 192.168.2.214 is-at 38:00:25:8a:8f:04, length 46 23:20:01.310351 ARP, Request who-has 192.168.2.201 (ff:ff:ff:ff:ff:ff) tell 192.168.2.2, length 28
最新发布
03-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值