浏览 1609 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-12-05
Errno::EADDRNOTAVAIL in AdminController#index4 ԚƤɏς΄???Ç뇳?ĵؖ?ΞЧ?? - sendto(2) RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:34:in `send' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:34:in `send' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:478:in `send_request' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:462:in `try_request' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:461:in `times' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:461:in `try_request' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:205:in `get' D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:226:in `get_value' C:/Documents and Settings/Administrator/My Documents/NetBeansProjects/RubyGoOn/RubyGoOn/app/models/modem.rb:63:in `getmac' C:/Documents and Settings/Administrator/My Documents/NetBeansProjects/RubyGoOn/RubyGoOn/app/models/modem.rb:62:in `getmac' C:/Documents and Settings/Administrator/My Documents/NetBeansProjects/RubyGoOn/RubyGoOn/app/controllers/admin_controller.rb:20:in `index4' C:/Documents and Settings/Administrator/My Documents/NetBeansProjects/RubyGoOn/RubyGoOn/app/controllers/admin_controller.rb:20:in `collect!' C:/Documents and Settings/Administrator/My Documents/NetBeansProjects/RubyGoOn/RubyGoOn/app/controllers/admin_controller.rb:20:in `index4' 其实是因为snmp的manager在执行对modem的snmpget的时候出错了。 因为在读取modem信息的时候,应该注意有三种情况:
2,modem注册过,也就是合法的,但是不在线。 3,modem在线。 对于以上三种情况,第一种会导致返回错误信息,也许是noinstarnt啊之类的,需要进行判定,否则会出错。 D:/InstantRails/ruby/lib/ruby/site_ruby/1.8/snmp/manager.rb:34:in `send' 针对第一第二种,可以采用直接给记录赋值(全部都是‘0’)然后return,跳出方法,进行下一个modem的snmpget。 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |