aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled (2 != 512)  (Read 6619 times)

Coronas

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 48

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
« Last Edit: March 19, 2006, 09:32:32 AM by Coronas »
Logged

Coronas

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 48

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?
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235

run the same day of amuled and amulecmd....
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Coronas

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 48

I presume that in one single cvs-tarball the versions should be compatible?!?
Logged

Coronas

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 48

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 >
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235

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
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235

as a hint, maybe start both from within the compiled src

cd src

./amuled

and

cd src/webserver/src/

./amuleweb
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Coronas

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 48

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
Logged

lfroen

  • Guest

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.
Logged

Coronas

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 48
RE: amule-cvs: impossible for amuleweb/amulecmd to connect to amuled
« Reply #9 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
Logged

lfroen

  • Guest

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
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)

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?
Logged
Current aMule CVS builds for OS X can be found here.

lfroen

  • Guest

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.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795

I'll fix it.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795

Fixed.
Logged
Pages: [1] 2