Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

SMB crawler not working, share verified working #50

Closed
effnorwood opened this issue Jul 14, 2017 · 15 comments
Closed

SMB crawler not working, share verified working #50

effnorwood opened this issue Jul 14, 2017 · 15 comments

Comments

@effnorwood
Copy link

effnorwood commented Jul 14, 2017

Installed clean today on clean Ubuntu 16.04 install. Verified I can connect to the share from Windows and Linux using mount -t cifs. Crawler config:

{
"id": "data",
"uid": "data_d033e22ae348aeb5660fc2140aec35850c4da997",
"description": "nas crawler",
"type": "smb",
"locations": [
{
"host_name": "nas",
"ip_address": "10.0.0.100",
"location": "data"
}
],
"file_regex": "(\.doc[a-z]$)|(\.xls[a-z]$)|(\.txt$)|(\.csv$)|(\.htm[a-z]$)|(\.ppt[a-z]$)|(\.pdf$)|(\.msg$)|(\.eml$)|(\.rtf$)|(\.md$)|(\.png$)|(\.bmp$)|(\.tif[f]$)|(\.jp[e]g$)|(\.hwp$)",
"credentials": {
"auth_type": "ntlm",
"login": "jes",
"password": "
***",
"token": ""
},
"schedule": {
"is_active": true,
"cron_schedule": "
/15 * * * *"
},
"max_file_size_bytes": 30000000,
"verbose": true
}

Error:
2017-07-14 11:15:00.688: [info] filecrawler initialized
2017-07-14 11:15:00.695: [error]
2017-07-14 11:15:00.700: [error] error connecting to Smb share on nas

Notice that there is nothing by the error at all.

Also, how do I get to the logs for this system? I looked at docker logs but they said nothing about this issue. Thank you.

@sochix
Copy link
Member

sochix commented Jul 19, 2017

Maybe you didn't escape correctly some chars in the password?

@effnorwood
Copy link
Author

effnorwood commented Jul 20, 2017

Password is just all lower case and kind of like 'heythisismypasswordbutitslongsoicanrememberit'. No special characters.

@sochix
Copy link
Member

sochix commented Jul 24, 2017

Ok, can you please run docker logs ambar_crawler_c0 and paste results here

@sochix
Copy link
Member

sochix commented Aug 4, 2017

@effnorwood any news?

@effnorwood
Copy link
Author

Just saw this, will do and get back. Thanks!

@sochix
Copy link
Member

sochix commented Aug 18, 2017

@effnorwood any news?

@sochix
Copy link
Member

sochix commented Aug 31, 2017

No news for 2 weeks. Closing

@sochix sochix closed this as completed Aug 31, 2017
@yuergen
Copy link

yuergen commented Nov 9, 2017

I have the same issue. I can ping the SMB host from a freshly installed virtual machine with ubuntu 16.04. docker logs does not provide any output at all:

root@banane /o/ambar# docker logs ambar_crawler_c0
root@banane /o/ambar# 

To mount the share with mount -t cifs, I need to supply domain="DOMAINNAME"as a mount option in addition to the credentials.

@sochix
Copy link
Member

sochix commented Nov 9, 2017

@yuergen please share with us your crawler config

@yuergen
Copy link

yuergen commented Nov 9, 2017

@sochix yes, sure. Here it is:

{
  "id": "daten",
  "description": "daten",
  "type": "smb",
  "locations": [
    {
      "host_name": "10.0.0.3",
      "ip_address": "10.0.0.3",
      "location": "daten"
    }
  ],
  "file_regex": "(\\.od[a-z]*$)|(\\.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$)|(\\.hwp$)",
  "credentials": {
    "auth_type": "ntlm",
    "login": "js",
    "password": "******",
    "token": ""
  },
  "schedule": {
    "is_active": true,
    "cron_schedule": "24 02 * * *"
  },
  "max_file_size_bytes": 30000000,
  "verbose": true
}

@sochix
Copy link
Member

sochix commented Nov 16, 2017

@yuergen host_name should be the name of the pc not the ip address

@yuergen
Copy link

yuergen commented Nov 18, 2017

I have found a workaround which can be used for testing: Changing the samba-Server's configuration by enabling map untrusted to domain enables ambar to mount the share. Crawling then works.

What is the correct way to supply the samba domain name via the crawler configuration of ambar?

@sochix
Copy link
Member

sochix commented Nov 19, 2017

use domain name in your login, e.g. domain\user_name

@yuergen
Copy link

yuergen commented Nov 22, 2017

@sochix I will test it as soon as possible and give you feedback if it works. Thank you.

@yuergen
Copy link

yuergen commented Nov 26, 2017

@sochix, your suggestion works. Thank you!

For other users it might be important to know that it is necessary to escape the backslash. This results in a config line similar to "login": "DOMAIN\\user",.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants