Python Socket Issues with VirtualBox

T

TechieInsights

I have created a server and client that communicate via a TCP socket
connection. Everything runs great on 6 of the 6 boxes. However, when
I installed Sun's VirtualBox on one of the PC's I started getting:
error: (10061, 'Connection refused')

I tried restarting, stopping services, checking out a new copy of the
code, changing ports, changing host names... all fails until I remove
VirtualBox. I would REALLY like to be able to have both working. Any
idea what might be causing this and how I could fix it?

Thanks,

Greg
 
A

Alan Franzoni

TechieInsights was kind enough to say:

[cut]

You're giving very few details on your issue, which is most probably not
related to python itself. Which operating system? Which virtualbox version?
Which kind of connection? Is the port open for listen? Does the code fail
at listening or at connecting (e.g. is either the client or the server
failing) ?

My first guess would be that you didn't specify the interface to bind to,
and the interface order changes once you install virtualbox since it
possibly adds a virtual interface of its own, but I can't tell unless you
tell something more.

--
Alan Franzoni <[email protected]>
-
Remove .xyzz from my email in order to contact me.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
 
P

Paul Boddie

My first guess would be that you didn't specify the interface to bind to,
and the interface order changes once you install virtualbox since it
possibly adds a virtual interface of its own, but I can't tell unless you
tell something more.

If a request is made to bind a socket to "" as is often indicated in
examples, I believe that an attempt is then made to bind the socket to
all available interfaces, and I can imagine that this might not work
for any special interfaces created for VirtualBox. See here for more
information:

http://docs.python.org/library/socket.html#example

Paul
 
L

Luis Zarrabeitia

TechieInsights was kind enough to say: [...]
My first guess would be that you didn't specify the interface to bind to,
and the interface order changes once you install virtualbox since it
possibly adds a virtual interface of its own,
[...]

And there is another possible cause: by default, virtualbox networking uses
nat. The virtual machine sees both a local interface with a private IP, and
a "router". The host, however, sees none, making it impossible to connect
_to_ the virtual machine, or to open a listening socket in the "router"'s IP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top