Oracle Connection exception via JDBC - oracle

I have installed Oracle 11gR2 on my machine, now when i try to connect to it using IP address as 'localhost' or '127.0.0.1' there is no issue, but when I use ip address of machine '192.168.1.6' it throws exception: Io exception: Then Network Adapter could not establish the connection.
I have installed ms loopback adapter prior to installation and my machine get IP from DHCP.
do i need to configure any setting oracle config or what i might be missing here?

Before looking at the network you need to check what address your listener is actually configured for. If it's specifying localhost or 127.0.0.1 then you won't be able to access remotely. If it's specifying a different IP previously allocated by DHCP then your current one won't work. If it's a host name, is that resolvable to your DHCP address?
As well as looking at listener.ora, you can try running netstat -an | find "1521" to see what address(es) it's actually listening on.

It's a network issue. Likely a firewall, router or proxy somewhere in the line isn't properly configured to forward the desired port.
Not a programming problem.

localhost and 127.0.0.1 are known to be the local machine. It can bypass a lot of the fluff.
When you try for 192.168.1.6, it will go and 'ask' a router (or similar) to send the traffic to that IP address. First I'd try to PING the IP address. If that works, I'd try telnet 10.253.82.33 1521 to see if you can connect to the port without involving JDBC or SQL or anything.

Related

How to connect laravel with Firebird database? [duplicate]

I'm trying to connect to a remote Firebird database "test" (alias already added). It is not an embedded server, and is installed on VM with IP 192.168.1.147.
Here is my connection string:
User=sysdba;Password=masterkey;Database=test;DataSource=192.168.1.147
However I got an error:
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Unable to complete network request to host "192.168.1.147". ---> Unable to complete network request to host "192.168.1.147".
I've done some research on that but haven't got a clue yet. Some help needed. Thanks
My IP address is 192.168.2.108, and I can ping that server IP successfully
Make sure that
Firebird is running
Firebird is listening on port 3050 on the specified IP (or on 0.0.0.0)
Your firewall allows access to port 3050
You're using the correct host name
For Linux, the Firebird port is closed by default. You need to modify RemoteBindAddress in /etc/firebird/2.5/firebird.conf from
RemoteBindAddress = localhost
to
RemoteBindAddress =
and restart service.
Make sure you have excluded tcp port 3050 in VMs' firewall.
Ok. I think your connection to firebird is faililing because the firebird client looks up the network service file by name and does not find gds_db in the services file.
If your connection string refers to the host by using IP, the Client might fail to identify it because it gethostbyname() and not by IP
Manually include this in the file and you should be fine.
C:\windows\system32\drivers\etc\services

SSH connect from local windows VM to Azure windows VM

I want to have a SSH connection from my local windows machine or VM on my computer to Azure windows server VM. I tried Cygwin and Putty but both of them gave timeout connection. I used public ip address and opened port 22 on Azure VM.
I will appreciate if some one can give me any hints or links.
There are multiple firewalls that can be the reason here. Fist you must have a rule on the server to allow incoming SSH requests (port 22). Then you need to configure the NSG(Network security group) to allow incoming on port 22. If it still doesn't work, you need to verify that you are allowed to do an outgoing SSH request from your computer.
Thanks for suggestions, I found the problem which was the host machine IP address(ipconfig) (where is a local VM inside domain) was different from the IP address that communicate outside the domain to internet. I was set in NSG of Azure VM to only accept this IP and because of that it gave time-out error. After changing the IP it works.

local host connection in same network

I am trying to connect to my localhost from another computer. I have changed the host files to add the following at the end of the file: 127.0.0.1 privacy.local
And in my httpd-vhosts, I've added the following: DocumentRoot "/xampp/htdocs/app/" ServerName privacy.local
On my computer, I able able to access my website using privacy.local and my IP address. However, when I try to access this from my other computer, it does not work. I have also edited the host file for the other computer with my IP address and the servername.
Does anyone know why and how to fix this problem?
I am using xampp - apache.
There is nothing like a localhost in a network. You connect a host at a network adapter. The localhost is a virtual adapter to allow connections at one host without specifying the IP address of a network card. Each host has it's own localhost.
You must use the IP address of the adapter that is used to connect to the network, usually the one and only network card.
If you have DNS support you should use the host name instead of the IP address, because the IP address can change if it's assigned by DHCP.

What is the oracle database 12c IP Address

