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: "cannot find hostname"  (Read 16138 times)

Gomaaz

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 58
  • I want you to leave me alone...
"cannot find hostname"
« on: October 04, 2005, 02:35:42 PM »

hi guys,

I just receive 2 errormessages from amule every startup

looks like this:





I just talked to Ken and his statement was to give the machine a hostname....just one prob....the machine already got a hostname (I guess...so how can I checkit?)

so I don't know how to continue solvin the prob ?! Any Ideas :/

Im now running a CVS version recommed by lionel and before it was the official 2.0.3 release...both the same prob
Logged
Set UL-speed more higher than 10 kB/sec!! Remember:

You only get what you give  8)

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: "cannot find hostname"
« Reply #1 on: October 05, 2005, 05:53:00 AM »

Hmm.  I get my hostname from the DHCP server on the LAN.  I'm not sure what your options are if you don't (if, for instance, your DHCP server belongs to your ISP and they aren't giving your host a name).

There's the "hostname" command, so you could do "sudo hostname yourhostnamehere" in the Terminal, but I don't know if that's permanent or not.  I also think it won't work well because, if I remember the wx code involved correctly, wx really wants it to be fully-qualified like yourhost.yourdomain.co.de or whatever.  And, that won't work to get your local IP (aMule's ultimate goal) because it's not really a registered DNS name.

Frankly, I think it's a bug in our aMule code that we're using the wx functions that we are.

P.S.  Oooooh, shiny!  ;)
Logged

Gomaaz

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 58
  • I want you to leave me alone...
Re: "cannot find hostname"
« Reply #2 on: October 23, 2005, 02:08:27 PM »

hey ken....many thanks...:P

your answer wasn't quite understandable but I think I just know what you're meaning

from my provider I got a dns-server which I just entered in the network settings of mac os x

after that I found the domain NAME for the SERVER which I entered in network settings

so there wasn't any solving effect so I got your typ with "sudo hostname yourhostnamehere"

I entered in Terminal : "sudo hostname mydnsdomain"

and now Amule keeps quite :D

many thx
Logged
Set UL-speed more higher than 10 kB/sec!! Remember:

You only get what you give  8)

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: "cannot find hostname"
« Reply #3 on: October 23, 2005, 09:23:23 PM »

I'm glad that helped.  :)

Is it permanent across reboots?
Logged

Gomaaz

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 58
  • I want you to leave me alone...
Re: "cannot find hostname"
« Reply #4 on: October 24, 2005, 07:24:35 AM »

no it's not permanent...I have to reenter :/

how can I make it permanent?
« Last Edit: October 24, 2005, 07:25:51 AM by Gomaaz »
Logged
Set UL-speed more higher than 10 kB/sec!! Remember:

You only get what you give  8)

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: "cannot find hostname"
« Reply #5 on: October 24, 2005, 11:33:42 PM »

I don't know.  I'm sure there's a standard Unix startup file which can run the hostname command automatically on startup.  Or, you can create a Startup Item to do it, too.  However, it feels like we're getting pretty far from The Mac Way of doing things.  I find that when I start getting away from The Mac Way and getting into The Unix Way of doing things like this under Mac OS X, it means I've gone astray.

Who assigned you your DNS name?  Your ISP?  You should ask them if their DHCP server should be telling your computer about its assigned DNS name.  I think it should.  I don't know all that much about DHCP, but I do know that in my company's network that's how it works.
Logged

Gomaaz

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 58
  • I want you to leave me alone...
Re: "cannot find hostname"
« Reply #6 on: October 27, 2005, 11:59:14 PM »

and finally I found out how to make this permanent :P :

1. Open Terminal.app
2. cd /etc
3. sudo cp hostconfig hostconfig.old
4. sudo pico hostconfig
5. Change the line "HOSTNAME=-AUTOMATIC-" to "HOSTNAME=yourdns"
6. Save the file (^O) and exit (^X)
7. Open NetInfo Manager.app
8. Click machines
9. Click localhost
10. Make sure that the lock is unlocked - if not, click on it to unlock it
11. Hit -D to duplicate the localhost entry
12. Click on the 'localhost copy' entry
13. Double-click the value for the 'name' field in the lowerbox
14. Type in the same name as your hostconfig file (i.e. youdns)
15. Reboot

I'm sooo glad now :D
Logged
Set UL-speed more higher than 10 kB/sec!! Remember:

You only get what you give  8)

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: "cannot find hostname"
« Reply #7 on: October 28, 2005, 03:43:34 AM »

Well, congratulations.  I'm still a bit uncomfortable doing stuff like this behind the OS's back (sort of).  Is this change reflected anywhere in the System Preferences?  If so, you know how to make the change The Mac Way(tm) for the future.
Logged

Gomaaz

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 58
  • I want you to leave me alone...
Re: "cannot find hostname"
« Reply #8 on: October 28, 2005, 05:15:30 AM »

no I couldn't change it by the easy way (in system preferences). so in the config files wasn't the "HOSTNAME=" entry available at all  8o so I had to create it first.

maybe other guys got easierways....but this worked for me now :P and that's what I wanted   :baby:
Logged
Set UL-speed more higher than 10 kB/sec!! Remember:

You only get what you give  8)

Mace Windu

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: "cannot find hostname"
« Reply #9 on: January 05, 2006, 10:44:28 AM »

Hi!

I'm getting the same error:

"Cannot get the official hostname (error 22: Invalid argument)" ?(

only since I've changed from 2.0.3  to 2.1.0.
I can connect to servers and Kad, and furthermore I can get the server list.

All needed ports are forwarded (I think). :]
Connection thru Wi-Fi to an ADSL from Telefónica in Spain.

The error window appear every time I double click at the aMule icon to open it, but never appeared when I was using aMule 2.0.3. Since it never happened before... it isn't a bug?
How could I fix it without the "(ugly) way" ken :baby: links here?

Thanks.
« Last Edit: January 05, 2006, 10:54:18 AM by Mace Windu »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: "cannot find hostname"
« Reply #10 on: January 05, 2006, 07:15:45 PM »

Is not a bug. aMule is requesting the hostname from the O.S. If you ahve none set, is not aMule's fault ;)
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: "cannot find hostname"
« Reply #11 on: January 05, 2006, 09:17:48 PM »

I am confused about where this problem is coming from. I am currently (temporarily) using the same ISP as Gomaaz and without any special measures aMule is not complaining about the hostname. This (and the fact that this ISP is the largest one in Germany and noone else seems affected) makes it somewhat unlikely that it is an ISP related issue.

I'm also a bit puzzled by Mace Windu's statement that he only gets the error with 2.1.0 but not with 2.0.3 because Gomaaz initially said that he gets the error both with 2.0.3 and the CVS versions.
Logged
Current aMule CVS builds for OS X can be found here.

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: "cannot find hostname"
« Reply #12 on: January 05, 2006, 09:35:55 PM »

I think my wxGetHostname implementation did not get on 2.0.3
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: "cannot find hostname"
« Reply #13 on: January 05, 2006, 11:20:25 PM »

Quote
Originally posted by Kry
Is not a bug. aMule is requesting the hostname from the O.S. If you ahve none set, is not aMule's fault ;)

But the point is, aMule shouldn't need the hostname and shouldn't use it for the purpose that it is.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: "cannot find hostname"
« Reply #14 on: January 06, 2006, 12:30:53 AM »

Why not? It's ok. That's the way we get the ip. Better ideas? :P
Logged
Pages: [1] 2