Can no longer connect to my oracle database externaly

Started by
4 comments, last by hplus0603 11 years, 6 months ago
Hi.

I use an oracle XE database on my dedicated server. I was always able to connect to it both from my server and from my developer pc but now for some reason without me making any changes to the database it no longer lets me connect to the database from my developers pc (don't know how I managed to break it). It tries to connect for a while and then it seems to times out. Exact error is "IO Error: Connection reset". I'm fairly confident that its not caused by a bad connection.

Note that if I stop the database on my server the error I get on my developers pc changes to "TNS: listener does not currently know of SID given". So it does seem to at least "find" the database.

I already tried disabling the firewall on my server completely but it makes no difference.

I'm hoping there isn't too many things that would cause this. Any ideas?

Thnx in Advance!
Advertisement
Are you hosting on UNIX or Windows?
If on UNIX, check the iptables settings for the port in question.
Then use tcpdump to see whether your connection attempt is even making it to the machine.
If on Windows, check the firewall settings for the service/port in question.
Then use Wireshark (on the remote machine) to see whether your connection attempts is making it to the machine.
enum Bool { True, False, FileNotFound };
Im using linux (centos). And I completely stopped the iptables service. Il try using tcpdump when I get home from work.
EDIT: it started working again by itself :/ maybe there was some temporary network issue somewhere.

ok.

I used

tcpdump -i eth0 'port 1521'

on my server and when I try to connect to the database from my develop pc it prints out the packets so its definitely reaching the machine.

Here is the complete output for a single connection attempt.

[root@cl-t083-132cl ~]# tcpdump -i eth0 'port 1521'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
04:36:50.755555 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: S 652033666:652033666(0) win 65535 <mss 1380,nop,wscale 4,nop,nop,timestamp 1184529696 0,sackOK,eol>
04:36:50.757541 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: S 3491351034:3491351034(0) ack 652033667 win 5792 <mss 1460,sackOK,timestamp 37923105 1184529696,nop,wscale 7>
04:36:52.541349 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: S 652033666:652033666(0) win 65535 <mss 1380,nop,wscale 4,nop,nop,timestamp 1184530699 0,sackOK,eol>
04:36:52.541365 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: S 3491351034:3491351034(0) ack 652033667 win 5792 <mss 1460,sackOK,timestamp 37924891 1184529696,nop,wscale 7>
04:36:52.541369 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1 win 8208 <nop,nop,timestamp 1184531578 37923105>
04:36:52.581983 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 1:169(168) ack 1 win 8208 <nop,nop,timestamp 1184531585 37923105>
04:36:52.581988 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: . ack 169 win 54 <nop,nop,timestamp 37924932 1184531585>
04:36:52.593912 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 1:9(8) ack 169 win 54 <nop,nop,timestamp 37924944 1184531585>
04:36:52.821409 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1 win 8208 <nop,nop,timestamp 1184531884 37924891>
04:36:52.882052 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 9 win 8207 <nop,nop,timestamp 1184531942 37924944>
04:36:52.882055 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 169:337(168) ack 9 win 8207 <nop,nop,timestamp 1184531944 37924944>
04:36:52.882104 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 9:33(24) ack 337 win 62 <nop,nop,timestamp 37925232 1184531944>
04:36:53.192931 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 33 win 8206 <nop,nop,timestamp 1184532250 37925232>
04:36:53.192937 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 337:482(145) ack 33 win 8206 <nop,nop,timestamp 1184532255 37925232>
04:36:53.193029 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 33:160(127) ack 482 win 71 <nop,nop,timestamp 37925543 1184532255>
04:36:53.501296 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 160 win 8198 <nop,nop,timestamp 1184532536 37925543>
04:36:53.551873 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 482:515(33) ack 160 win 8198 <nop,nop,timestamp 1184532537 37925543>
04:36:53.551925 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 160:398(238) ack 515 win 71 <nop,nop,timestamp 37925902 1184532537>
04:36:53.871556 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 398 win 8183 <nop,nop,timestamp 1184532903 37925902>
04:36:53.923285 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 515:1294(779) ack 398 win 8192 <nop,nop,timestamp 1184532908 37925902>
04:36:53.923637 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 398:1232(834) ack 1294 win 83 <nop,nop,timestamp 37926274 1184532908>
04:36:54.251495 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1232 win 8139 <nop,nop,timestamp 1184533282 37926274>
04:36:54.271188 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 1294:1313(19) ack 1232 win 8192 <nop,nop,timestamp 1184533290 37926274>
04:36:54.271259 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 1232:1303(71) ack 1313 win 83 <nop,nop,timestamp 37926621 1184533290>
04:36:54.582653 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1303 win 8187 <nop,nop,timestamp 1184533611 37926621>
04:36:54.631463 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 1313:1474(161) ack 1303 win 8192 <nop,nop,timestamp 1184533621 37926621>
04:36:54.632623 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 1303:1376(73) ack 1474 win 95 <nop,nop,timestamp 37926983 1184533621>
04:36:54.931724 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1376 win 8187 <nop,nop,timestamp 1184533968 37926983>
04:36:54.992882 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 1474:2042(568) ack 1376 win 8192 <nop,nop,timestamp 1184533982 37926983>
04:36:54.993368 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 1376:1387(11) ack 2042 win 107 <nop,nop,timestamp 37927344 1184533982>
04:36:54.993375 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 1387:1398(11) ack 2042 win 107 <nop,nop,timestamp 37927344 1184533982>
04:36:55.282022 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1387 win 8191 <nop,nop,timestamp 1184534329 37927344>
04:36:55.282026 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1398 win 8190 <nop,nop,timestamp 1184534329 37927344>
04:36:55.282029 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 2042:2053(11) ack 1398 win 8191 <nop,nop,timestamp 1184534332 37927344>
04:36:55.282126 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: P 1398:1486(88) ack 2053 win 107 <nop,nop,timestamp 37927632 1184534332>
04:36:55.572154 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1486 win 8186 <nop,nop,timestamp 1184534617 37927632>
04:36:55.581330 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: P 2053:2063(10) ack 1486 win 8192 <nop,nop,timestamp 1184534631 37927632>
04:36:55.581334 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: F 2063:2063(0) ack 1486 win 8192 <nop,nop,timestamp 1184534631 37927632>
04:36:55.581399 IP 67.205.103.240.ncube-lm > 41.120.220.211.56084: F 1486:1486(0) ack 2064 win 107 <nop,nop,timestamp 37927932 1184534631>
04:36:55.612711 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: S 3326856538:3326856538(0) win 65535 <mss 1380,nop,wscale 4,nop,nop,timestamp 1184534657 0,sackOK,eol>
04:36:55.612727 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: S 370376161:370376161(0) ack 3326856539 win 5792 <mss 1460,sackOK,timestamp 37927963 1184534657,nop,wscale 7>
04:36:55.861412 IP 41.120.220.211.56084 > 67.205.103.240.ncube-lm: . ack 1487 win 8192 <nop,nop,timestamp 1184534913 37927932>
04:36:55.891398 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1 win 8208 <nop,nop,timestamp 1184534934 37927963>
04:36:55.911514 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 1:169(168) ack 1 win 8208 <nop,nop,timestamp 1184534942 37927963>
04:36:55.911519 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: . ack 169 win 54 <nop,nop,timestamp 37928262 1184534942>
04:36:55.923187 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 1:9(8) ack 169 win 54 <nop,nop,timestamp 37928273 1184534942>
04:36:56.201586 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 9 win 8207 <nop,nop,timestamp 1184535241 37928273>
04:36:56.212196 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 169:337(168) ack 9 win 8207 <nop,nop,timestamp 1184535243 37928273>
04:36:56.212251 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 9:33(24) ack 337 win 62 <nop,nop,timestamp 37928563 1184535243>
04:36:56.501690 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 33 win 8206 <nop,nop,timestamp 1184535536 37928563>
04:36:56.513520 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 337:482(145) ack 33 win 8206 <nop,nop,timestamp 1184535540 37928563>
04:36:56.513589 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 33:160(127) ack 482 win 71 <nop,nop,timestamp 37928864 1184535540>
04:36:56.831395 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 160 win 8198 <nop,nop,timestamp 1184535835 37928864>
04:36:56.851609 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 482:515(33) ack 160 win 8198 <nop,nop,timestamp 1184535838 37928864>
04:36:56.851662 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 160:398(238) ack 515 win 71 <nop,nop,timestamp 37929202 1184535838>
04:36:57.161354 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 398 win 8183 <nop,nop,timestamp 1184536171 37929202>
04:36:57.212515 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 515:1294(779) ack 398 win 8192 <nop,nop,timestamp 1184536177 37929202>
04:36:57.212885 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 398:1232(834) ack 1294 win 83 <nop,nop,timestamp 37929563 1184536177>
04:36:57.502377 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1232 win 8139 <nop,nop,timestamp 1184536536 37929563>
04:36:57.521822 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 1294:1313(19) ack 1232 win 8192 <nop,nop,timestamp 1184536548 37929563>
04:36:57.521881 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 1232:1303(71) ack 1313 win 83 <nop,nop,timestamp 37929872 1184536548>
04:36:57.801630 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1303 win 8187 <nop,nop,timestamp 1184536823 37929872>
04:36:57.812557 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 1313:1474(161) ack 1303 win 8192 <nop,nop,timestamp 1184536836 37929872>
04:36:57.813707 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 1303:1376(73) ack 1474 win 95 <nop,nop,timestamp 37930164 1184536836>
04:36:58.102279 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1376 win 8187 <nop,nop,timestamp 1184537131 37930164>
04:36:58.131827 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 1474:2042(568) ack 1376 win 8192 <nop,nop,timestamp 1184537144 37930164>
04:36:58.132325 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 1376:1387(11) ack 2042 win 107 <nop,nop,timestamp 37930483 1184537144>
04:36:58.132333 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 1387:1398(11) ack 2042 win 107 <nop,nop,timestamp 37930483 1184537144>
04:36:58.452917 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1387 win 8191 <nop,nop,timestamp 1184537430 37930483>
04:36:58.452921 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1398 win 8191 <nop,nop,timestamp 1184537431 37930483>
04:36:58.452924 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 2042:2053(11) ack 1398 win 8191 <nop,nop,timestamp 1184537434 37930483>
04:36:58.453027 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: P 1398:1486(88) ack 2053 win 107 <nop,nop,timestamp 37930804 1184537434>
04:36:58.743071 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1486 win 8186 <nop,nop,timestamp 1184537758 37930804>
04:36:58.743075 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: P 2053:2063(10) ack 1486 win 8192 <nop,nop,timestamp 1184537764 37930804>
04:36:58.743078 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: F 2063:2063(0) ack 1486 win 8192 <nop,nop,timestamp 1184537764 37930804>
04:36:58.743145 IP 67.205.103.240.ncube-lm > 41.120.220.211.56085: F 1486:1486(0) ack 2064 win 107 <nop,nop,timestamp 37931094 1184537764>
04:36:59.042120 IP 41.120.220.211.56085 > 67.205.103.240.ncube-lm: . ack 1487 win 8192 <nop,nop,timestamp 1184538056 37931094>
04:36:59.801787 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: S 2418972091:2418972091(0) win 65535 <mss 1380,nop,wscale 4,nop,nop,timestamp 1184538801 0,sackOK,eol>
04:36:59.801804 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: S 439757454:439757454(0) ack 2418972092 win 5792 <mss 1460,sackOK,timestamp 37932153 1184538801,nop,wscale 7>
04:37:00.092105 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1 win 8208 <nop,nop,timestamp 1184539080 37932153>
04:37:00.092122 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 1:169(168) ack 1 win 8208 <nop,nop,timestamp 1184539087 37932153>
04:37:00.092129 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: . ack 169 win 54 <nop,nop,timestamp 37932443 1184539087>
04:37:00.104171 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1:9(8) ack 169 win 54 <nop,nop,timestamp 37932455 1184539087>
04:37:02.734139 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1:9(8) ack 169 win 54 <nop,nop,timestamp 37935085 1184539087>
04:37:03.031926 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 9 win 8207 <nop,nop,timestamp 1184541970 37935085>
04:37:03.081770 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 169:337(168) ack 9 win 8207 <nop,nop,timestamp 1184541973 37935085>
04:37:03.081857 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 9:33(24) ack 337 win 62 <nop,nop,timestamp 37935433 1184541973>
04:37:03.382375 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 33 win 8206 <nop,nop,timestamp 1184542313 37935433>
04:37:03.421623 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 337:482(145) ack 33 win 8206 <nop,nop,timestamp 1184542315 37935433>
04:37:03.421705 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 33:160(127) ack 482 win 71 <nop,nop,timestamp 37935773 1184542315>
04:37:03.711763 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 160 win 8198 <nop,nop,timestamp 1184542653 37935773>
04:37:03.711767 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 482:515(33) ack 160 win 8198 <nop,nop,timestamp 1184542658 37935773>
04:37:03.711819 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 160:398(238) ack 515 win 71 <nop,nop,timestamp 37936063 1184542658>
04:37:04.001564 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 398 win 8183 <nop,nop,timestamp 1184542945 37936063>
04:37:04.042338 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 515:1294(779) ack 398 win 8192 <nop,nop,timestamp 1184542948 37936063>
04:37:04.042686 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 398:1232(834) ack 1294 win 83 <nop,nop,timestamp 37936394 1184542948>
04:37:04.462306 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1232 win 8139 <nop,nop,timestamp 1184543381 37936394>
04:37:04.491771 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 1294:1313(19) ack 1232 win 8192 <nop,nop,timestamp 1184543394 37936394>
04:37:04.491839 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1232:1303(71) ack 1313 win 83 <nop,nop,timestamp 37936843 1184543394>
04:37:04.791301 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1303 win 8187 <nop,nop,timestamp 1184543710 37936843>
04:37:04.841430 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 1313:1474(161) ack 1303 win 8192 <nop,nop,timestamp 1184543724 37936843>
04:37:04.842560 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1303:1376(73) ack 1474 win 95 <nop,nop,timestamp 37937194 1184543724>
04:37:05.131285 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1376 win 8187 <nop,nop,timestamp 1184544057 37937194>
04:37:05.192677 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 1474:2042(568) ack 1376 win 8192 <nop,nop,timestamp 1184544072 37937194>
04:37:05.193213 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1376:1387(11) ack 2042 win 107 <nop,nop,timestamp 37937545 1184544072>
04:37:05.193222 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1387:1398(11) ack 2042 win 107 <nop,nop,timestamp 37937545 1184544072>
04:37:05.521625 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1387 win 8191 <nop,nop,timestamp 1184544415 37937545>
04:37:05.521922 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1398 win 8191 <nop,nop,timestamp 1184544416 37937545>
04:37:05.521926 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 2042:2053(11) ack 1398 win 8191 <nop,nop,timestamp 1184544416 37937545>
04:37:05.522009 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: P 1398:1486(88) ack 2053 win 107 <nop,nop,timestamp 37937874 1184544416>
04:37:05.801838 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1486 win 8186 <nop,nop,timestamp 1184544736 37937874>
04:37:05.801842 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: P 2053:2063(10) ack 1486 win 8192 <nop,nop,timestamp 1184544737 37937874>
04:37:05.801844 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: F 2063:2063(0) ack 1486 win 8192 <nop,nop,timestamp 1184544737 37937874>
04:37:05.801918 IP 67.205.103.240.ncube-lm > 41.120.220.211.56088: F 1486:1486(0) ack 2064 win 107 <nop,nop,timestamp 37938154 1184544737>
04:37:06.091494 IP 41.120.220.211.56088 > 67.205.103.240.ncube-lm: . ack 1487 win 8192 <nop,nop,timestamp 1184545012 37938154>
115 packets captured
115 packets received by filter
0 packets dropped by kernel
Sigh. In the end it turned out my ISP blocked the default oracle port (1521) on my home connection...

I struggled a bit trying to change the port oracle listens on... Then I struggled a bit trying to set up port forwarding... and then I gave up and just wrote my own damn port forwarding application :D I'm a programmer after all not a Linux administrator ^^
Use ssh (if on Linux) or Putty (if on Windows) to forward from a local host to a remote host.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement