The other problem with 0.0.0.0 is that TCP binds the application with the most specific specification. If wiab is listening on port 0.0.0.0, another application running on the same machine could listen on 1.2.3.4 (or whatever the external IP is) on the same port, and connections would go to that application.
Of course, if the server were running on a privileged port (< 1024?) thats not a problem. But yeah; I agree. The optimal solution is that the user can specify a list of hostname/port pairs for the server to listen on, and it defaults to only listen on localhost:9898 or something. -J On Mon, Nov 1, 2010 at 9:55 AM, Tad Glines <[email protected]> wrote: > The default should be localhost. Then if the user want's to allow external > connections they can configure an IP address or use 0.0.0.0. > > We could also allow a comma separated list of IPs if the user has a > multi-homed box and only wants to listen on certain interfaces. > > -Tad > > On Sun, Oct 31, 2010 at 3:46 PM, Joseph Gentle <[email protected]> wrote: >> >> We should just fix that bug. Maybe even catching & ignoring that >> exception when it tries to bind to localhost would be enough. When we >> finally fix up the config files, I'd like to add an apache-style >> Listen instruction, so you can ask the server to listen wherever you >> want. Also, maybe listening on 0.0.0.0 is the right answer at the >> moment, instead of listening on `hostname` & localhost. >> >> -J >> >> On Mon, Nov 1, 2010 at 9:39 AM, John Poole <[email protected]> wrote: >> > Your suggestion worked. Thank you! >> > >> > I modified run-config.sh as follows: >> > # Domain name of the wave server >> > #WAVE_SERVER_DOMAIN_NAME=`hostname` >> > WAVE_SERVER_DOMAIN_NAME=localhost >> > >> > # Host name and port the wave server's client frontend listens on >> > #WAVE_SERVER_HOSTNAME=`hostname` >> > WAVE_SERVER_HOSTNAME=localhost >> > WAVE_SERVER_PORT=9876 >> > >> > # Host name and port the wave server's websocket frontend listens on >> > #WEBSOCKET_SERVER_HOSTNAME=`hostname` >> > WEBSOCKET_SERVER_HOSTNAME=localhost >> > >> > Yes, I do have "hermes" as an alias for 127.0.0.1 >> > If you have an opinion as to the practice of aliasing 127.0.0.1, it >> > may prove helpful to others or might be something to mention in the >> > startup instructions. >> > >> > >> > On Sun, Oct 31, 2010 at 3:19 PM, Tad Glines <[email protected]> >> > wrote: >> >> Edit run-config.sh and change all occurrences of `hostname` with >> >> localhost. >> >> And try again. >> >> When the hostname isn't localhost, WiaB tries to start two listeners, >> >> on on >> >> localhost, and on the configured hostname. >> >> But it doesn't resolve the name to see if it is just an alias for >> >> localhost. >> >> My guess is that your hosts file has the name "hermes" set to IP >> >> address >> >> 127.0.0.1 and as a result WiaB is getting an error because it's already >> >> started a listener on localhost. >> >> >> >> See line 371 of ServerRpcProvider.java. >> >> >> >> -Tad >> >> >> >> On Sun, Oct 31, 2010 at 2:42 PM, John Poole <[email protected]> >> >> wrote: >> >>> >> >>> I'm starting a new thread to separate this from the posting I made >> >>> yesterday. >> >>> >> >>> The server is an AMD quadcore: >> >>> >> >>> hermes ~ # cat /proc/version >> >>> Linux version 2.6.34-gentoo-r12 (r...@hermes) (gcc version 4.4.5 >> >>> (Gentoo 4.4.5 p1.0, pie-0.4.5) ) #1 SMP Sun Oct 31 13:07:23 PDT 2010 >> >>> hermes ~ # java -version >> >>> java version "1.6.0_22" >> >>> Java(TM) SE Runtime Environment (build 1.6.0_22-b04) >> >>> Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) >> >>> hermes ~ # >> >>> >> >>> I've confirmed with netstat that the ports earmarked from Wave are not >> >>> being used, the output is in the attached pastebin. >> >>> >> >>> ISSUE #1: double ant build for success >> >>> Aside from the server not running, you will see that I had to run >> >>> "ant" twice to build. The first time ant failed. I did nothing other >> >>> than simply run "ant" again and the second attempt ended up as a >> >>> successful build. >> >>> >> >>> ISSUE #2: run-server.sh fails due to port conflict. >> >>> Here's the clean and build (598) and attempt to run-server.sh: >> >>> http://pastebin.com/DEPwSbvc >> >>> >> >>> I'm happy to do whatever anyone suggests to get this to debug and/or >> >>> get the server to work. >> >>> >> >>> Cheers! >> >>> >> >>> -- >> >>> John L. Poole >> >>> >> >>> P.O. Box 6566 >> >>> Napa, CA 94581-6566 >> >>> 707-812-1323 >> >>> >> >>> [email protected] >> >>> >> >>> -- >> >>> You received this message because you are subscribed to the Google >> >>> Groups >> >>> "Wave Protocol" group. >> >>> To post to this group, send email to [email protected]. >> >>> To unsubscribe from this group, send email to >> >>> [email protected]. >> >>> For more options, visit this group at >> >>> http://groups.google.com/group/wave-protocol?hl=en. >> >>> >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> >> Groups >> >> "Wave Protocol" group. >> >> To post to this group, send email to [email protected]. >> >> To unsubscribe from this group, send email to >> >> [email protected]. >> >> For more options, visit this group at >> >> http://groups.google.com/group/wave-protocol?hl=en. >> >> >> > >> > >> > >> > -- >> > John L. Poole >> > >> > P.O. Box 6566 >> > Napa, CA 94581-6566 >> > 707-812-1323 >> > >> > [email protected] >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Wave Protocol" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> > http://groups.google.com/group/wave-protocol?hl=en. >> > >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Wave Protocol" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/wave-protocol?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Wave Protocol" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/wave-protocol?hl=en. > -- You received this message because you are subscribed to the Google Groups "Wave Protocol" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/wave-protocol?hl=en.