I just Installed Oracle Database 12c. At the end of the installation it gave me Information about my connection. SID, IP, etc. I restarted the computer run all these services (some of them already running):
OracleJobSchedulerORCL
OracleOraDB12Home1MTSRecoveryService
OracleOraDB12Home1TNSListener
OracleRemExecServiceV2
OracleServiceORCL
OracleVssWriterORCL
But I think I forgot the IP and port of my database since I tried to access the database using a webbrowser and it doesn't work (I tried https://10.10.10.10:5500/em). I don't know If the problem is really the IP:Port that I may have forgotten or if I forgot to run service. I am pretty sure the IP address look like https://10.10.x.x:xxxx/em but I don't I am not certain. Is there a way to recover the IP address and port of the database?
EDIT: I've installed it on Windows 8 x64 JP. with
In Environment Variable
with ORACLE_HOSTNAME = 10.10.10.10
ORACLE_UNQNAME = orcl
And in the host file (in System32/Drivers/etc/)
127.0.0.1 localhost
10.10.10.10 wopr.orcl wopr
Per documentation, format for accessing enterprise manager in your browser
http://hostname:portnumber/em
Once you sure that default port number is kept as default HTTP port number is 5500 then you can get your system hostname. Port numbers are recorded in $ORACLE_HOME/install/portlist.ini file.
If running windows then just run the command hostname which will give you the hostname of your machine. Then run like
http://My_hostname:5500/em
Or use the command ipconfig to see your IPV4 address and use that address
http://X.X.X.X:5500/em
Or you as well use localhost
http://localhost:5500/em
or 127.0.0.1 (loop back address) like
http://127.0.0.1:5500/em
See here for more information
Well, if you installed it on your local machine, you can always access it using localhost, so try https://localhost:5500/em.
The default port number for Enterprise Manager is indeed 5500.

Do we have to buy a domain to serve Bugzilla?

I tried putting my IP from whatismyip.com in the urlbase of Bugzilla but it did not work. I wasn't able to create a new account for my team mate, and he wasnt able to access the server by typing the my ip address in his browse. And surely, when I connect again, my IP address will change. Do we have to buy a www address to host Bugzilla?
You can setup a dynamic dns service, for example via http://www.dyndns.com or http://www.no-ip.com or http://freedns.afraid.org to solve the changing ip problem without buying a domain (or buying a domain as well, but it's not a requirement).
But the real problem is that your team mate cannot access the server via the current IP address which points to either a misconfiguration of the webserver (listening only on localhost?), to a firewall in between, or most likely, that port forwarding isn't set up in your router for requests coming to your external IP address to be forwarded to the machine where you have Bugzilla set up. Additionally, you must set the urlbase to your local IP address, not to the external IP address, as blak3r says.
Check http://www.portforward.com for instructions on how to do port forwarding. But don't forget that everything mentioned has to be working:
Web server listening to outside requests: This can be tested from the same internal network via the local network IP address (what you see typing in a command line console ipconfig in Windows and ifconfig in Linux). If you can connect from a different machine on the same network via the local IP address, this is solved.
Firewalls (in router and the webserver machine) accepting connections to the web server port: For firewalls in the web server, the same test as above covers it.
Port forwarding so the router forwards the requests received on the web server port to the web server machine: This gets tested in the same way as firewalls in the router, that is, you must have your friend (or yourself from the house of your friend) try to connect to the dyn dns name set up or to the external IP as reported by whatsmyip.org.
This is all assuming your test mate is not on your same network, if he is, just using the local IP address (shown via ipconfig or ifconfig) instead of the external IP address and making sure the first step is covered (web server listening to outside requests) should be enough and nothing else is needed!
You most likely do not have your port 80 forwarded to your machine which is the reason he cannot connect when using the IP that was returned from whatismyip.com.
Assuming you're on a windows box... do
Start->Run->cmd then type
ipconfig
If your address starts with 192...* or 10...* this is your Local Area Network (LAN) IP. If this is the case, then your isp provided you with a router. Look for a setting called port forwarding or "application setting" which allows you to forward all incoming traffic on your router to a particular IP address. Go into your router's configuration settings and make sure port 80 (and maybe 443 if you're using ssl are forwarded to your local ip).
The other problem you mentioned is you do not have a static IP. This is a common problem and no you do not need to buy an address. There are several sites which can provide you a free dynamic dns host. Try no-ip.org.

Resources