Connecting to remote virtual machine using sockets - java

I am trying to connect to a virtual machine using sockets in Java. I have my client and server applications working with no issues on localhost. When I run the Server code and try to connect from a separate machine with the IP address and port number, my client connection times out.
Here is a link to my virtual machine network settings page https://wiki.redbrick.dcu.ie/mw/RBVM_Networking
Do I need to specify any particular parameters in Java to make my server accept connections? Is this an issue I have to take up with the VM network admins?
Any suggestions would be appreciated !
p.s I am running ubuntu server and can access phpmyadmin remotely with no problems.
Edit
I have run nmap and the port I am using for the server side application shows up as open.

My provider was blocking all but a select few ports, got a list of open ones and now it works. derp!

Related

Can a Java program access a specific port on a Guacamole connection?

Can I use the Apache Guacamole API to allow a Java program to access a specific port on a Guacamole server's connection? When I say connection, I mean a machine that the Guacamole server is connected to - a machine that would show up in the Guacamole web interface.
Background:
I set up an Ubuntu virtual machine as a local Guacamole server/client. The virtual machine also runs a series of centOS (LXD) containers, each with a respective IP address. Outside of the virtual machine, on the host machine on the same network, I am able to access the Guacamole web interface via a web browser and SSH into the centOS containers just fine.
Let's say I have a Java program on my host machine that needs to communicate with one of those centOS containers. Is it possible to use the Guacamole API to allow the Java program on the host machine to programmatically access a specific port on one of the Guacamole connections/centOS containers?
If so, how would I go about doing that? I'd appreciate any specific examples or documentation related to this. If there's a better way to go about this, please let me know.
Thanks.

ZeroMQ (0MQ), how to connect the client to a remote server?

I've implemented a simple ZeroMQ (0MQ) server and client. It works well when I use them on a machine (local). But when I run the client on one another machine, it doesn't work (it cannot connect to the remote server). I've checked my firewall and it's inactive (in Ubuntu 14.04).
My server code written in java is:
ZMQ.Socket responder = context.socket(ZMQ.REP);
responder.bind("tcp://*:5555");
and the client code:
requester.connect("tcp://ipaddress:5555");
in which "ipaddress" is the IP address of my server.
I've tried also different port numbers.
Please, explain what is the problem and what do you suggest to solve the problem??
Thanks in advance

Node.js remote server not working (Etherpad Lite)

I'm running a server-side application on a remote server, using a particular port - call this port 9000. Using a separate laptop, I've been able to telnet to a simple Java hello world TCP server and to access a HTTP server through my browser. These listened to port 9000 and were made using the standard Java libraries and com.sun.net.httpserver. However, when I use Node.js to create an application (i.e. server.listen(9000, 0.0.0.0)), I cannot connect to that application.
Is there something additional I should do to create a successfully listening HTTP server using Node.js? Any additional dependencies? As per above, assume there are no firewall issues between my laptop and my server.
For a larger context, the program I'm trying to run is etherpad-lite, which uses Node.js to create a server.
Don't include the IP address of 0.0.0.0.
This is telling the server to only listen to requests to that 'hostname'.
Just use
server.listen(9000);

Can't open web application made with Java EE on other local computers

I am trying to look the web application I made with Java EE. The server and database is up and running. It works on localhost:8080, but when I replace localhost with the local IP address all I get is a 404 error. Do I need to configure something?
On windows 7 open the firewall to allow incoming and outgoing traffic on port 8080. Then from the remote machine make sure that you can ping the server's ip address and then try to browse to the address.

Java network communication problem

I have a problem that I think might be a java related one.
I have a java application I need to emulate multiple hosts.
The server/client work fine between "normal" computers.
When I use the emulator, I get connection refused when client tries to connect to a server in the emulator, same thing if I try telnet.
If I turn it around, the client cannot connect to the external server, but if I telnet from the external server, I get a connection.
This makes me think it is a java related problem.
Anybody gone through this problem before? This is for research purposes, so turning off java security only for this situation is no problem.
Thanks!
When you say emulator, I think you are talking about a virtual machine. Connecting from the real world into a virtual machine is not something that works automatically. The virtual machine can initiate connections out because the virtualization software handles that. Going the other way - what machine name do you use. How you configure your physical machine to routce packets to the ip address of your virtual machine (which your virtualization software made up). You may need a proxy on your physical machine to route the packets into the virtual one.

Categories

Resources