Re: snmpset failes with Reason: notWritable (That object does not support modification) ...Even with rwcommunity permissions

Vipul Mehta <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CADaLBRbWd=tEZs+st9+DEwBP1RaKSaRKnOfU+raPV8cFL-Vi9g@mail.gmail.com>
Thanks Suresh,

We have to write /generate a c code even if our mib contains a simple integer.

 I followed the  link , now its snmpset and get are working for me.
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent

to create a subagent for my mib . The subagent talks to net-snmp agent over TCP

regards
Vipul

On Tue, Oct 28, 2014 at 11:50 AM, Pal <[email protected]> wrote:
> Vipul,
> Try to understand how write_ methods are implemented here, which helps in
> figuring out what you need to do:
>
> http://net-snmp.sourceforge.net/dev/agent/example_8c_source.html
>
> Thanks
> Suresh
>
>
> On Oct 27, 2014, at 11:12 AM, Vipul Mehta <[email protected]> wrote:
>
> No I didn't implement any handler.  Do I need to generate some c code using
> mib2c even when I m using basic data types like integer .  plz if you can
> summarize the steps or share a link for my help .  thanks in advance.   And
> apologies for asking very basic queries actually I m new to SNMP.
>
> On 27/10/2014 11:27 pm, "Pal" <[email protected]> wrote:
>>
>> How did you implement your set snmp handler?
>> Every set request needs a write_method function pointer defined and
>> assigned, which then gets called by the agent.
>>
>> Thanks
>> Suresh
>>
>>
>> > On Oct 27, 2014, at 7:15 AM, Vipul Mehta <[email protected]> wrote:
>> >
>> > I have fixed MAX-ACCESS  read-write   to ACCESS read-write.
>> >
>> > but still the problem persists .  Request all to plz provide valuable
>> > inputs.
>> >
>> >> On Mon, Oct 27, 2014 at 4:24 PM, Vipul Mehta <[email protected]>
>> >> wrote:
>> >> Hello,
>> >> Need some help related to snmpset command.
>> >>
>> >> I am trying to use netsnmp agent for publishing Statistics of my
>> >> application on SNMP.
>> >>
>> >> My application will call snmpset to push the statistics in snmpd and
>> >> the monitoring tool will pull statistics from snmpd.
>> >>
>> >> Problem is :: that snmp set fails with below error
>> >>
>> >> snmpset -v 2c -c writer 127.0.0.1 .1.3.6.1.4.1.99987.100 i 10
>> >>
>> >> Error in packet.
>> >> Reason: notWritable (That object does not support modification)
>> >> Failed object: SNMPv2-SMI::enterprises.99987.100
>> >>
>> >>
>> >> Also when i fire snmpget
>> >>
>> >> snmpget -v 2c -c writer 127.0.0.1 .1.3.6.1.4.1.99987.100
>> >> SNMPv2-SMI::enterprises.99987.100 = No Such Object available on this
>> >> agent at this OID
>> >>
>> >> +++++++++++++++++++++
>> >> My snmpd.conf file :::
>> >>
>> >> rwcommunity writer
>> >> rwcommunity public
>> >> rwcommunity private 127.0.0.1
>> >>
>> >>
>> >> ++++++++++++++++
>> >>
>> >> snmpd process is running
>> >>
>> >> snmp     38888     1  0 15:58 ?        00:00:01 /usr/sbin/snmpd -LE 7
>> >> -Lsd -Lf /tmp/snmpdd.log -u snmp -g snmp -I -smux mteTrigger
>> >> mteTriggerConf -p /var/run/snmpd.pid
>> >>
>> >>
>> >> +++++++++++++++++++++++++
>> >>
>> >> MIB file
>> >>
>> >> SAMPLE-MIB DEFINITIONS ::= BEGIN
>> >>
>> >> IMPORTS
>> >>        enterprises, IpAddress
>> >>                FROM RFC1155-SMI
>> >>        DisplayString
>> >>                FROM RFC1213-MIB
>> >>        OBJECT-TYPE
>> >>                FROM RFC-1212;
>> >>
>> >> notifAppStats OBJECT IDENTIFIER ::= { enterprises 99987 }
>> >>
>> >>
>> >>        tempObjj OBJECT-TYPE
>> >>                SYNTAX INTEGER
>> >>                MAX-ACCESS  read-write
>> >>                STATUS  mandatory
>> >>                DESCRIPTION
>> >>                        "for testing."
>> >>
>> >>                ::= { notifAppStats 100 }
>> >>
>> >> END
>> >> ++++++++++++++++++
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > _______________________________________________
>> > Net-snmp-users mailing list
>> > [email protected]
>> > Please see the following page to unsubscribe or change other options:
>> > https://lists.sourceforge.net/lists/listinfo/net-snmp-users

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.