Forum Discussion
shiff_128078
Nimbostratus
Jul 10, 2004Please 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.
- shiff_128078
Nimbostratus
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!
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);
- I don't see any problems with your code. I've got a couple of questions.
private ITCMCommonIPPortDefinition GetIpPortDefinition(string ipPortDefinition) { System.Diagnostics.Debug.WriteLine("IPPortDefinition: " + ipPortDefinition); ... }
- mdowns_127773
Nimbostratus
Joe: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())); } }
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'"); }
- mdowns_127773
Nimbostratus
Joe: - 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...
- mdowns_127773
Nimbostratus
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.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects