No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


It notices failed when executing the command in the N8500

Publication Date:  2012-11-05 Views:  151 Downloads:  0

Issue Description

Login in the N8500 via the command line, execute a command but it notices failed, as the following picture displayed:

Enter the other command and there appears the same report.

Alarm Information


Handling Process

Delete the “/opt/VRTSnasgw/log/nasgw.lock.lock” file.
Execute the command, all are normal.

Root Cause

From the above information we can see that because the “upgrade show” command hasn’t been executed completely, so it blocks the other command to execute normally, generally, “upgrade show” can execute fast and can exit normally. Then, try to use the “debug” script, find the script “/opt/VRTSnasgw/scripts/ showall” correlative with the “upgrade show” in the “/home/clish/.clish/upgrade.xml”. In the “root” account, execute the following command manually to go on the “debug”:

From the above information, we can see that the script was blocked all the time when executing to the “globaltrylock”, so check the script file “/opt/VRTSnasgw/scripts/”, then find the code segment used to call the “-showall”, it is this one: “lock -e ${UPGRADE_LOCK}”, then we view the code corresponding with the “lock” function (“lock” function is in the script of “/opt/VRTSnasgw/scripts/”):

From this segment of code, the command was blocked at the “globaltrylock”, so track the corresponding code of the “globaltrylock” function, the “globaltrylock” function will try to obtain the file lock of the “nasgw.lock.lock”, and write the current command into this file. Then, this file has contained the “upgrade show” command, but the process to execute the “upgrade show” hasn’t exited normally, which causes this file hasn’t been released (for the other command), then the other command is blocked as the result of can’t acquire the file lock.