Forum Discussion

shiff_128078's avatar
shiff_128078
Icon for Nimbostratus rankNimbostratus
Jul 10, 2004

Please Help!!!

I am not the developer of this application, but the network admin so please keep that in mind with your answers. We have written a webgui to allow us to take many nodes offline and online at once according to how the servers are grouped for our sites.

 

 

I have taken the iControl Sdk, had the Traffic Distribution Monitor compiled and it can connect successfully to all our bigips. When I do this in the pages we have written in .Net we get the following error:

 

 

Exception Details: System.Web.Services.Protocols.SoapHeaderException: ITCMCommon::OperationFailed Exception caught on ITCMLocalLB::Node::set_state(). primary_error_code : 335 secondary_error_code: 0 error_string : The requested server (node) service was not found.

 

 

Source Error:

 

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

 

 

Stack Trace:

 

 

 

[SoapHeaderException: ITCMCommon::OperationFailed Exception caught on ITCMLocalLB::Node::set_state().

 

primary_error_code : 335

 

secondary_error_code: 0

 

error_string : The requested server (node) service was not found.

 

 

Any help would be appreciated.
  • Sure will.. I will get with my dev guys on Monday and get you what you need. I will send on this information that you provided. I appreciate the assistance.
  • Glad to!

     

     

    But first, can you supply a section of your source code where you show the method calls and the setup and assignment for the input to the set_state() method.

     

     

    Odds are that you aren't assinging the parameters correctly and passing in the IPPortDefintion array incorrectly. Code should look something like this.

     

     

    ITCMCommonIPPortDefinition [] node_defs = new ITCMCommonIPPortDefinition[1]; 
     node_defs[0] = new ITCMCommonIPPortDefinition(); 
     node_defs[0].address = "10.10.10.10"; // or the ip address of the node server. 
     node_defs[0].port = 80; // or the port of your node server. 
     int state = 1; // 0 == disabled, 1 == enabled; 
     nodeInterface.set_state(node_defs, state); 
     

     

     

    The next step you can do is to enable parameter level debugging on the BIG-IP. You can do this with the "Local.Bigip.CORBA.LogLevel" database variable on BIG-IP. Setting this to the value of "DEBUG" and restarting the portal (bigstart restart) will start dumping alot of data into the /var/log/ITCM.log logfile. This will include all parameters to all method calls which can help in diagnosing any input issues.

     

     

    But, first, pass along your snippet of code and I'll see if I can see anything from that.

     

    -Joe
  • I don't see any problems with your code. I've got a couple of questions.

     

     

    1. First things first, have you verified that the node servers exist for all your entries in the database? I know it's an obvious question, but one worth asking... The LocalLBNode sample in the SDK should print out all Node Servers configured on the BIG-IP, as will "b node show" on the BIG-IP command line.

     

     

    2. Secondly, In looking at your code, what happens if the GetString() method returns an empty string? If you have an empty value for the IPAddress, or HttpPort column, you could end up with a IP address of ":", "10.10.10.10:", or ":80" all which would probably succeed in your Split() code (although I haven't verified that). Are you sure that all of the records return valid values for the IPAddress and HttpPort columns?

     

     

    3. Your code specified that set_availability() is called before set_state() but the IPPortDefinition parameters to each are identical (as far as I can tell). It seems odd to me you are getting an error from set_state() and not the set_availability() before it. Can you determine where in the code this is failing? Is it on the first HttpPort call, or the HttpsPort call?

     

     

    Debugging the inputs to GetIpPortDefinition() might help out

     

    private ITCMCommonIPPortDefinition GetIpPortDefinition(string ipPortDefinition) 
     { 
         System.Diagnostics.Debug.WriteLine("IPPortDefinition: "  + ipPortDefinition); 
         ... 
     }

     

     

    And run dbwin32 or some other debug monitor application to view the output.

     

     

    I'll try to mock up an application that uses your code (minus the SQL pieces) and see if I can reproduce a problem in the code.

     

     

    Let me know if you find anything regarding the configuration on your end...

     

     

    -Joe
  • Joe:

    Good afternoon. I'm the developer working with Shiff on the WebGUI project. Thanks for your help; we both appreciate it.

    Essentially, what we're doing is pretty straightforward, it seems, and I imagine that there's a setting that I'm not applying/overlooking, or something equally as silly.

    Here's the snippet from the page class. Again, nothing mindblowing: just a query out to get the BigIP data (GetBigIPInfo), then a pull from a datagrid on the WebForm (toggleDataGrid), and finally the call out to the BigIP class (SetAll):

     
      
     DataRow row = BigIPService.GetBigIPInfo(); //Returns General IP Data for the BigIP itself from SQL 
      
     BigIp bigIP = new BigIp(GetString(row, "IPAddress"), GetString(row, "PortNumber"), GetString(row, "UserName"), GetString(row, "Password")); 
      
     foreach (DataRow ipRow in ((DataTable)toggleDataGrid.DataSource).Rows) 
     { 
     //For every ip/port combo handled by the BigIP, enable or disable as requested 
     string ipPortDefinition = GetString(ipRow, "IPAddress") + ":" + GetString(ipRow, "HttpPort"); 
     bigIP.SetAll(ipPortDefinition, Convert.ToBoolean(ViewState["EnableAction"].ToString())); 
      
     if (SqlUtil.GetString(ipRow, "HttpsPort") != "") //If IP has a -secure- port, as well 
     { 
     ipPortDefinition = GetString(ipRow, "IPAddress") + ":" + GetString(ipRow, "HttpsPort"); 
     bigIP.SetAll(ipPortDefinition, Convert.ToBoolean(ViewState["EnableAction"].ToString())); 
     } 
     } 
      
     

    Here are the calls I'm making from within the BigIP class. The only real change here is the addition of "SetAll", which wasn't in the SDK:

     
      
     public void SetAll(string ipPortDefinition, bool enabled) 
     { 
     SetAvailable(ipPortDefinition, enabled); 
     SetEnabled(ipPortDefinition, enabled); 
     } 
      
     public void SetAvailable(string ipPortDefinition, bool enabled) 
     { 
     int state = 1; 
     ITCMCommonIPPortDefinition [] node_defs = new ITCMCommonIPPortDefinition[1]; 
     node_defs[0] = GetIpPortDefinition(ipPortDefinition); 
      
     if (enabled) 
     state = 2; 
      
     LocalLBNode.set_availability(node_defs, state); 
     } 
      
     public void SetEnabled(string ipPortDefinition, bool enabled) 
     { 
     int state = 0; 
     ITCMCommonIPPortDefinition [] node_defs = new ITCMCommonIPPortDefinition[1]; 
     node_defs[0] = GetIpPortDefinition(ipPortDefinition); 
      
     if (enabled) 
     state = 1; 
      
     LocalLBNode.set_state(node_defs, state); 
     } 
      
     private ITCMCommonIPPortDefinition GetIpPortDefinition(string ipPortDefinition) 
     { 
     if (ipPortDefinition.IndexOf(":") != -1) 
     { 
     string[] values = ipPortDefinition.Split(':'); 
      
     if (values.Length == 2) 
     { 
     ITCMCommonIPPortDefinition portDefinition = new ITCMCommonIPPortDefinition(); 
     portDefinition.address = values[0]; 
     portDefinition.port = Convert.ToInt32(values[1]); 
     return portDefinition; 
     } 
     else 
     throw new Exception("Invalid IP Port Definition '" + ipPortDefinition + "'.  Format must be 'IPAddress:Port'"); 
     } 
     else 
     throw new Exception("Invalid IP Port Definition '" + ipPortDefinition + "'.  Format must be 'IPAddress:Port'"); 
     } 
      
     

    Judging from your earlier post, perhaps I'm required to specifically set node_defs[0].address and .port on every occasion? But, GetIpPortDefinition should be setting all of those variables without any major issues.

    Regardless, thanks again for taking a look. We appreciate it.

    -Matt
  • Joe:

     

     

    1) I'll check the app this afternoon and get back to you. Pretty sure we're checking that, but it's definitely worth looking in to.

     

     

    2) On the data-entry side of this app, the user isn't permitted to enter IP Addresses or Port "s with colons; they'll simply recive a "Value of '10.10.10.10:' is invalid" error. So, short story, no they can't enter that. Although, it could be possible to entre extra erroneous periods, I think. I'll have to take a look and, if needed, strengthen my error handling there.

     

     

    3) And that's exactly what's confounding the heck out of me. You're right, the two are exactly the same, and, as logic would go, if one fails, they both would fail. I'm waiting for a more proper test lab, which is in the process of being set up today. Essentially, what we had prior was only the ability to setup and test against a single node on a local BigIP (which worked fine... the issue is with disabling a number of nodes at once), but now they're essentially bringing a copy of our Site database and making a proper mock lab, which will help out tremendously. To answer your question, whether it's happening on Http or Https, I'm not sure at this point, but will be able to answer that shortly (I will repost once I have more information).

     

     

    Thanks again,

     

     

    Matt
  • Excellent, glad to be of some help. Please keep us posted on the types of apps you are working on. It really helps out in prioritizing topics for DevCentral as well as shaping future roadmaps. And, don't hesitate to post any questions you have about the usage of the API...

     

     

    Cheers!

     

     

    -Joe
  • Issue found. I was working under the premise that there would *always* be an assigned Http port and -sometimes- an Https port. From what I've learned, that's not the case; apparently, there are cases where only a secure port is in use. So, essentially, when the app would hit a record with no Http port (declared as an integer, and, at the point that GetIpPortDefinition is called, set to zero), the app would attempt to hit 10.10.10.10:0, which is, of course, a no-no. Cue the Earth shattering kaboom.

     

     

    Thank you for your help, Joe. Much appreciated.