amazon web services - Using the public IP on AWS from java getCanonicalHostName method -


i'm trying use aws scalable analytics tool. i'm using apache zeppelin interactive shell spark cluster , trying plot using wisp. causing problem plotting approach in wisp start web app based on think jetty server. works on local machine on aws not work picks private ip address rather public one.

within wisp, uses java.net.inetaddress.getlocalhost.getcanonicalhostname retrieve ip address of machine. returns private fqdn address. how can make java function return public ip address or fqdn aws provides without hardcoding in wisp every time spin cluster , rebuilding?

i have tried changing /etc/hosts , /etc/hostname both have no effect. don't know java.net.inetaddress.getlocalhost.getcanonicalhostname getting it's address from.

any or advice appreciated.

dean

i'm idiot. port issue. appears despite displaying private ip, it's still available on public ip.

turn off internal firewall sudo ufw disable (on ubuntu vm anyway, alternative command flavour of vm).

next, go aws ec2 management page account , click on security group of instance.

on security group page, edit inbound rules , add custom tcp rule.

under ports, put in '1 - 65536' , under source put in '0.0.0.0/0'. please note, have done open ports on instance incoming traffic everywhere. have put down welcome mat internet. not recommend doing long term , extremely stupid. worked proof of principle set though , aiming do. i'll looking @ ways make secure.

thanks restraint in not mocking me being moron.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -