JBoss VPS External ip settings - working fine in local browser but not in external - jboss

On beforehand I have to say i'm a bit of a newbie.
I've sucscribed to a VPS with Ubuntu 11.04 server, I installed Jboss and am starting it with the -b 0.0.0.0 option.
Now if I lookup the address ip:8080 on a browser on the VPS itself it's working fine, but if I try to look it up on a browser on an external machine it isn't able to access the page.
I tried to modify the hosts file but without success. Maybe its the iptables? Or something else?
I really appreciate any help thanks.

Take the static IP of the server, ping that from your command line tool with ping. If you are successful in pinging the server you are all set. Now go to the browser of the external pc and type the static ip and give the port as 8080. It will certainly work.
Some good suggestion from my side is, try PaaS(platform as a service) now as that is much easier than VPS and you will get up and running in minutes. Try Jelastic. It has got JBoss hosting. Deploy your WAR file there and you can access it immediately. Ket me know if you really go ahead and use it.
Surya

Related

Expose Ngrok Web interface in same LAN

I have some issue to configurate Ngrok.
I have installed the Ngrok on linux CentOS server dedicated (IP 192.168.1.124), it works correctly the tunneling is ok.
My question is: how i can reach the web page on 127.0.0.1:4040 in order to check the traffic on my Ngrok server?
The web interface page is only accessible on the server where ngrok is running, but if this is a linux minimal server (without gui and any type of browser) I can't see it.
is there a way to make it accessible also in LAN?
e.g. I have another client that can reach the IP where ngrok is running but if i put on web browser http:\192.168.1.124:4040 nothing is showing.
I see from netstat that this port is not listening so isn't a firewall problem or other.
Is possible to change config of Ngrok? otherwise are there other possibilities ? do i have to use a reverse proxy or something like?
Any ideas?
thanks for your help,
Luca
Locate your ngrok's config file:
$ ngrok config check
Valid configuration file at /home/youruser/.config/ngrok/ngrok.yml
Add to the config file the following line:
web_addr: 192.168.1.124:4040
In case you want to expose it to all interfaces, you can replace that value with 0.0.0.0:4040

Redirect/rewrite to different internal IIS sites using query string

EDIT: Ugh I forgot to put this on Server Fault...
I have an Azure VM that is hosting a web application.
The application will be accessible via the VM's IP address:
http://191.238.112.62
I want to be able to use query strings to redirect to completely different sites that are within the local IIS. For example:
http://191.238.112.62/?site=1
would redirect to
www.site1.com
The way I have structured IIS can be seen below:
Each site has an entry in the systems host file.
127.0.0.1 wwww.site1.com
127.0.0.1 wwww.site2.com
127.0.0.1 wwww.site3.com
There is likely a better way to achieve what I am going for here so any pointers would be greatly appreciated.
Thanks.
Here is how I would do it. Not sure why you want to use query strings for this as IIS is made to do that if you configure it properly.
In your DNS server register all your websites to point to that IP. This is for when you go live. For development the hosts file is a good solution.
When you create the websites add a Host header like below
Now try loading any website by their full name
http://www.site1.com
http://www.site2.com
http://www.site3.com
Here is more info about IIS host headers.
Again, when you go live make sure you have the DNS set up for all the websites to point to the IP address of your server.
Hope this helps.
Edit based on comment:
Right, here is how I solved this in the past.
You can do all this with the hosts file but it's less painful if you have a proper DNS server to resolve the names.
The basic idea is to use slightly different URLs for development on the local machine.
All devs would have site1.com point to the IP of the shared server and site1.com.local point to 127.0.0.1. So a hosts file on a developer machine would look something like:
191.238.112.62 www.site1.com
127.0.0.1 www.site1.com.local
On all development machines you need to make sure you have the .local host header for all sites.
On the shared server you just need to add the right host headers and no hosts file changes. It's actually a bad idea to change the server hosts file.

Debugging with XDebug and Netbeans from Windows to Ubuntu remote server

