Fileshare disconnectivity.

Sai Theja 21 Reputation points
2022-10-13T22:55:51.263+00:00

When i am trying to restart service (JBOSS) my file share connectivity is getting disconnected.

For resolution, have to restart again, this causing problem with my shared drive connection.

Error message:

System error 1219 has occurred.

Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,424 questions
Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,539 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Carlos Solís Salazar 18,191 Reputation points MVP Volunteer Moderator
    2022-10-14T10:45:06.423+00:00

    Hi @Sai Theja

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    It looks like the user for your JBOSS keeps the connection to your Storages Account

    You can close the connections with the following script

    #Get your storage account context  
    $Context = New-AzStorageContext -StorageAccountName "YOUR-STORAGE-ACCOUNT" -StorageAccountKey "CAN-BE-KEY1-OR-KEY2"   
      
    # Check the connections for your fileshare  
    Get-AzStorageFileHandle -Context $Context -ShareName "YOUR-FILESHARE" -Recursive  
    
    # Close the connections for a user  
    Close-AzStorageFileHandle -Context $Context -ShareName "YOUR-FILESHARE" -Path "URL-PATH-FOR-YOUR-USER" -CloseAll  
    

    Also, please review Troubleshoot Azure Files problems in Windows (SMB)

    Hope this helps!

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.


  2. Sumarigo-MSFT 47,471 Reputation points Microsoft Employee Moderator
    2022-10-18T12:25:31.813+00:00

    @Sai Theja Adding more information to the above response!

    Symptoms
    Mount error 1219: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

    Cause
    There might be an open handle on a file by the previously mounted file share which needs to be closed.

    Resolution
    Usually resolves by itself with time.

    A file handle is preventing a file/directory from being modified or deleted. You can use the Get-AzStorageFileHandle PowerShell cmdlet to view open handles. If all SMB clients have closed their open handles on a file/directory and the issue continues to occur, you can force close a file handle.

    #  PowerShell script  
    #  Connect via PowerShell to Azure account  
    Connect-AzAccount  
     #  Set Azure Subscription  
    Select-AzSubscription -subscriptionid "your subscription id"  
    #    Create azure storage account context and list the open handles  
    $Context = New-AzStorageContext -StorageAccountName "storage account name" -StorageAccountKey "your storage account key" Get-AzStorageFileHandle -Context $Context -ShareName "file share name" -Recursive | Sort-Object ClientIP,OpenTime  
    #    To close the open handles  
    $Context = New-AzStorageContext -StorageAccountName "storage account name" -StorageAccountKey "your storage account key" Close-AzStorageFileHandle -ShareName "mysharename" -CloseAll -Recursive (after this command we need to provide context again)  
    #    Re-Check  
    Get-AzStorageFileHandle -Context $Context -ShareName "file share name" -Recursive | Sort-Object ClientIP,OpenTime  
    

    You can use Handle.exe on a Windows client to check if there are open handles on the client against the Azure File share.

    Example: handle <StorageAccountName>.file.core.windows.net

    Please let us know if you have any further queries. I’m happy to assist you further.

    ----------

    Please do not forget to 251599-accept-answer.png and 251585-image.png wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.