aMule Forum

English => Multiplatform => Mac OSX => Topic started by: digitally drunken on April 07, 2006, 04:38:34 PM

Title: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: digitally drunken on April 07, 2006, 04:38:34 PM
Hey there:
for all, who have problems with amule, because it cant connect:
(cant find official-hostname... / error 22)

Here is the way to fix it:


1. starting the application "Terminal"
2. by type "hostname" you can find out, whats your hostname
3. type "sudo pico hostconfig" (opens hostconfig)
4. you have to type your password eventually
5. change the line "HOSTNAME=-AUTOMATIC-" to "HOSTNAME=myname" (if this line isnt already there, just write it...)
6. save (Ctrl-O) and close (Ctrl-X)

7. starting the application "NetInfo Manager"
8. go to "machines"
9. go to "localhost"
10. make shure, that this window is not locked (in the left bottom)
11. type "apple-D" for duplicating the "localhost"-entry
12. klick on the "localhost copy" entry
13. then choose the value for the field 'name'
14. here you have to type in the name that you have choosen in the "hostconfig" (in this example: "myname")
15. restart... and it wil work!

after this, amule is working pretty well and your hostname is not automatic given by your router, etc...

it is working pretty well at my computer (but i wont to give a garuantee for it)

and i hope, ich could help some people with this thread

good luck
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: lionel77 on April 13, 2006, 06:45:20 AM
I'm a little confused. I thought the "can't find official hostname" message was benign and could be safely ignored. But now you are saying that the message is accompanied by actual problems with connecting to clients/servers?

If that's really the case we should definitively try to find a solution that does not require a workaround using the Terminal.

Thanks by the way, for figuring this out. :)
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: digitally drunken on April 13, 2006, 10:00:54 AM
Yes, cause many people have this problem I think.
I, for example needed a lot of time to find this error! And especially since version 2.1.1 (where the error-message for the error 22 is disabled...) it ist a way harder to find the roots of the problem, your amule isnt connecting to any server. (I found a lot of people in different boards, all having the same problem)
But since this configuration everything is working fine!
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: lionel77 on April 13, 2006, 06:12:48 PM
Thanks a lot for the explanation. Looks like we definitively need to do something about this.

/me rubs his ken summoning lamp...
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: ken on April 16, 2006, 07:32:32 PM
Hmm.   I thought it was benign.  Unfortunately, I don't really have time to devote to figuring this out.

/me strikes his Kry-summoning gong
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: mindreaper on April 17, 2006, 12:36:02 PM
I've done everything just like you mention, and I still get the same error message (cannot get the official hostname. Error 22: invalid argument)

First I've looked for my hostname, which is telenetPC.
In the "hostconfig" window of terminal, I have typed HOSTNAME=telenetPC
And now everytime I open that window, it does say HOSTNAME=telenetPC

I've also done what you said in NetInfo Manager, and now in the list of machines I have one that appears under the name telenetPC.

So have I done anything wrong?
Title: RE: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: verdun1916 on July 25, 2006, 07:53:27 PM
Great work! Thank you sooo much! I searched so long, why aMule won't connect, I was getting crazy. With your help the Problem is fixed now! Thanks a lot!!!
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: mouloud on August 01, 2006, 03:37:57 PM
works fine for me (Mac OS 10.4.6 - amule 2.1.3) thanks !
Title: Simpler
Post by: obis on September 07, 2006, 05:01:01 AM
First off, for those who don't know, hostconfig is a file in /etc.

Second, you can do this in a more straightforward way (I think) by just:

1) Edit the /etc/hostconfig file. Look for the line starting with HOSTNAME and change it to HOSTNAME=mymac
You'll probably have to add the HOSTNAME line

2) Edit the /etc/hosts file. The first line should be "127.0.0.1 localhost". Add the same hostname you used above to the end of this line, "127.0.0.1 localhost mymac".

And finally, WTF? Why did the aMule developers suddenly stop respecting the hostname set by the system and require it to be set this way?
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: wuischke on September 07, 2006, 08:52:17 AM
Quote
And finally, WTF? Why did the aMule developers suddenly stop respecting the hostname set by the system and require it to be set this way?
*peep*
Visit wxwindows.org and blame them. ;)
Title: RE: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: BlackLeopard on September 16, 2006, 06:55:44 PM
I am trying to do what you are saying but nothing happens.  Is there another way to do it?
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: lionel77 on September 21, 2006, 03:31:01 AM
Quote
Originally posted by ken
/me strikes his Kry-summoning gong
I am starting to suspect that my ken-summoning lamb works better than your kry-summoning gong...
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: ken on September 24, 2006, 04:51:16 PM
If you're rubbing a lamb, well, that's just...  wrong.  :P
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: lionel77 on October 03, 2006, 01:31:23 PM
lol

