PDA

View Full Version : Host only works with IP



errr
12-10-2009, 03:01 PM
I am trying to get the 8-ball example working on my system. It works fine if I use the public IP of my server, but it will not work for the hostname. All I ever get using the host name is: Bad Request (Invalid host)

Any suggestions?

Im using Debian Lenny

Mono JIT compiler version 1.9.1 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none

errr
12-10-2009, 05:01 PM
Im not sure why maybe someone could explain it for me...

when I did
mono mindtouch.host.exe help It showed that the IP flag worked like so:
ip <#.#.#.#:#> listen only on this network address and port (use 'localhost' to only allow local access)
so I was using my IP there. We changed it to *:8081 and also to the hostname:8081 and now it works.

Why?

crb
12-11-2009, 10:13 AM
Look in /etc/dekiwiki/mindtouch.host.conf...

errr
12-11-2009, 08:36 PM
This is not a deki wiki it is a stand alone dream server that we are working on. so that file is no where on the system..

crb
12-12-2009, 01:01 PM
I see. Were you passing any command line parameters to Dream when you started it, or is the default the problem?

errr
12-14-2009, 07:02 PM
I was using the below options to start the service.


/usr/bin/mono mindtouch.host.exe script 8ball.startup.xml \
public-uri http://dream.mysite.org:8081/ \
server-name http://dream.mysite.org \
ip my.public.ip.addy:8081


In order for the service to work when I went to http://dream.mysite.org:8081/8ball I had to change
ip my.public.ip.addy:8081 Which was a valid IP to a host name which is not an IP.

/usr/bin/mono mindtouch.host.exe script 8ball.startup.xml \
public-uri http://dream.mysite.org:8081/ \
server-name http://dream.mysite.org \
ip dream.mysite.org:8081

This is confusing, since in the documentation it says:


ip <#.#.#.#:#> listen only on this network address and port (use 'localhost' to only allow local access)

This leads me to think that if I have a host with multiple interface cards and I only want the service to be on one of the 2 then I should be able to put that IP I want it to listen on, and it should still work using the host name (which is not the case)

errr
12-17-2009, 03:58 PM
so does anyone have any input on this? Maybe it is a bug?

crb
12-17-2009, 09:21 PM
Looking at the source, the way this works, is if you specify an 'ip' parameter it will only listen on the IPs that are resolved to by the hostnames you specify (there can be more than one), else it will get all the aliases for all the IPs on the system and use those.

If it's not working the way you expect (or the way it's documented), by all means, please feel free to file a bug (http://developer.mindtouch.com/Deki/FAQ/Testing_and_Contributing/How_do_I...File_a_bug_report%3F).

SteveB
12-21-2009, 10:41 PM
Ah, this is indeed a bit confusing. We should update the help description. When specifying a hostname instead of an IP address, Dream will enumerate all addresses associated with it.