Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   Development Open Discussion (https://www.gnutellaforums.com/development-open-discussion/)
-   -   Outgoing connections bug? (https://www.gnutellaforums.com/development-open-discussion/98645-outgoing-connections-bug.html)

ToNneTje June 7th, 2011 05:55 AM

Outgoing connections bug?
 
ONLY after starting my Phex-client there are outgoing connections... after that i ONLY have incoming connections.
Even if i have a lot less connections than i have filled in at my Phex settings, there will be NO more outgoing connections... just incoming...

I'm using the latest SVN version under Ubuntu 11.04, trying OpenJDK 6 Runtime + Sun java 6 Runtime, both the same result.

GregorK June 7th, 2011 11:49 PM

Is there anything recent in your error log?

ToNneTje June 8th, 2011 05:01 AM

This is the most recent log:

Quote:

110608 13:46:46.017(T5)(116) ERROR/phex.common.ThreadTracking [Timer-0]:: Uncaught exception: org/bouncycastle/openpgp/PGPException in Thread: Timer-0
java.lang.NoClassDefFoundError: org/bouncycastle/openpgp/PGPException
at phex.gui.common.GUIRegistry*****run(GUIRegistry.ja va:169) [phex.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:534) [na:1.6.0_22]
at java.util.TimerThread.run(Timer.java:484) [na:1.6.0_22]
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.openpgp.PGPException
at java.net.URLClassLoader*****run(URLClassLoader.jav a:217) [na:1.6.0_22]
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0_22]
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205) [na:1.6.0_22]
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21) [na:1.6.0_22]
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294) [na:1.6.0_22]
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66) [na:1.6.0_22]
... 3 common frames omitted
110608 13:49:51.956(T9)(116) ERROR/phex.common.ThreadTracking [Timer-0]:: Uncaught exception: org/bouncycastle/openpgp/PGPException in Thread: Timer-0
java.lang.NoClassDefFoundError: org/bouncycastle/openpgp/PGPException
at phex.gui.common.GUIRegistry*****run(GUIRegistry.ja va:169) [phex.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:534) [na:1.6.0_22]
at java.util.TimerThread.run(Timer.java:484) [na:1.6.0_22]
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.openpgp.PGPException
at java.net.URLClassLoader*****run(URLClassLoader.jav a:217) [na:1.6.0_22]
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0_22]
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205) [na:1.6.0_22]
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21) [na:1.6.0_22]
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294) [na:1.6.0_22]
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66) [na:1.6.0_22]
... 3 common frames omitted
110608 14:00:40.137(T648190)(116) ERROR/phex.common.QueryRoutingTable [TriggerQueryRoutingTableUpdate-PhexPool-thread-13]:: Aggregate source is null: 16384/65536
110608 14:00:40.156(T648209)(116) ERROR/phex.common.JThreadPool [TriggerQueryRoutingTableUpdate-PhexPool-thread-13]:: java.lang.NullPointerException
java.lang.NullPointerException
at java.util.BitSet.or(BitSet.java:701) [na:1.6.0_22]
at phex.common.QueryRoutingTable.aggregateToRouteTabl e(QueryRoutingTable.java:200) [phex.jar:na]
at phex.common.QueryRoutingTable.fillQRTWithLeaves(Qu eryRoutingTable.java:624) [phex.jar:na]
at phex.msghandling.MessageService$QRPUpdateTimer.sen dQueryRoutingTable(MessageService.java:579) [phex.jar:na]
at phex.msghandling.MessageService$QRPUpdateTimer.run (MessageService.java:528) [phex.jar:na]
at phex.common.JThreadPool$NamedThreadRunnable.run(JT hreadPool.java:111) [phex.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110) [na:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603) [na:1.6.0_22]
at java.lang.Thread.run(Thread.java:679) [na:1.6.0_22]

Lord of the Rings June 8th, 2011 10:43 AM

oops apologies, seems the forum censor has does some damage to the error log listing. Does that make things difficult to see which java errors they are?

GregorK June 8th, 2011 11:55 AM

no.. as far as i can see and understand the errors are generated in 2008.. so they are not related...

ToNneTje June 8th, 2011 01:16 PM

Quote:

Originally Posted by GregorK (Post 363707)
no.. as far as i can see and understand the errors are generated in 2008.. so they are not related...

110608 -> 2011-06-08 ?

I copy and paste from the logfile of today so this log is recent ;)

Lord of the Rings June 8th, 2011 02:31 PM

If the censor does the same thing again, you could upload & attach the log file as a text document instead.

ToNneTje June 8th, 2011 02:54 PM

Thanks Lord, i will do that next time ;-)

ToNneTje June 8th, 2011 05:18 PM

I tried the latest stable version (3.4.2.116) and that version is working, the outgoing connections keeps working!

So i think it's probably the SVN version that has this "bug" (on 2 pc's, both using Ubuntu 11.04) OR it's an Linux related bug (?)
Since compiling of the latest SVN is working without any errors, i doubt if that can be the reason that outgoing connections stops working...

GregorK June 8th, 2011 11:37 PM

Uhh.. I guess you are right with the date... sorry..
The error log show two problems from a failed update signature check and a third problem which is a strange race condition that occurs some times. I haven't found the reason for it yet, but its uncritical.

If you like to check more deeply why outgoing connections don't work, the problem most likely is in the inner class HostManager.HostCheckTimer. The class runs every 2 seconds and calculates and triggers in method doAutoConnectCheck() the number of outgoing connections.
Maybe you can find something there, by adding some debug output.

Gregor

ToNneTje June 15th, 2011 05:35 AM

Where can i find "HostManager.HostCheckTimer" do i need to install some extra software for viewing or editting this? Yesterday i installed Eclipse, don't know if i need anything more... i'm not a developer so for me it's not a daily thing (but i'm curious enough to try new things) ;-)

Anyway, when Phex (svn version) after a while don't do outgoing connections anymore, i still get incoming connections all the time because i'm always Ultrapeer.
For Phex leafs it can be a problem, they only have outgoing connections, if Phex stops doing outgoing connections, they aren't connected to the network anymore.

GregorK June 15th, 2011 06:04 AM

Look at the SVN file:
phex\src\main\java\phex\host\HostManager.java

The variable outConnectCount in line 281 defines the number of outgoing connection that will be opened. Apparently its 0 or below for you. It would be interesting to find out why.

You could add some debug output to the code. The easiest way would be something like this:

Before line 283 add:
Code:

System.out.println( outConnectCount
    + " -mc " + missingCount
    + " -ctc " + currentTryCount
    + " -ahc " + allHostCount
    + " -ehc " + errorHostCount
    + " -tc " + totalCount
    + " -ul " + upperLimit
);

After changing you need to build Phex again.

When you start Phex from a console window is should write about every 2 seconds a line showing you some numbers used to calculate the outgoing connection attempts.
It would be nice to see if either this output suddenly stops or if one of the values is incorrect and prevents further outgoing connections.

Gregor

GregorK June 22nd, 2011 03:06 AM

I found the problem of this issue. It is fixed in SVN.

ToNneTje June 22nd, 2011 06:18 AM

Thanks Gregor :super:

ToNneTje June 22nd, 2011 06:51 AM

Update: Outgoing connections works perfect now :D


All times are GMT -7. The time now is 02:11 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.