Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Dec 26, 2008 7:43 pm 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
Maybe someone can clear this mystery up.

I am running SuSe 11.1 and am testing out an Exim config, and wanted to confirm everything. I ran "telnet localhost 25" and got "trying 127.0.0.1...." and it just sits there. My local carrier seems to block outbound 25 so i knew testing from home was a waste.

I have already received mail form the system so I know it is working but I am troubled that I cannot telnet locally. I also want to be sure it will accept incoming mail before I move the domain dns over.

* I have tried without a firewall installed
* I have confirmed exim is set up on 25 and 587 (using daemon_smtp_ports = 25 : 587) I have been able to telenet in from home on port 587.
* Exim hostlist contains 127.0.0.1
* Telnet doesn't seem to want to work for anything local!

Anyway if I am missing something please let me know. I have been running SuSE 10x servers for work and at home without any issue so I am a little baffled.

As an aside I did remove the default SuSE firewall and am using Firehol, but as I mentioned above even without a firewall installed localhost telnet doesn't seem to work.

Thanks in advance!


Last edited by Bedevere on Tue Dec 30, 2008 11:28 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Dec 26, 2008 7:52 pm 
Offline
Senior Member

Joined: Wed Feb 13, 2008 2:40 pm
Posts: 126
post the output of the following (run as root)

/sbin/ifconfig -a
netstat -anp |grep " LISTEN "
grep "^[^#]" /etc/hosts


Top
   
 Post subject:
PostPosted: Sat Dec 27, 2008 3:26 am 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
First I hope you dont mind I Xed out my IP. Secondly I noticed that in my hosts has my IP as "server1.oi-guild.com" but I havn't moved my domain over yet. Should I make that the default Linode DNS entry (The members.linode.com one)?

Code:
server1:~ # /sbin/ifconfig -a
dummy0    Link encap:Ethernet  HWaddr 1E:0E:F8:67:6D:A7
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr FE:FD:CF:C0:46:9E
          inet addr:XXX.XXX.XXX.XXX  Bcast:XXX.XXX.XXX.XXX  Mask:255.255.255.0
          inet6 addr: fe80::fcfd:cfff:fec0:469e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3212 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2427 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:825890 (806.5 Kb)  TX bytes:2044446 (1.9 Mb)

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-3A-34-36-39-00-00-00-00-00-00-00-00
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1460  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback
          LOOPBACK  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

teql0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

tunl0     Link encap:IPIP Tunnel  HWaddr
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


server1:~ # netstat -anp |grep " LISTEN "
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      3448/exim
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      3602/vsftpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4574/sshd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      3448/exim
tcp        0      0 :::587                  :::*                    LISTEN      3448/exim
tcp        0      0 :::80                   :::*                    LISTEN      3582/httpd2-prefork
tcp        0      0 :::22                   :::*                    LISTEN      4574/sshd
tcp        0      0 :::25                   :::*                    LISTEN      3448/exim

server1:~ # grep "^[^#]" /etc/hosts
127.0.0.1       localhost
::1             localhost ipv6-localhost ipv6-loopback
fe00::0         ipv6-localnet
ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
XXX.XXX.XXX.XXX  server1.oi-guild.com server1



Top
   
 Post subject:
PostPosted: Sat Dec 27, 2008 10:31 am 
Offline
Senior Member

Joined: Wed Feb 13, 2008 2:40 pm
Posts: 126
Ok, that confirms that exim is listening on all available addresses (ipv4 and v6) on ports 25 and 587. Try:
Code:
ifup lo

then restarting exim, and try telnet again. You're missing a key line, here's part of mine:
Code:
alucard@thrawn:~$ /sbin/ifconfig lo
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          [snip]


The name in /etc/hosts shouldn't matter unless you need to use the old server1.oi-guild.com from this Linode.


Top
   
 Post subject: Other reasons
PostPosted: Sat Dec 27, 2008 5:13 pm 
Offline
Senior Member
User avatar

Joined: Thu Mar 06, 2008 12:21 am
Posts: 59
There's a lot of reasons why you can't connect to a port even though it's showing as listening. Some other areas to check besides what's been already mentioned are /etc/hosts.deny and any firewall rules (iptables -L -n)

Also check your /var/log/messages and secure files for hints.


Top
   
 Post subject:
PostPosted: Sat Dec 27, 2008 11:27 pm 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
ifup gets me:
Code:
server1:~ # ifup lo
    lo
RTNETLINK answers: Invalid argument
Cannot enable interface lo.
interface lo is not up


Guess that explains part of it.

I have been letting Linode manage my IP via dhcp and have not set my address to static, which I guess I should.

/etc/hosts.deny:
http-rman : ALL EXCEPT LOCAL

/etc/hosts.allow is completely remarked out.



/var/log/warn had this:
Dec 27 21:55:37 server1 ifup: Cannot enable interface lo.
Dec 27 21:55:37 server1 ifup-route: interface lo is not up
Dec 27 21:55:51 server1 ifup: Cannot enable interface lo.
Dec 27 21:55:51 server1 ifup-route: interface lo is not up

I think we have a problem....


Top
   
 Post subject: ifcfg-lo
PostPosted: Sun Dec 28, 2008 9:27 am 
Offline
Senior Member
User avatar

Joined: Thu Mar 06, 2008 12:21 am
Posts: 59
Do you have an ifcfg-lo file somewhere? On my distro (Centos) it's in /etc/sysconfig/network-scripts. If so, what is in it? Mine says...

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

On my ubuntu install at home it has a file /etc/network/interfaces and it contains this...

auto lo
iface lo inet loopback


Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 11:13 am 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
Code:
ifcfg-lo:

