aMule Forum

English => en_Bugs => Topic started by: Coronas on February 11, 2006, 01:41:26 PM

Title: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Coronas on February 11, 2006, 01:41:26 PM
Hi,

since the 2006021x-tarball, amuled doesn't seem to accept connections from amuleweb or amulecmd.
Code: [Select]
/hdd > HOME=/hdd/aMule /hdd/aMule/amuled --version --I-am-scared-of-no-dangerous-code
amuled: OnInit - starting timer
aMuled CVS using  v2.6.2 (Snapshot: Sat Feb 11 07:01:57 CET 2006) (OS: Linux)
/hdd > HOME=/hdd/aMule /hdd/aMule/amuleweb --version
amuleweb CVS using  v2.6.2 (Snapshot: Sat Feb 11 07:01:57 CET 2006)
/hdd > tail /hdd/aMule/.aMule/logfile
2006-02-11 12:09:28: No valid servers to connect in serverlist found
2006-02-11 12:09:28: Read 0 Kad contacts
2006-02-11 12:09:28: General: CamuleDaemonApp::OnRun()
2006-02-11 12:09:29: ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.
2006-02-11 12:09:33: New external connection accepted
2006-02-11 12:09:33: Connecting client: aMuleweb CVS
2006-02-11 12:09:33: Invalid protocol version.( 2 != 512 )
2006-02-11 12:09:33: Unauthorized access attempt. Connection closed.
2006-02-11 12:09:47: Connected to Kad (firewalled)
2006-02-11 12:10:03: Connected to Kad (ok)
Last known-to-work version is the 20060209 tarball. In my setup I crosscompile amule on an i586 host for an embedded-ppc target. In order to generate src/libs/ec/ECVersion.h, I had to patch the Makefile to use the hosts' gcc to build the mkFileSum-util. Otherwise, the crosscompiler would have produced a mkFileSum-binary which would be difficult to use on the host ;)
cu
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Coronas on February 23, 2006, 08:14:28 PM
To narrow down the problem: it happened when GetInt16Data() was substituted for GetInt()
Code: [Select]
diff -Naur amule-cvs-20060209/src/ExternalConn.cpp amule-cvs-20060210/src/ExternalConn.cpp
--- amule-cvs-20060209/src/ExternalConn.cpp 2006-02-20 06:46:18.514844598 +0000
+++ amule-cvs-20060210/src/ExternalConn.cpp 2006-02-20 06:46:52.470076142 +0000
@@ -219,7 +219,7 @@
  response->AddTag(CECTag(EC_TAG_STRING, wxTRANSLATE("You cannot connect to a release version from an arbitrary CVS version! *sigh* possible crash prevented")));
 #endif
  } else if (protocol != NULL) {
- uint16 proto_version = protocol->GetInt16Data();
+ uint16 proto_version = protocol->GetInt();
  if (proto_version == EC_CURRENT_PROTOCOL_VERSION) {
  CMD4Hash passh;

The log says: Invalid protocol version. 2!=512

Any ideas?
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: stefanero on February 23, 2006, 10:53:15 PM
run the same day of amuled and amulecmd....
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Coronas on February 23, 2006, 10:59:28 PM
I presume that in one single cvs-tarball the versions should be compatible?!?
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Coronas on March 12, 2006, 12:05:46 PM
Still the same with todays' tarball :(
Code: [Select]
/hdd/aMule/.aMule > cat logfile
2006-03-12 10:59:05: ERROR: Warning Warning! You are running aMule as root.
Doing so is not recommended for security reasons,
and you are advised to run aMule as an normal
user instead.
2006-03-12 10:59:05: Creditfile loaded, 0 clients are known
2006-03-12 10:59:05: Loading server.met file: /hdd/aMule/.aMule/server.met
2006-03-12 10:59:05: 90 servers in server.met found
2006-03-12 10:59:05: No part files found
2006-03-12 10:59:05: *** TCP socket (ECServer) listening on 0.0.0.0:4712
2006-03-12 10:59:05: MuleUDPSocket: Created Server UDP-Socket at port 5665
2006-03-12 10:59:05: MuleUDPSocket: Created Client UDP-Socket at port 5672
2006-03-12 10:59:05: Found 0 known shared files
2006-03-12 10:59:05: Connecting
2006-03-12 10:59:05: Read 146 Kad contacts
2006-03-12 10:59:05: General: CamuleDaemonApp::OnRun()
2006-03-12 10:59:05: Loading IP-filters 'ipfilter.dat' and 'ipfilter_static.dat'.
2006-03-12 10:59:06: Connected to Kad (firewalled)
2006-03-12 10:59:09: Loaded 13103 IP-ranges from 'ipfilter.dat'. 0 malformed lines were discarded.
2006-03-12 10:59:09: Loaded 0 IP-ranges from 'ipfilter_static.dat'. 0 malformed lines were discarded.
2006-03-12 10:59:09: ThreadScheduler: Completed task 'Load IPFilter', 1 tasks remaining.
2006-03-12 10:59:09: ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.
2006-03-12 10:59:13: Connected to Kad (ok)
2006-03-12 10:59:26: New external connection accepted
2006-03-12 10:59:26: Connecting client: aMuleweb CVS
2006-03-12 10:59:26: Invalid protocol version.( 2 != 512 )
2006-03-12 10:59:26: Unauthorized access attempt. Connection closed.
/hdd/aMule/.aMule >
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: stefanero on March 12, 2006, 12:09:25 PM
006-03-12 10:59:26: Connecting client: aMuleweb CVS
2006-03-12 10:59:26: Invalid protocol version.( 2 != 512 )


^^you maybe have 2 amuleweb installed at teh same time?

its definelty a missmatch in EC-versions, which commes when you run snapshots or two amule version with each other
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: stefanero on March 12, 2006, 12:10:14 PM
as a hint, maybe start both from within the compiled src

cd src

./amuled

and

cd src/webserver/src/

./amuleweb
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Coronas on March 12, 2006, 01:08:56 PM
Hi,
Quote
Originally posted by stefanero

you maybe have 2 amuleweb installed at teh same time?
No, there's only one amuleweb installed.
Code: [Select]
/hdd/aMule/.aMule > ls -al /hdd/aMule
drwxr-xr-x    3 501      501          4096 Mar 12 10:56 .
drwxr-xr-x   12 root     root         4096 Mar 12 10:56 ..
drwxr-xr-x    5 501      501          4096 Mar 12 11:46 .aMule
-rwxr-xr-x    1 501      501        859844 Mar 12 09:57 amulecmd
-rwxr-xr-x    1 501      501       2869732 Mar 12 09:57 amuled
-rwxr-xr-x    1 501      501       1107400 Mar 12 09:57 amuleweb
-rwxr-xr-x    1 501      501         23868 Mar 12 09:57 ed2k
Quote
Originally posted by stefanero

its definelty a missmatch in EC-versions, which commes when you run snapshots or two amule version with each other
I just doublechecked the versions to be on the safe side:
Code: [Select]
/hdd/aMule/.aMule > /hdd/aMule/amuleweb --version
amuleweb CVS using  v2.6.2 (Snapshot: Sun Mar 12 07:02:01 CET 2006)
/hdd/aMule/.aMule > /hdd/aMule/amuled --version --only-chuck-norris-would-stop-me
amuled: OnInit - starting timer
aMuled CVS using  v2.6.2 (Snapshot: Sun Mar 12 07:02:01 CET 2006) (OS: Linux)
When starting amuled/amuleweb manually, amuled starts OK, but amuleweb seems to freeze with "Creating client..." as last output. It has to be termiated with CTRL+C
Code: [Select]
/hdd/aMule/.aMule > HOME=/hdd/aMule /hdd/aMule/amuleweb -v
looking for template: php-default
checking for directory '/hdd/aMule/.aMule/webserver'... yes
checking for directory '/hdd/aMule/.aMule/webserver/php-default'... yes
checking for file '/hdd/aMule/.aMule/webserver/php-default/login.html'... yes
*** Using template: /hdd/aMule/.aMule/webserver/php-default/aMule.tmpl
This is amuleweb CVS Sun Mar 12 07:02:01 CET 2006

Creating client...

I guess that the problem is be related either to a buggy cross-compile-environment (endianess-problem?) or the unification in the GetInt() functions which happened at that date in cvs. When doing the regression-test, I found that *all* versions prior to 20060210 worked fine. But as my programming/debugging skills are limited, I am unable to continue debugging without assistance...
cu
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: lfroen on March 12, 2006, 04:39:03 PM
Quote
I guess that the problem is be related either to a buggy cross-compile-environment (endianess-problem?)
You did not mentioned that you mixed platforms. If you did, please tell us how. Anyway, I will check the issue today.
Title: RE: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled
Post by: Coronas on March 12, 2006, 05:00:29 PM
Thanks lfroen :)

Quote
Originally posted by Coronas
...In my setup I crosscompile amule on an i586 host for an embedded-ppc target. In order to generate src/libs/ec/ECVersion.h, I had to patch the Makefile to use the hosts' gcc to build the mkFileSum-util...

What kind of information do you need regarding the crosscompilation?

wxbase-2.6.2 buildoptions:
--with-zlib=yes \
--with-expat=builtin \
--with-sdl-prefix=$(hostprefix)/lib \
--with-sdl-exec-prefix=$(hostprefix) \
--disable-shared \
--disable-optimise \
--disable-compat24 \
--enable-unicode \
--enable-largefile \
--disable-gtktest \
--disable-sdltest && \

amule buildoptions:
--disable-amulecmd \
--enable-webserver \
--enable-amule-daemon \
--disable-monolithic \
--disable-debug \
--disable-amule-gui \
--disable-cas \
--disable-wxcas \
--disable-alc \
--disable-alcc \
--with-libpng-prefix=$(targetprefix) \
--with-wx-prefix=$(targetprefix) \
--disable-nls && \

cu
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: lfroen on March 12, 2006, 07:33:33 PM
Ok, I must be missed word "crosscompiling" in original question. Regular compiled amule(cmd/web) works ok. I have access to ppc, so I can't really check that. Sorry
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: lionel77 on March 18, 2006, 11:59:37 PM
I can confirm the problem on a ppc Mac running OS X 10.3. I get exactly the same "Invalid protocol version.( 2 != 512 )" error message when I try to connect to aMule using amulecmd or amuleweb, even though aMule was compiled natively on that machine.

Given that so far only big endian archs seem to be affected, I wouldn't be surprised if this is really an endianness problem.

Is there anything we can do to help you fix this issue, lfroen?
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: lfroen on March 19, 2006, 10:40:29 AM
Quote
Is there anything we can do to help you fix this issue, lfroen?
I guess that buying me a Mac is not one of options ? :)
I will check endianness issue.
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Kry on March 19, 2006, 10:57:00 AM
I'll fix it.
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Kry on March 21, 2006, 05:38:06 AM
Fixed.
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Kry on March 21, 2006, 07:51:34 AM
But for today's tarball, apply THIS PATCH (http://www.amule.org/tarball_210306_ec.patch)
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: lfroen on March 21, 2006, 08:12:35 AM
Quote
2006-03-12 10:59:26: Invalid protocol version.( 2 != 512 )

Same issue reported on Mac forum. Looks like endiness problem.
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Kry on March 21, 2006, 08:40:48 AM
Dude, I said fixed.
Title: Re: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)
Post by: Coronas on March 21, 2006, 03:06:19 PM
Thanks!  :rolleyes: