NetWorker: dbgcommand fails with "Cannot Open Temporary File '/nsr/tmp/lgdbg.tmp'"

Summary: The dbgcommand fails with "Cannot open temporary file '/nsr/tmp/lgdbg.tmp'" when not logged in as root. Use su [Substitute User] or sudo [Super User Do] to run the command.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

Identified Issue

The dbgcommand fails when not logged in as root.

Cannot open temporary file '/nsr/tmp/lgdbg.tmp'.

Error Message

The error message indicates that the dbgcommand cannot open a temporary file.

[USERNAME@HOSTNAME logs]$ dbgcommand -n nsrsnmd Debug=1
Process ID List : 2454232
Processing PID:2454232
Cannot open temporary file '/nsr/tmp/lgdbg.tmp'.

Cause

Root Cause of the Issue

The root cause of the issue is that the dbgcommand fails when not run as the root user.

This is due to the dbgcommand attempting to access a temporary file '/nsr/tmp/lgdbg.tmp' which it cannot open when run by a non-root username.

Specific Conditions

The issue arises when the dbgcommand is performed from a username without root privileges.

Relevant Error Messages

The error message "Cannot open temporary file '/nsr/tmp/lgdbg.tmp'" is a key indicator of the root cause of the issue.
Also, when the user tries to run the command with sudo, the error message when not on the sudo list

$ sudo dbgcommand -n nsrsnmd Debug=1

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for DELLEMC:
DELLEMC is not in the sudoers file.  This incident will be reported.

Resolution

To resolve the issue, run the dbgcommand with elevated privileges using the su or sudo command.

$ whoami
$ su -
Password: 
# dbgcommand -n nsrsnmd Debug=1

Alternatively, if the user is on the sudo'ers list, the user can use the sudo command to run the dbgcommand.

$ sudo dbgcommand -n nsrsnmd Debug=1
NOTE: If the user is not in the sudoers file, the user receive an error message and the incident will be reported.

Verifying the Resolution

After running the dbgcommand with elevated privileges, verify that the issue has been resolved by checking the output of the command. Also by reviewing the daemon log with nsr_render_log for the message "nsrsnmd SYSTEM notice Changing Debug level from 0 to 1"

Additional Information

Affected Products

NetWorker

Products

NetWorker Family
Article Properties
Article Number: 000331479
Article Type: Solution
Last Modified: 08 ذو الحجة 1447
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.