I'm trying to debug a Drupal 7 app with Xdebug. My app resides remotely in a server with Ubuntu running Apache.
In Netabeans, I started a proyect with "Application From Remote Server", connected with SFTP.
In the remote server I have installed Xdebug as zend_extension, also i configured xdebug.remote_connect_back=1, xdebug.remote_autostart=1, etc... I've tried everything with no luck.
The log from Xdebug has entries like this one:
Log opened at 2014-12-24 13:01:31
I: Checking remote connect back address.
I: Remote address found, connecting to 181.175.73.24:9000
E: Time-out connecting to client. :-(
Log closed at 2014-12-24 13:01:32
Based on the log it seems that my computer is not visible from outside on port 9000. But port 9000 in my laptop is opened, listening, with Netbeans, that's what happens when a debug sessions starts.
I think it's a problem with my ISP. My IP is not only for me, so I can't manage it's ports or other configuration. I think my PC is not visible from outside.
So, the question is, how can I avoid this limitation? What could I debug my APP from my computer on a remote server?
Every answer is welcome. Using a program, using a service, both... I tried using pagekite but honestly I couldn't find a configuration that works for me.
Thanks everyone.
PD: I don't want Xdebug alternatives that don't do step by step debugging.
PD2: My Xdebug config is attached.
remote_connect_back won't do it for you, it just tries to connect to the public ip, it's nothing magic.
Can you ssh on the remote server ? You might want to try port forwarding over a reverse ssh tunnel.
Full details from the creator of xdebug:
http://derickrethans.nl/debugging-with-xdebug-and-firewalls.html

apache camel - deploying with cxfs web service

I'm trying to deploy my camel app which on start is creating a cxfrs endpoint. The url is like this: http://localhost:9876 . When I try to hit this one on a rest client or anywhere within my machine it works. But when I try to access it using my phone or other external devices, I'm not able to connect.
Am I missing something?
TIA
Using localhost will mean it is only accessible to your local machine, using 0.0.0.0 instead should make it publicly accessible.
0.0.0.0 should bind all available network interface on your remote machine, but from your description, somehow it only bind to localhost|127.0.0.1 so only accessible from local machine, could you use
http://external.ip.address:9876/foo/FooService
instead to see if it helps?
Also, you can try to access other network service(for example start a tomcat on remote machine and see if you can access it from your local machine) from that remote machine to see if it works, this can determine if your DNS correct or if there's really no firewall between them.

Netbeans & Eclipse hang when I attempt remote EC2 debugging via Xdebug

Already, I've checked at least 20 resources and am out of ideas:
I have a clean, remote Ubuntu EC2 instance, fresh from the AMI, having stopped only to install LAMP, phpmyadmin, and xdebug on it. Yes, I have configured my remote EC2 instance's php.ini file as follows:
Meanwhile, back on my laptop I have Netbeans & Eclipse installed. While I can get either to seamlessly upload and Run my php web app on my EC2 site (via SSH/SFTP) as soon as I hit "Debug" from either, index.php gets uploaded, a browser window opens, and then NOTHING HAPPENS. The page doesn't load, the Debug perspective doesn't open, breakpoints don't get triggered, nothing. Netbeans just hangs out saying "waiting for connection" whereas Eclipse just sits at the notorious 57% level (& yes, I toggled the xdebug.idekey before testing with Eclipse)).
So I tested xdebug's functionality on my server according to the instructions found here and here (both passed). I tried changing to port 9001 (in remote php.ini as well as in local Netbeans/Eclipse), I even tried launching this brand spanking-new EC2 instance with pretty much open Security group settings (SSH=0.0.0.0/0), but nothing seems to be working. I am out & out flummoxed, a self-confessed noob, and appreciative of any insight seasoned professionals in the community may have to offer.
Thanks,
Debbie
This feels like a networking issue to me. Port 9000 may not be accessible. The quickest way to test is to telnet to port 9000 on the remote system (if you have a telnet client installed that allows you to specify which port to telnet to). If the telnet attempt times out or is closed by the remote system you will see the error and this verifies that there is a networking issue.
I would check /etc/services to make sure that port 9000 is not reserved for use of something else. If port 9000 exists and is uncommented then something else is using the port and that services does not know how to respond to your request so it hangs.
I would do a netstat (lookup params to see "all" listening ports) and make sure the remote system is listening on port 9000. If you don't see port 9000 then the remote system is not configured to establish the connection.
If you are on a WIFI network then port 9000 may need to be port forwarded to the remote system using the internal cable modem configuration menu/utility. This is the scenerio I favor because I've wasted so much time solving this kind of problem with different software.
Good luck, you have more troubleshooting ahead of you and different questions to ask to resolve your problem.