web stats
Unstable Connectivity for File Reader using SMB - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2019, 06:00 AM
hyinkm hyinkm is offline
What's HL7?
 
Join Date: May 2015
Posts: 4
hyinkm is on a distinguished road
Default Unstable Connectivity for File Reader using SMB

We have Mirth Connect 3.5.2.
I have a channel set up using a source connector as a File Reader to read xml files via SMB.
This connection worked initially and suddenly is now unable to connect.
I have the client's SMB credentials (IP/Path of folder, username and password)
I have worked with the client to confirm the credentials and permissions are set properly on this folder to read.
I am able to access this same folder via windows explorer.

Can you suggest anything to assist in resolving this inability to connect and pick up these files with Mirth Connect using SMB?
Reply With Quote
  #2  
Old 08-21-2019, 06:41 AM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,360
cory_cole is on a distinguished road
Default

On your source connection, you will have a button that says 'Test Read'. Is that successful?
Reply With Quote
  #3  
Old 08-21-2019, 01:29 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,159
agermano is on a distinguished road
Default

If they upgraded a server or changed group policy, the SMB File Writer only supports SMB1, and won't be able to connect if they have that protocol disabled.

http://www.mirthcorp.com/community/i...wse/MIRTH-4239

I ran into this recently, and my solution (when running mirth on windows) was to call the following from the deploy script :

Code:
logger.info('channel: "' + channelName + '" deploy: ' +
JSON.stringify(executeRuntimeCommand(['net', 'use', 'q:', '\\\\10.120.101.20\\share', $('Password'), '/USER:' + $('User')])));
The drive will get mounted for the user the mirth service is running as. Then I had my File Writer write to the mounted drive as a local file instead of SMB.

The code template for executeRuntimeCommand is here https://github.com/nextgenhealthcare...time%20Command
Reply With Quote
  #4  
Old 08-22-2019, 08:22 AM
omnitux omnitux is offline
Mirth Newb
 
Join Date: Jan 2017
Posts: 15
omnitux is on a distinguished road
Default Use mklink

On a Windows Server we prefer to use "mklink" to mount a folder to a network drive. After that you can use the standard file connector.

Example
Code:
mklink /D D:\Transfer \\server\share
This will create a link to your share. In Mirth you can now use "FileReader" with method "file" and use the path "D:\Transfer" to get access to your share.

[Edit]: You'll need a cmd console with admin rights to create the link.

Good luck

Last edited by omnitux; 08-22-2019 at 08:24 AM.
Reply With Quote
  #5  
Old 08-22-2019, 08:44 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,159
agermano is on a distinguished road
Default

I can't tell if it's the same case as the original poster, but in my case, the share belonged to a third party, and I needed to supply alternate credentials. I don't think there's a way to do that with mklink unless you call 'net use' first to connect to the share before you link it.

Network connections in windows are per user, and even if you link it as an admin, I don't think that will automatically give other users access if their current user doesn't already have permission to the share, but I could be wrong about that part.

You don't need local admin rights to map a drive for the current user.
Reply With Quote
  #6  
Old 08-22-2019, 11:42 PM
omnitux omnitux is offline
Mirth Newb
 
Join Date: Jan 2017
Posts: 15
omnitux is on a distinguished road
Default

Of cause you are right. I forgot to mention that the user who starts the mirthconnect service has to be able to connect to the share. In my opinion the original poster needs a stable connection to a share and I can confirm that Java's SMB connection are often not stable enough for production environments. So in my experience it's a good way to use mklink.

Local admin rights are only needed if you make the link in a folder where you need these rights - maybe in C:\ or something like that.
Reply With Quote
  #7  
Old 08-26-2019, 05:49 AM
hyinkm hyinkm is offline
What's HL7?
 
Join Date: May 2015
Posts: 4
hyinkm is on a distinguished road
Default

The 'test connection' is not successful.
Reply With Quote
Reply

Tags
smb, source connector

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation