Solved Cannot backup to SMB share on AWS EC2 share

Status
Not open for further replies.

Foiler

Free User
Joined
Jul 31, 2020
Messages
47
Reaction score
6
3CX running on Debian Linux ..

... trying to back up to an SMB share on an Amazon EC2 instance but getting the error message "Cannot connect to SMB" in setting the backup location.

I have tested the SMB connectivity using other computers, and have enabled SMB1 and checked SMB2 and 3 also enabled on the EC2.

I see this thread https://www.3cx.com/community/threads/smb-backup-location.70518/page-2 had the similar problem .. have checked the local security policy of the EC2 and my Local security policy of "Microsoft Network Server: Digitally sign communications (Always)" was already set to DISABLED.

I have logged into the Debian and installed smbclient to test the smb connections .. the result of that seems like a partial success .. maybe the 3CX is trying to connect SMB over NetBiOS port 139 rather than 445? I tried forcing NetBiOS on and off on the EC2 to no avail.

Sharename Type Comment
--------- ---- -------
3CX-Backup Disk
ADMIN$ Disk Remote Admin
Apps Disk
C$ Disk Default share
IPC$ IPC Remote IPC
Connection to x.x.x.x failed (Error NT_STATUS_CONNECTION_REFUSED)
NetBIOS over TCP disabled -- no workgroup available
 
3CX will connect to that share as the user 'phonesystem' so you'd want to make sure any testing you do is as that user.
 
user 'phonesystem' ??

Don't think so, not sure what you are referring to there .. I was using the -U option in the smbclient command .. and on the Backup Location screen you get to specify a user .. did I miss something here?
 
Sorry it was hurried response. Most of the issues with backup have to do with users not understanding that the backup process runs under the phonesystem user in Linux. If the initial smbclient connection from the box to AWS isn't working then that has nothing to do with 3CX and I'd recommend checking the Debian forums for better support on that issue. Once you've confirmed you can access the share then try it via 3CX. Also it looks like you've turned off signing but per the thread you linked that should be resolved in the current version of 3CX. Can't help much more than that because we do zero SMB backups.
 
Actually it seems to be a 3CX issue.

With Debian commands as follows I can connect to the AWS EC2 share and list backup folder contents:

smbclient -U username \\\\x.x.x.x\\3CX-Backup
WARNING: The "syslog" option is deprecated
Enter phonesystem's password:
Domain=[EC2-name] OS=[Windows Server 2019 Datacenter 17763] Server=[Windows Server 2019 Datacenter 6.3]

smb: \> ls
. D 0 Tue Dec 8 16:01:22 2020
.. D 0 Tue Dec 8 16:01:22 2020
3CX Backups should appear in this folder.txt A 0 Tue Dec 8 16:01:10 2020

7863807 blocks of size 4096. 4060958 blocks available
smb: \>
 
Further update to this .. the Backup SMB Location cannot be set to any SMB server, even on the local network .. the error is always "Cannot connect to SMB" .. I don't think this is a question of credentials but more of connectivity?

Format of network path should be this right?
smb://<ip-address>/sharename

I am starting to wonder if SMB backup location only works with a Windows install of 3CX?
 
Solved it .. you MUST HAVE a forward-slash at the end of the Network Path ..

smb://<ip-address>/sharename/
 
  • Like
Reactions: JohnS_3CX
Hi,

Yes, the server of share needs to have a slash as per this form:

smb://<server>/
smb://<server>/<share>/
 
Status
Not open for further replies.

Members Online Now

No members online now.

Forum statistics

Threads
111,831
Messages
589,277
Members
164,660
Latest member
RJenkinsROCK