Trouble getting file count on network drive

Started by zabig, September 16, 2016, 09:19:37 AM

Previous topic - Next topic

zabig

Hi!

Our process is generating some files every five minutes and therefore would like to check if the process is running well. I would like to count the number of files that are not older than 30 minutes. When I execute File.Count() on local folder where NetXMS is installed everything is ok and it returns the number of files in that folder. However, when I try to execute the next command  I get ERROR.
File.Count(\\nasrcv01\mape\arhivi\skupni,*,0,0,-1800)

The debug reports next:
[15-Sep-2016 23:45:36.712] [DEBUG] [session:0] Message dump:
  ** 00410000000000980000245D00000001
  ** 00000055010000000000007600460069
  ** 006C0065002E0043006F0075006E0074
  ** 0028005C005C006E0061007300720063
  ** 007600300031005C007500690062005C
  ** 006100720068006900760069005C004E
  ** 00650070006C0061006E005F0073006B
  ** 00750070006E0069002C002A002C0030
  ** 002C0030002C002D0031003800300030
  ** 0029000000000000
  ** code=0x0041 (CMD_GET_PARAMETER) flags=0x0000 id=9309 size=152 numFields=1
  ** [    85] STRING   "File.Count(\\nasrcv01\uib\arhivi\Neplan_skupni,*,0,0,-1800)"

[15-Sep-2016 23:45:36.712] [DEBUG] [session:0] Received message CMD_GET_PARAMETER
[15-Sep-2016 23:45:36.712] [DEBUG] [session:0] Requesting parameter "File.Count(\\nasrcv01\uib\arhivi\Neplan_skupni,*,0,0,-1800)"
[15-Sep-2016 23:45:36.712] [DEBUG] H_DirInfo: path="\\nasrcv01\uib\arhivi\Neplan_skupni" pattern="*" recursive=false mode=1
[15-Sep-2016 23:45:36.712] [DEBUG] [session:0] GetParameterValue(): result is 500 (INTERNAL_ERROR)
[15-Sep-2016 23:45:36.712] [DEBUG] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[15-Sep-2016 23:45:36.712] [DEBUG] [session:0] Outgoing message dump:
  ** 001D0008000000200000245D00000001
  ** 0000001C00000000000001F400000000
  ** code=0x001D (CMD_REQUEST_COMPLETED) flags=0x0008 id=9309 size=32 numFields=1
  ** [    28] INT32    500


What could be the reason for such an error since the debug report doesn't give me any clue what the problem is. The only thing I think of is mybe not access rights...

I'm using version 2.0.6
Thanks, zabig

tomaskir

Try to map the share to a network drive, and then poll the file count from there.

zabig

Thanks for the suggestion but I already did that without success. Here is debug dump:

[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] Message dump:
  ** 00410000000000580000662500000001
  ** 00000055010000000000003800460069
  ** 006C0065002E0043006F0075006E0074
  ** 00280053003A005C0041007200680069
  ** 0076002D006D00650072006900740076
  ** 0065002900000000
  ** code=0x0041 (CMD_GET_PARAMETER) flags=0x0000 id=26149 size=88 numFields=1
  ** [    85] STRING   "File.Count(S:\Arhiv-meritve)"

[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] Received message CMD_GET_PARAMETER
[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] Requesting parameter "File.Count(S:\Arhiv-meritve)"
[16-Sep-2016 14:50:53.932] [DEBUG] H_DirInfo: path="S:\Arhiv-meritve" pattern="*" recursive=false mode=1
[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] GetParameterValue(): result is 500 (INTERNAL_ERROR)
[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] Outgoing message dump:
  ** 001D0000000000200000662500000001
  ** 0000001C00000000000001F400000000
  ** code=0x001D (CMD_REQUEST_COMPLETED) flags=0x0000 id=26149 size=32 numFields=1
  ** [    28] INT32    500

[16-Sep-2016 14:50:53.932] [DEBUG] [session:0] Message dump:
  ** 00410000000000580000662600000001
  ** 00000055010000000000003800460069
  ** 006C0065002E0043006F0075006E0074
  ** 00280053003A005C0041007200680069
  ** 0076002D006D00650072006900740076
  ** 0065002900000000
  ** code=0x0041 (CMD_GET_PARAMETER) flags=0x0000 id=26150 size=88 numFields=1
  ** [    85] STRING   "File.Count(S:\Arhiv-meritve)"

Tatjana Dubrovica

It the code I found that this may happen when it's not possible to run "stat" on this folder. But there is not printed why it was not possible(I can add this to code, but no idea about next release date).
One of possible problems can be that user that runs NetXMS does not have access to this folder.