1

I've installed an Oracle 11g XE on a Linux Fedora machine, successfully created a user, and imported a database into it.

My ultimate goal here is to connect an existing PHP website (also residing on the machine) via OCI8 and MDB2, but I'm having problems doing that (despite the local trial noted below) - so, I'm taking things one small step at a time.

I wanted to test the connection, see if there are any problems there, before moving on to more complex solutions.

  • Using the Linux machine itself, I tried logging on to the Oracle database via SQLPLUS in the command line. This works fine.

  • Using a Windows-based PC, via Oracle SQL developer, however, returned the following error:

    Status: Failure -Test failed: IO Error: The network adapter could not establish the connection.

    Which doesn't tell me much. I can ping the Linux machine from Windows, but using telnet and specifying the port (1521) returns the following error:

    Could not open connection to host, on port 1521: Connection failed.

So I'm assuming something is wrong with my Oracle Setup.

What else could I check or do to resolve this?

Thanks.

EDIT: Additional details:

Here's what I'm using to connect to the Linux machine:

enter image description here

Pretty standard stuff (default port: 1521, SID: xe) so far.

I also recently installed SQL Developer on said Linux server, and tried connecting. Connection successful, no issues so far.

  • Any firewalls on your Oracle server? – Burhan Khalid Feb 17 '14 at 7:02
  • I typed in service iptables stop just to be sure, but that didn't change anything. – zack_falcon Feb 17 '14 at 7:53
  • Can you paste the output of lsnrctl start? – Burhan Khalid Feb 17 '14 at 9:07
  • TNS-01106: Listener using listener name LISTENER already started – zack_falcon Feb 17 '14 at 9:57
1

When you use sqlplus from the host machine, sqlplus uses IPC communication. When you try to connect to the Oracle instance remotely, you will use tnslistener. IS your listener running?

lsnrctl status

If yes, then maybe it's your firewall. Turn off the built-in firewall and try again

/etc/init.d/iptables stop
  • Yes, lsnrctl is running (instance XE, status READY, has 1 handlers for this device). As for the firewall, that latter command returns No such file or directory. – zack_falcon Feb 17 '14 at 6:29
  • maybe it's 'service iptables stop' run by root – David Lakatos Feb 17 '14 at 6:32
  • I stopped the service (thanks for that command), but it didn't work. – zack_falcon Feb 17 '14 at 6:47
  • Are you sure the SID is xe? Is the SID xe enlisted when you issue the command lsnrctl status <LISTENERNAME>? – David Lakatos Feb 17 '14 at 8:11
  • It's service, actually. Default service. Service XE has 1 instance, status ready. To tell you the truth, I'm not too well versed in Oracle stuff. – zack_falcon Feb 17 '14 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.