[GH-ISSUE #14] Setting up SMB crawler -> Error: undefined #15

Closed
opened 2026-02-27 15:54:27 +03:00 by kerem · 6 comments
Owner

Originally created by @TrailerTracch on GitHub (Apr 12, 2017).
Original GitHub issue: https://github.com/RD17/ambar/issues/14

Attempting to setup the SMB crawler following the guide in the blog. Problem is I keep getting this red message at the bottom saying Error: undefined. There are no "i" markers on the left or highlighting to tell me where this may be or what it means. Below is my config with some slight edits.

Edits made: IP address, location, login, and password.

{
"id": "Share",
"description": "Share HDD",
"type": "smb",
"locations": [
{
"host_name": "EDITED",
"ip_address": "192.168.1.xxx",
"location": "EDITED"
}
],
"file_regex": "(\.doc[a-z])|(\\.xls[a-z]*)|(\.txt$)|(\.csv$)|(\.htm[a-z])|(\\.ppt[a-z]*)|(\.pdf$)|(\.msg$)|(\.zip$)|(\.eml$)|(\.rtf$)|(\.md$)|(\.png$)|(\.bmp$)|(\.tif[f]*)|(\\.jp[e]*g)",
"credentials": {
"auth_type": "ntlm",
"login": "EDITED",
"password": "EDITED"

},
"schedule": {
"is_active": true,
"cron_schedule": "*/15 * * * *"
},
"max_file_size_bytes": 30000000,
"verbose": true
}

Could the issue be related to the location? I've tried:
"\COMPUTERNAME\SHARE"
"//COMPUTERNAME/SHARE"
"SHARE"

Originally created by @TrailerTracch on GitHub (Apr 12, 2017). Original GitHub issue: https://github.com/RD17/ambar/issues/14 Attempting to setup the SMB crawler following the guide in the blog. Problem is I keep getting this red message at the bottom saying Error: undefined. There are no "i" markers on the left or highlighting to tell me where this may be or what it means. Below is my config with some slight edits. Edits made: IP address, location, login, and password. { "id": "Share", "description": "Share HDD", "type": "smb", "locations": [ { "host_name": "EDITED", "ip_address": "192.168.1.xxx", "location": "EDITED" } ], "file_regex": "(\\.doc[a-z]*$)|(\\.xls[a-z]*$)|(\\.txt$)|(\\.csv$)|(\\.htm[a-z]*$)|(\\.ppt[a-z]*$)|(\\.pdf$)|(\\.msg$)|(\\.zip$)|(\\.eml$)|(\\.rtf$)|(\\.md$)|(\\.png$)|(\\.bmp$)|(\\.tif[f]*$)|(\\.jp[e]*g$)", "credentials": { "auth_type": "ntlm", "login": "EDITED", "password": "EDITED" }, "schedule": { "is_active": true, "cron_schedule": "*/15 * * * *" }, "max_file_size_bytes": 30000000, "verbose": true } Could the issue be related to the location? I've tried: "\\COMPUTERNAME\SHARE" "//COMPUTERNAME/SHARE" "SHARE"
kerem 2026-02-27 15:54:27 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sochix commented on GitHub (Apr 12, 2017):

Hello @TrailerTracch !

Please, add field token to credentials object with empty string value.
It should look like this:

"credentials": {
  "auth_type": "ntlm",
  "login": "EDITED",
  "password": "EDITED"
  "token": ""
},

We fixed the error message, run sudo ./ambar.py update to get the fix
We also updated docs: Crawling Your Own Shared Folders

<!-- gh-comment-id:293580958 --> @sochix commented on GitHub (Apr 12, 2017): Hello @TrailerTracch ! Please, add field `token` to `credentials` object with empty string value. It should look like this: ``` "credentials": { "auth_type": "ntlm", "login": "EDITED", "password": "EDITED" "token": "" }, ``` We fixed the error message, run `sudo ./ambar.py update` to get the fix We also updated docs: [Crawling Your Own Shared Folders](https://blog.ambar.cloud/advanced-ambar-usage-crawling-your-own-shared-folders/)
Author
Owner

@TrailerTracch commented on GitHub (Apr 12, 2017):

EDIT

I fiddled around with it and it worked! Not sure what I was doing wrong but we are good. Thank you very much.

For the record my location is setup as the following in case anyone else has an issue:
"location": "FOLDERNAME"

Thanks for the quick reply and fix! I see now in the screenshot I overlooked the token part.

I have the crawler setup but now I'm stuck at the following:
[info] filecrawler initialized
[error] error connecting to Smb share on PCNAME

I've double checked my account for ambar to access this share but is there anyway to get a more detailed logging on this to figure it out?

<!-- gh-comment-id:293724981 --> @TrailerTracch commented on GitHub (Apr 12, 2017): EDIT I fiddled around with it and it worked! Not sure what I was doing wrong but we are good. Thank you very much. For the record my location is setup as the following in case anyone else has an issue: "location": "FOLDERNAME" Thanks for the quick reply and fix! I see now in the screenshot I overlooked the token part. I have the crawler setup but now I'm stuck at the following: [info] filecrawler initialized [error] error connecting to Smb share on PCNAME I've double checked my account for ambar to access this share but is there anyway to get a more detailed logging on this to figure it out?
Author
Owner

@isido993 commented on GitHub (Apr 13, 2017):

It's quite strange, because in case of smb connection error you should get two lines in the log, like this:

2017-04-13 11:10:00.964: [info] filecrawler initialized
2017-04-13 11:11:00.999: [error] timed out
2017-04-13 11:11:01.007: [error] error connecting to Smb share on DESKTOP-2FHRAM

location field must start with the share name you're going to crawl, e.g. "location": "Share/EnglishStories" or "location": "Share". Have you checked you host name/IP address, also did you try to access your share manually via windows explorer?

<!-- gh-comment-id:293861934 --> @isido993 commented on GitHub (Apr 13, 2017): It's quite strange, because in case of smb connection error you should get two lines in the log, like this: ``` 2017-04-13 11:10:00.964: [info] filecrawler initialized 2017-04-13 11:11:00.999: [error] timed out 2017-04-13 11:11:01.007: [error] error connecting to Smb share on DESKTOP-2FHRAM ``` `location` field must start with the share name you're going to crawl, e.g. `"location": "Share/EnglishStories"` or `"location": "Share"`. Have you checked you host name/IP address, also did you try to access your share manually via windows explorer?
Author
Owner

@TrailerTracch commented on GitHub (Apr 15, 2017):

@fpd4444
Share access via windows explorer was fine along with the IP,name, and account. I believe I just didn't have the other parts of the config correct. I appreciate everyone's help with this and getting me up and running!

<!-- gh-comment-id:294289101 --> @TrailerTracch commented on GitHub (Apr 15, 2017): @fpd4444 Share access via windows explorer was fine along with the IP,name, and account. I believe I just didn't have the other parts of the config correct. I appreciate everyone's help with this and getting me up and running!
Author
Owner

@sochix commented on GitHub (Apr 17, 2017):

@TrailerTracch is problem solved? Can I close the issue?

<!-- gh-comment-id:294441755 --> @sochix commented on GitHub (Apr 17, 2017): @TrailerTracch is problem solved? Can I close the issue?
Author
Owner

@sochix commented on GitHub (Apr 25, 2017):

Closing issue. No response from issue author

<!-- gh-comment-id:297029431 --> @sochix commented on GitHub (Apr 25, 2017): Closing issue. No response from issue author
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ambar#15
No description provided.