Well...moving on...

I hope that we can get Kry interested in this issue once his moving situation is worked out, as there seem to be quite a number of users affected by it.
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: jochen on October 14, 2006, 12:56:05 PM
I found that this problem (can't connect to any server) appears when I assign a static IP and hostname via DHCP (static DHCP on my router). If I leave the hostname field on the router empty, amule works as normal.

Edit: it also works if you use a hostname with suffix ".local" in static DHCP hostnames.
Title: RE: Simpler
Post by: haero on January 25, 2007, 10:45:47 PM
Quote
Originally posted by obis
First off, for those who don't know, hostconfig is a file in /etc.

Second, you can do this in a more straightforward way (I think) by just:

1) Edit the /etc/hostconfig file. Look for the line starting with HOSTNAME and change it to HOSTNAME=mymac
You'll probably have to add the HOSTNAME line

2) Edit the /etc/hosts file. The first line should be "127.0.0.1 localhost". Add the same hostname you used above to the end of this line, "127.0.0.1 localhost mymac".

And finally, WTF? Why did the aMule developers suddenly stop respecting the hostname set by the system and require it to be set this way?

Hi, the solution proposed by the opener of the thread, didn't work for me. Can you please tell me where the /etc folder is?
I can't find it in my macintosh hd...
Thanks
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: skolnick on January 28, 2007, 04:03:57 AM
hmm...probably have nothing to do with it, but my build of aMule on solaris also says error 22 (can get hostname) but still works flawlessly...I don't get why this could be an issue on MacOS X... 8o

Regards.
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: pingu on January 29, 2007, 09:10:35 AM
thank you very much
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: haero on February 24, 2007, 01:22:34 AM
I still can't connect to any server, and I still get the same error.

I haven't been using Amule since january 23 because of this.
That day I changed the name of my mac from haero's computer to haerobook G4 in system preferences.

That's when the trouble started.

I've tried what's shown in this topic with no results.
Anyone with another solution?

Should rename my mac back to haero's computer?
Should I reinstall Amule?
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: haero on March 16, 2007, 12:23:02 PM
Hey y'all, big ups.

I still have this problem and I haven't been using amule since a looong time!

Can anyone please help?

Is it a bug in Amule?
It can't be a mac OS problem, as all the rest is ok, i mean, all of it.

Thanks.
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: bongo on March 16, 2007, 06:53:09 PM
Quote
That day I changed the name of my mac from haero's computer to haerobook G4 in system preferences.
That's when the trouble started.

perhaps silly but have you tried to rename your mac back from haerobook G4 to haero's computer ? if this is all that changed perhaps it's worth a try.
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: blackfede on February 26, 2008, 07:18:16 PM
Hi, the solution proposed by the opener of the thread, didn't work for me. Can you please tell me where the /etc folder is?
I can't find it in my macintosh hd...
Thanks

You must use Terminal, or by Finder press CMD+SHIFT+G, or by menu GO->Folder. Than type, in the box, /ect, and hit "Go"
Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: raftz on February 28, 2008, 07:17:23 PM
thanks!
finally it's working!

Title: Re: Fixing the serverproblem in aMule (cant get offical hostname...)
Post by: Ruddeger on May 13, 2008, 08:47:01 AM
I downloaded aMule a while back & have tried periodically to get it to work but have yet to connect to anything.
I've gone through the suggestions in this thread but still no luck.

I've modified my hostconfig file w/ my name ("John-Smiths-Computer.local") as suggested & have done he same w/ the host file.
I've created the local host copy in netinfo manager w/ myname as well.  It still won't connect to anything.

I've looked at unassigning a static ip & hostname via DHCP but can't figure out how to do this or if this is even an option under network in system preferences.  It has Configure IPv4: Using DHCP & returns an IP address which I can't modify or anything.  There are options to configure manually but I have a feeling that's not the way to go.

Can anyone help?  aMule just keeps cycling through the server list trying to connect & always timing out.
Any advice will be appreciated.
Thanks.