FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-29-2009, 12:07 PM
martin
 
Default IPv4 localhost network problem

Hi,

I have problem with IPv4 on my local network. Applications that is trying to
connect to localhost with IPv4 gets “connection refused”. I have constructed a
simple Java program that is triggering the problem. The program simple just
open a socket port and waiting for a connection.

Starting by doing the following:
$ java DummyServer 7000

When testing with telnet:
$ telnet -4 localhost 7000
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
$

By forcing with IPv6 is working:
$ telnet -6 localhost 7000
Trying ::1...
Connected to ip6-localhost.
Escape character is '^]'.
Connection closed by foreign host.
$

My /etc/hosts
127.0.0.1 localhost
127.0.1.1 gizmo

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

IPConfig:
$ /sbin/ifconfig
eth0 *hidden*

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:516 errors:0 dropped:0 overruns:0 frame:0
TX packets:516 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37316 (36.4 KiB) TX bytes:37316 (36.4 KiB)

IPTables:
$ sudo iptables --list
WARNING: All config files need .conf: /etc/modprobe.d/nvidia-kernel-nkc,
it will be ignored in a future release.
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

When running the iptables command, the kernel also output the following in
it's log:
[ 3456.030975] ip_tables: (C) 2000-2006 Netfilter Core Team


My /etc/network/interface file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp


Any ideas what can be wrong?

Martin
 
Old 12-29-2009, 12:26 PM
jeff dickison
 
Default IPv4 localhost network problem

On Dec 29, 2009, at 7:07 AM, martin <martin.juhlin@home.se> wrote:


Hi,

I have problem with IPv4 on my local network. Applications that is
trying to
connect to localhost with IPv4 gets “connection refused”. I have
constructed a
simple Java program that is triggering the problem. The program
simple just

N

Starting by doing the following:
$ java DummyServer 7000

When testing with telnet:
$ telnet -4 localhost 7000
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

$ telnet -6 localhost 7000
Trying ::1...
Connected to ip6-localhost.

Any ideas what can be wrong?

Martin
<DummyServer.java>


Hi Martin,
What's the output of:
sudo lsof -i:7000


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-29-2009, 12:36 PM
martin
 
Default IPv4 localhost network problem

On Tuesday 29 December 2009 14.26.51 jeff dickison wrote:
> On Dec 29, 2009, at 7:07 AM, martin <martin.juhlin@home.se> wrote:
> > Hi,
> >
> > I have problem with IPv4 on my local network. Applications that is
> > trying to
> > connect to localhost with IPv4 gets “connection refused”. I have
> > constructed a
> > simple Java program that is triggering the problem. The program
> > simple just
> > N
> >
> > Starting by doing the following:
> > $ java DummyServer 7000
> >
> > When testing with telnet:
> > $ telnet -4 localhost 7000
> > Trying 127.0.0.1...
> > telnet: Unable to connect to remote host: Connection refused
> >
> > $ telnet -6 localhost 7000
> > Trying ::1...
> > Connected to ip6-localhost.
> >
> > Any ideas what can be wrong?
> >
> > Martin
> > <DummyServer.java>
>
> Hi Martin,
> What's the output of:
> sudo lsof -i:7000
>

The output is as following:

$ sudo lsof -i:7000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 6130 martin 4u IPv6 66197 0t0 TCP *:afs3-fileserver(LISTEN)
$

Martin


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-29-2009, 01:00 PM
Joost Kraaijeveld
 
Default IPv4 localhost network problem

Could it be this (from the AMD64 list)?

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560238

Workaround:

/etc/sysctl.d/bindv6only.conf

-> net.ipv6.bindv6only = 0

See also Thread "Java Anwendungen - keine Netzwerk/Internetverbindung
mehr" in the german debuan-users list.


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-29-2009, 01:01 PM
jeff d
 
Default IPv4 localhost network problem

Sent from my coffee machine

On Dec 29, 2009, at 7:36 AM, martin <martin.juhlin@home.se> wrote:


On Tuesday 29 December 2009 14.26.51 jeff dickison wrote:

On Dec 29, 2009, at 7:07 AM, martin <martin.juhlin@home.se> wrote:

Hi,

I have problem with IPv4 on my local network. Applications that is
trying to
connect to localhost with IPv4 gets “connection refused”. I have
constructed a
simple Java program that is triggering the problem. The program
simple just
N

Starting by doing the following:
$ java DummyServer 7000

When testing with telnet:
$ telnet -4 localhost 7000
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

$ telnet -6 localhost 7000
Trying ::1...
Connected to ip6-localhost.

Any ideas what can be wrong?

Martin
<DummyServer.java>


Hi Martin,
What's the output of:
sudo lsof -i:7000



The output is as following:

$ sudo lsof -i:7000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 6130 martin 4u IPv6 66197 0t0 TCP *:afs3-
fileserver(LISTEN)

$

Martin


So, this shows us its only listening on ipv6 and not on ipv4. Just a
guess, but I would suspect that there might be an issue with the java
app. Are you seeing this issue with other apps?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-29-2009, 01:25 PM
martin
 
Default IPv4 localhost network problem

On Tuesday 29 December 2009 15.00.36 Joost Kraaijeveld wrote:
> Could it be this (from the AMD64 list)?
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560238
>
> Workaround:
>
> /etc/sysctl.d/bindv6only.conf
>
> -> net.ipv6.bindv6only = 0
>
> See also Thread "Java Anwendungen - keine Netzwerk/Internetverbindung
> mehr" in the german debuan-users list.
>

Yes, that solved my problem. Thank!

Martin


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-29-2009, 01:37 PM
martin
 
Default IPv4 localhost network problem

On Tuesday 29 December 2009 15.01.29 jeff d wrote:
> Sent from my coffee machine
>
> On Dec 29, 2009, at 7:36 AM, martin <martin.juhlin@home.se> wrote:
> > On Tuesday 29 December 2009 14.26.51 jeff dickison wrote:
> >> On Dec 29, 2009, at 7:07 AM, martin <martin.juhlin@home.se> wrote:
> >>> Hi,
> >>>
> >>> I have problem with IPv4 on my local network. Applications that is
> >>> trying to
> >>> connect to localhost with IPv4 gets “connection refused”. I have
> >>> constructed a
> >>> simple Java program that is triggering the problem. The program
> >>> simple just
> >>> N
> >>
> >> Hi Martin,
> >> What's the output of:
> >> sudo lsof -i:7000
> >
> > The output is as following:
> >
> > $ sudo lsof -i:7000
> > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> > java 6130 martin 4u IPv6 66197 0t0 TCP *:afs3-
> > fileserver(LISTEN)
> > $
> >
> > Martin
>
> So, this shows us its only listening on ipv6 and not on ipv4. Just a
> guess, but I would suspect that there might be an issue with the java
> app. Are you seeing this issue with other apps?
>

yes, ktorrent performs poorly. it also just listen on one port. After changed
"net.ipv6.bindv6only = 0" the is a lot more connections open.

Martin


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-29-2009, 06:59 PM
Tom H
 
Default IPv4 localhost network problem

> I have problem with IPv4 on my local network. Applications that is trying to
> connect to localhost with IPv4 gets “connection refused”. I have constructed a
> simple Java program that is triggering the problem. The program simple just
> open a socket port and waiting for a connection.
> Starting by doing the following:
> $ java DummyServer 7000

I had a colleague a few weeks ago who was pissed off after spending
what seemed like an entire day troubleshooting a problem only to find
out that the latest JDK defaults to ipv6-only. I am no longer at that
company to be able to look up his resolution, sorry.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org