Dart Home | PowerSNMP for ActiveX | Custom Development | Reply | PowerSNMP for ActiveX Topics | Forums |
Author | Forum: PowerSNMP for ActiveX Topic: why the manager can't connect the hardware? |
bestlihj bestlihj@126.com From: ZhouXu, Peoples Rep of China Posts: 5 Member Since: 05/21/06 |
posted June 19, 2006 8:41 AM When I start the manager and set any oid to the hardware ,the error appear : Project *.exe raised exception class EOleException with message'The connection has been dropped because of a network failure or because the peer system failed to respond.' and,the focus stop at ***************** procedure TManager.Send; begin -> DefaultInterface.Send; end; Could you help me?Thanks. My code is : /////////////////////////// procedure Tfrm_info.btnSet_mode400Click(Sender: TObject); var // newValue: String; v: ISnmpVariable; oid: string; begin // Prepare manager to send a new message // Use 10 second timeout Manager1.Message.Reset; Manager1.Timeout := 1000; Manager1.AgentPort := 161; Manager1.AgentName :=frm_result.IP // Create a new variable using the new value v := CoSnmpVariable.Create; v.Type_:=1; v.value :='3'; oid := '1.3.6.1.4.1.833.10.2.1.0'; v.Oid := oid; try // Set the message type to a set request Manager1.Message.Type_ := snmpSet1; Manager1.Message.Variables.Add(v); Manager1.Send; // Check the exception value to see if set was // successful if Manager1.Message.Exception = snmpNoAccess then ShowError('Access was denied to requested variable.') else if Manager1.Message.Exception = snmpReadOnly then ShowError('Variable is Read-Only and cannot be changed.') else if Manager1.Message.Exception <> snmpOk then ShowError('General Error. Value could not be set.') ; except on E:Exception do ShowError(E.Message); end; end; |
Tony Priest From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 19, 2006 10:32 AM This error means that the attempt to connect to the IP address specified in the variable frm_result.IP did not succeed within 1 second. Have you tried increasing the timeout to 5000 or 10000? If that does not solve the problem, then it means the IP address does not have an agent running on port 162 or there is a firewall blocking access. |
Reply | PowerSNMP for ActiveX Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |