bmcweb icon indicating copy to clipboard operation
bmcweb copied to clipboard

SNMP - Unable to configure SNMP manager with FQDN/Hostname

Open prkatti1 opened this issue 3 years ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

Unable to configure SNMP manager with FQDN/Hostname.

Both GUI interface and Redfish does not allow user to configure SNMP managers with fully qualified domain name or hostname of the system.

Steps: Run curl command to configure snmp manager on BMC. Give hostname instead of IP address in the destination part. It throws 500 internal error and does not configure snmp manager

curl -k -H "X-Auth-Token: $bmc_token" -D post.txt -X POST https://${bmc}/redfish/v1/EventService/Subscriptions -d '{"Destination": "snmp://snmp.prashanth.com:162", "SubscriptionType": "SNMPTrap", "Protocol": "SNMPv2c"}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.8.1.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.8.1.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } }bash-4.2$ cat post.txt HTTP/1.1 500 Internal Server Error Strict-Transport-Security: max-age=31536000; includeSubdomains; preload X-Frame-Options: DENY Pragma: no-cache Cache-Control: no-Store,no-Cache X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Security-Policy: default-src 'none'; img-src 'self' data:; font-src 'self'; style-src 'self'; script-src 'self'; connect-src 'self' wss:; form-action 'none'; frame-ancestors 'none'; plugin-types 'none'; base-uri 'none' Content-Type: application/json Date: Mon, 22 Nov 2021 08:01:48 GMT Content-Length: 598

prkatti1 avatar Nov 22 '21 08:11 prkatti1

That does look like a bug. We should be returning something more helpful there; This is an error message only, for something we don't yet support on master (SNMP), so it's not high on my priority list to fix. Feel free to submit patches to resolve this and they will be reviewed.

edtanous avatar Sep 24 '22 17:09 edtanous

That does look like a bug. We should be returning something more helpful there; This is an error message only, for something we don't yet support on master (SNMP), so it's not high on my priority list to fix. Feel free to submit patches to resolve this and they will be reviewed.

Yeah, @ChicagoDuan has fixed this in a new patch submitted, not merged yet. And there are still some minor changes that have not been completed. https://gerrit.openbmc.org/c/openbmc/bmcweb/+/38599

lxwinspur avatar Sep 26 '22 00:09 lxwinspur

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/38599 merged, so I assume we can close ?

gtmills avatar Jul 11 '23 15:07 gtmills

Yep. Closing.

edtanous avatar Jul 11 '23 19:07 edtanous

Agreed.

prkatti1 avatar Jul 12 '23 04:07 prkatti1