# Loopback (lo) configuration
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
BROADCAST=127.255.255.255
IPADDR_2=127.0.0.2/8
STARTMODE=onboot
USERCONTROL=no
FIREWALL=no


Code:
ifcfg-eth0:

BOOTPROTO='dhcp'
STARTMODE='auto'
NAME=''
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NETWORK=''
REMOTE_IPADDR=''
USERCONTROL='no'
NETMASK=''


I have tried to set my static address to the settings I see in my control panel but I get an error on the netmask onm reboot...then its back to the ajax console...and I need to reset the character set because that screen isn't easy.

I am confised as to why "IPADDR_2=127.0.0.2/8" i in there....

Also should I have a "NAME=loopback" in the ifcfg-lo? I thought Name was an optional field.


Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 11:16 am 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
I am seeing soemthing about the ifroute-lo file that one might need to put "127/8" in it.

Any thoughts on that?


EDIT: Ignore this - I have that already...


To add tot he mystery mySQL is connecting via localhost fine. So it may be purely a telnet issue?


Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 11:40 am 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
OK seems lo is not coming up:

Code:
FireHOL: Saving your old firewall to a temporary file: OK
FireHOL: Processing file /etc/firehol/firehol.conf: OK
FireHOL: Activating new firewall (355 rules): OK
Setting up network interfaces:
    lo
RTNETLINK answers: Invalid argument
Cannot enable interface lo.
interface lo is not up                                               failed
    eth0
RTNETLINK answers: Invalid argument
    eth0      (DHCP) . . IP/Netmask: 'xxx.xxx.xxx.xxx' / '255.255.255.0' ('lixx-xxx')
RTNETLINK answers: Invalid argument
Cannot enable interface eth0.                                        failed
    gre0
              No configuration found for gre0                        unused
    ip6tnl0
              No configuration found for ip6tnl0                     unused
    teql0
              No configuration found for teql0                       unused
    tunl0
              No configuration found for tunl0                       unused
    eth0
    eth0      DHCP client (dhcpcd) is running
    eth0      IP address: XXX.XXX.XXX.XXX/24                          done
Setting up service network  .  .  .  .  .  .  .  .  .  .  .  .  .  . done.
Starting vsftpd                                                      done
Starting CRON daemon                                                 done
Starting SSH daemon                                                  done
Starting service xdm                                                 unused
Initializing SMTP port (exim)                                        done
Starting service MySQL                                               done
Starting httpd2 (prefork)                                            done
Master Resource Control: runlevel 5 has been                         reached
Skipped services in runlevel 5:                                acpid xdm


Welcome to openSUSE 11.0 (i586) - Kernel 2.6.18.8-linode10 (tty1).


(note: Xs are mine)
Now what seems odd is if eth0 is not up how am I connecting?


Last edited by Bedevere on Mon Dec 29, 2008 3:26 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 12:20 pm 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
try bringing up lo by hand:
Code:
ifconfig lo 127.0.0.1 netmask 255.0.0.0

see if its a real problem, or overcomplicated do everything including cleaning the kitchen sink distro networking scripts


Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 6:07 pm 
Offline
Senior Member
User avatar

Joined: Tue Aug 17, 2004 11:37 pm
Posts: 262
Website: http://www.our-lan.com
WLM: nf@our-lan.com
Location: Brisbane, Australia
When you said you can connect to mysql on localhost, are you typing "localhost" or "127.0.0.1" ?

If you use "localhost", it will connect via Unix Sockets, rather then via the Loop back adapter, where as if you use 127.0.0.1 it connects via TCP..

_________________
ServerAdmin - www.our-lan.com
"Diplomacy is the art of saying nice doggy whilst looking for a really big stick"
"In my experiece, any attempt to make any system idiot proof will only challenge God to make a better idiot"


Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 10:08 pm 
Offline
Senior Newbie

Joined: Fri Dec 26, 2008 7:22 pm
Posts: 19
Website: http://oi-guild.com
Yahoo Messenger: Godofwarny
AOL: godofwarny
Location: NYC
mwalling wrote:
try bringing up lo by hand:
Code:
ifconfig lo 127.0.0.1 netmask 255.0.0.0

see if its a real problem, or overcomplicated do everything including cleaning the kitchen sink distro networking scripts


This worked!

I was able to telnet localhost after I ran that....so how to fix it?


Top
   
 Post subject:
PostPosted: Sun Dec 28, 2008 11:02 pm 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
well, somethings screwed up somewhere in your distro's configs. using ifconfig to bring it up is really a band-aid... you should see what is broken and fix it.


Top
   
 Post subject:
PostPosted: Mon Dec 29, 2008 2:26 am 
Offline
Newbie

Joined: Mon Dec 29, 2008 1:56 am
Posts: 3
I am seeing the same behavior on recent SUSE 11.0 linode distribution load.

By setting
Code:
# grep DEBUG /etc/sysconfig/network/config
DEBUG="yes"

I was able to get a bit more details out of 'ifup'

Code:
# ifup lo -o rc onboot
lo -o rc onboot

lo
lo lo -o rc onboot
unknown option rc ignored
'lo' is not wireless, exiting
RTNETLINK answers: Invalid argument
Cannot enable interface lo.
lo lo -o rc onboot
interface lo is not up
lo lo -o rc onboot
unknown option rc
No services to handle for 'lo lo'
executing additional global start script if-up.d/60-dhcp6c
executing additional global start script if-up.d/SuSEfirewall2
executing additional global start script if-up.d/freeswan


(the parameters on 'ifup' are as it is called in /etc/init.d/network)

Some how it seems to want to go into a section that is trying to set wireless parameters and errors out. I am plugging away trying to trace this down, but my ability to read shell scrips as complex as 'ifup' is a little weak. So the going is rather slow. Anyone with a suggestion on where to look would be welcome.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group