LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 03-21-2008, 07:39 PM   #1
dabeeler
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Rep: Reputation: 0
Connection refused on TCP port


I have set my informix database server to listen to port 4725/tcp in the /etc/services file. SELinux is disabled. No other dameon is using this port. I can telnet to "localhost 4725" but when I try it from another PC in the office the connection is refused. The PC is in the /etc/hosts, hosts.allow and also put it in hosts.equiv. Also made sure it was not in hosts.deny. I ran "netstat -pantu | grep LISTEN" and saw "tcp 0 0 127.0.0.1:4725 0.0.0.0:* LISTEN 3625/sqlexced" along with other stuff. I can telnet to port 22 from the remote PC.

Any ideas on how to resolve this problem will be greatly appreciated.

Thanks,
David
 
Old 03-22-2008, 08:33 AM   #2
mechdave
Member
 
Registered: Apr 2007
Location: Adelaide, Australia
Distribution: Ubuntu 8.10 and 7.10 server
Posts: 95

Rep: Reputation: 15
Maybe a firewall is stopping the connection?
 
Old 03-22-2008, 11:14 AM   #3
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Code:
tcp 0 0 127.0.0.1:4725 0.0.0.0:* LISTEN
From what you've provided it appears that the service is only listening on the localhost and/or not the local network interface, that's why connections work from localhost and not the network.

I don't use Informix, but doing some research I think you need to check your /etc/hosts file. Make sure your network interface IP address (i.e. not 127.0.0.1) with FQDN hostname is listed in /etc/hosts. You can have 127.0.0.1, but make sure it only shows with the localhost name.
Code:
127.0.0.1  localhost
1.2.3.4  hostname.domain.tld  hostname
Also check your sqlhosts file to make sure the server hostname is listed.

Configuring Client/Server for IBM Informix products on Unix and Linux
http://www-1.ibm.com/support/docview...n&rss=ct631db2

How to install and use Informix CLI with Informix SE on Linux
http://www.iiug.org/library/linux/Ho...ormix_CLI.html

Product Review Informix on Linux
http://www.linuxjournal.com/files/li...10/3110s1.html

I hope that helps.
 
Old 03-23-2008, 03:57 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
No it is not the firewall, it is because infomix is binding to the localhost, this means you cannot access it over the network only from the machine itself, if you want to access it over the network you need to change the configuration to get it to listen to all addresses.
 
Old 03-23-2008, 07:21 AM   #5
dabeeler
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the heads up. I went back and checked the hosts file again and believe that was where the problem was. I made a change and the service is now binding itself to the servers ipaddress at the correct port, not localhost as before. I can now get a telnet connection to the port that was refusing the connection before. I am now moving on to another problem that I will start a new thread on.

Thanks again,
David
 
Old 04-29-2008, 02:01 PM   #6
rbfthomas
LQ Newbie
 
Registered: Dec 2006
Distribution: CentOS 4
Posts: 2

Rep: Reputation: 0
Thanks for the hint! I was having trouble getting IBM's Design Studio to connect to an Informix 10.0.UC5 database running on Centos 4 so I could crossload data into a DB2 Data Warehouse Edition (now "InfoSphere Warehouse") database. I could connect from the Design Studio installation on the Informix server, but from the workstations (Win XP and Centos 4) I kept getting a jdbc "InvocationTargetException" error. I chased around for a day thinking it was jdbc, but a tech put me onto the fact that nothing was listening at the port (nmap helped me with that). That led me to this thread, and making the appropriate entry in the /etc/hosts file on the Informix server solved it! Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connection refused, tcp betwee client and server on different pc on same lan JoeyWong Linux - Networking 1 05-14-2006 02:14 AM
Connection refused error for port 25 jgnasser Linux - Networking 3 08-25-2004 07:09 AM
SSH port...Connection....refused?? Miyamoto Mandriva 6 08-26-2003 04:03 PM
port 22: connection refused lkalman Linux - Networking 13 06-17-2003 07:55 PM
Connection Refused on port 9240 Rustiy Linux - Networking 2 04-22-2003 09:48 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration