You need also to configure some more settings. Here are the settings I use
for waveinabox.net that also runs on ec2:

wave_server_domain = waveinabox.net

# Each address is a comma separated host:port pair.
# Default value: localhost:9898
http_frontend_public_address = waveinabox.net:80 <http://waveinabox.net/>

# A optional host:port address on which to listen for websocket connections.
# If no value is set for http_websocket_public_address it defaults to the
first
address specified
# by http_frontend_public_address.
# Default value: localhost:9898
http_websocket_public_address = 10.71.135.244:9898

# An optional host:port address for which the client is told to attempt
websocke
t connections.
# If no value is set for http_websocket_presented_address it defaults to
http_we
bsocket_public_address
# Default value: localhost:9898
http_websocket_presented_address = waveinabox.net:80
<http://waveinabox.net/>

# Default value: values passed to http_frontend_public_address.
http_frontend_addresses = 10.71.135.244:9898

Here 10.71.135.244 is the internal IP address for the instance.

You can use the script below to forward the port 9898 to port 80 using
iptables:

iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 9898 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT
--to-port 9898


On Mon, Nov 3, 2014 at 8:44 PM, Pablo Ojanguren <pablo...@gmail.com> wrote:

> I use following settings to access from internet to a Wave Server in a VM
> behind an HTTP proxy:
>
> http_frontend_public_address = localhost:9898
> http_frontend_addresses = mydomaim.com:9898,localhost:9898
>
>
> From internet, I access the server via http://mydomain.com (default port
> 80)
> In the Wave's VM, I edited /etc/hosts and pair the VM's internal IP to
> mydomain.com
> Request to mydomaim.com are sent to the internal IP:9898 by the proxy.
>
> Hope it helps.
>
> Regards,
>
> Pablo
>
> 2014-11-03 17:07 GMT+01:00 Wu Ming <rdyf4e...@gmail.com>:
>
> > Hi,
> >
> > I have installed "apache-wave-bin-0.4-incubating" in amazon EC2.
> >
> > Then I generated the configuration with this setting:
> >
> > $ ant -f server-config.xml -Dwave_server_domain=myec2domain.com
> > -Dhttp_frontend_public_address=54.172.45.42:9898
> >
> > The 54.172.45.42 is the public ip address of the EC2 instance. Note: for
> > privacy, the above setting value are not real.
> >
> > Then I run the server and I got this error:
> >
> > WARN:oejuc.AbstractLifeCycle:FAILED
> > SelectChannelConnector@54.172.45.42:9898:
> > > java.net.BindException: Cannot assign requested
> > > addressjava.net.BindException: Cannot assign requested address
> > >         at sun.nio.ch.Net.bind0(Native Method)
> > >         at sun.nio.ch.Net.bind(Net.java:444)
> > >         at sun.nio.ch.Net.bind(Net.java:436)
> > >         at
> > >
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
> > >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
> > >         at
> > >
> >
> org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:173)
> > >         at
> > >
> >
> org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311)
> > >         at
> > >
> >
> org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:251)
> > >         at
> > >
> >
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
> > >         at org.eclipse.jetty.server.Server.doStart(Server.java:274)
> >
> >
> >
> > But if I use this configuration:
> >
> > $ ant -f server-config.xml -Dwave_server_domain=myec2domain.com
> > -Dhttp_frontend_public_address=myec2domain.com:9898
> >
> > It is running well, but it listens to EC2 instance's private ip address
> so
> > I can't access the webclient externally from browser.
> >
> > Anyone know the solution?
> >
> >
> > Regards,
> > WM
> >
>

Reply via email to