473,698 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bind exception

eeh
Hi,

I got bind exception (Jave.ent.BindE xception: Cannot assign requested
address: JVM_BIND) when the following statement is executed.

ss=new ServerSocket(0x 55,0,InetAddres s.getByName("19 2.168.0.8"));

The host 192.168.0.8 is on and can be pinged.

Could anyone tell me why?

When I change the stement to be

ss=new ServerSocket(0x 55);

no exception is thrown.

Thanks!

Jul 17 '05 #1
5 4433
eeh wrote:
The host 192.168.0.8 is on and can be pinged.


But is it the IP address of the machine that's running the code?? It
should be...

--
Michael Banzon
http://michael.banzon.dk/
Jul 17 '05 #2
eeh
>
But is it the IP address of the machine that's running the code?? It
should be...


Not from the same computer, actually it is a network standalone device.

Jul 17 '05 #3
On 16 Mar 2005 00:32:49 -0800, eeh wrote:

But is it the IP address of the machine that's running the code?? It
should be...


Not from the same computer, actually it is a network standalone
device.


If your host doesn't have a network interface with that address, you
can't do it. A socket (Socket or Serversocket) can only bind to the
address of one of the host's network interfaces.

Specifying a portnumber alone works because the address defaults to
the wildcard address (0.0.0.0), which matches all of the host's
interfaces.

What are you trying to do?

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Jul 17 '05 #4
eeh
> If your host doesn't have a network interface with that address, you
can't do it. A socket (Socket or Serversocket) can only bind to the
address of one of the host's network interfaces.
The device does have network interface and the server socket is working

when no specified IP is given. Pinging to the device is successful.
What are you trying to do?


Actually the device is a parallel ethernet converter.

Jul 17 '05 #5
eeh
> > If your host doesn't have a network interface with that address,
you
can't do it. A socket (Socket or Serversocket) can only bind to the
address of one of the host's network interfaces.


OK, I get your meaning. The server socket cannot be applied to a IP
from a remote host.

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
10150
by: Clarence Gardner | last post by:
I've got a problem that I don't see how to program around. A socket server that was running fine, today started getting an exception from the bind() call (errno 22, Invalid argument) and yet the bind had actually worked. This is apparent from this code: it prints the error message, but then breaks out of the loop and the listen() and accept() calls work normally. How can one handle a function that is both working and raising an...
4
2755
by: 0k | last post by:
Hi everyone, I am trying to write a small app that sends multicast udp packets using a socket object. I have more than one NIC on my PC and the following code works OK only if I disable all the NICs but the one i want to use. Of course i tried to use Socket.Bind method, but even if i use it to bind to the correct NIC (I also verify using LocalEndPoint and IT IS the correct one), the packet is sent on the wrong NIC! (I have a software...
0
982
by: Rene | last post by:
I am getting the following error when I try to open one of my Forms on my project. This error only shows up when I open the form during design time (Visual Studio designer)!! It does not happen if I open the form while runnning the actual program (theForm.Show())!! An exception occurred while trying to create an instance of xxxxx. The exception was "Could not load a type. Failed to partial bind to "yyyyy"...
3
1721
by: david | last post by:
I have bind a dataset, DentistDataSet1, to TextBox, txtLastName, by set the textbox property (databindings--> simple binding--> ... -->LastName) and also bind it to a dropdown list, DropdownList1 with datasource (DentistDataSet1), DataMember (Dentists), and DataTextField (DentistID), and AutoPostBack(true). The settings are done by Visual .NET studio 2003. Also I have the following event code and expect the FirstName and LastName would...
2
2487
by: Ken Powers | last post by:
Hello everyone, I'm getting a strange error when I try to bind a combo box to a Dataset. Here's my code! Private Sub Get_Data() Try Dim sqlcmd = New SqlCommand("Select * from Utility order by Utility", sqlConn)
0
1665
by: Ken Powers | last post by:
Hello everyone, Sorry about the repost, my second VB.NET App is done with the exception of this error. I'm getting a strange error when I try to bind a combo box to a Dataset. Here's my code! Private Sub Get_Data() Try Dim sqlcmd = New SqlCommand("Select * from Utility order by
3
3156
by: sck10 | last post by:
Hello, I am trying to bind an arraylist to a FormView DropDownList control in the PreRender state. The error that I get is the following: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. Any help with this would be appreciated. -- Thanks in advance,
1
16255
by: Owen Blacker | last post by:
I've spent loads of time Googling to try to work this one out and I'm sure it's something obvious. I get an InvalidOperationException reading "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control" when I start my page. Unless I'm missing something obvious, this is *not* the same issue as the "2-way databinding cascading lists" issue in...
6
6277
by: pretzla | last post by:
I have a PL/SQL script where I load data from a stored procedure into bind variables. Then, I insert that data from the bind variables into an Oracle table with a simple insert statement. The execution of the stored procedure and the insert are in a FOR-LOOP. insert into ccd_t (acct_id, acct_seq_no, acct_btn) values
0
1239
by: pbd22 | last post by:
Hi. I am returning to an old bit of code in our program and need to figure out how to sort my columns on bind. I am sorting on Date (mostly) and some other values. Problem is, the code is an ArrayList that seems to do some tricky stuff with a chache object and I am unable to get any sort of sorting happening.
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.