[ 
https://issues.apache.org/jira/browse/ARTEMIS-5047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17886282#comment-17886282
 ] 

Juan edited comment on ARTEMIS-5047 at 10/1/24 9:51 PM:
--------------------------------------------------------

Sure thing [~jbertram] .
h3. Configuration to Prevent Lock Loss Issues on SMB Storage

If you are encountering lock loss issues in ActiveMQ Artemis with SMB storage 
(e.g., AWS FSxN), use the following configuration:
 * 
h3. Configuration for ActiveMQ Artemis on SMB Storage:

 # 
 ## {*}Disable Caching for SMB Client{*}:

 * 
 ** 
 *** Use these commands to turn off directory, file, and "file not found" 
caching:

{code:java}
Set-SmbClientConfiguration -DirectoryCacheLifetime 0 -FileInfoCacheLifetime 0 
-FileNotFoundCacheLifetime 0 {code}

 * {*}Restart the SMB Client Service{*}:
 * 
 ** Restart the {{LanmanWorkstation}} service to apply the new settings:


{code:java}
Restart-Service -Name LanmanWorkstation -F {code}
 
 * {*}Verify Configuration{*}:
 * 
 ** After restarting, run:

{code:java}
Get-SmbClientConfiguration {code}

 

Ensure {{{}DirectoryCacheLifetime{}}}, {{{}FileInfoCacheLifetime{}}}, and 
{{FileNotFoundCacheLifetime}} values are set to {{{}0{}}}.
h3. Configuration Impact:

Disabling caching is crucial when using SMB-based storage (e.g., AWS FSxN) to 
prevent stale data issues, which can lead to lock loss, especially with 
ActiveMQ Artemis versions 2.29.0 and above. This helps the server to accurately 
detect file locks in real-time and avoids unexpected shutdowns.


was (Author: JIRAUSER307041):
Sure thing [~jbertram] .
h3. Configuration to Prevent Lock Loss Issues on SMB Storage

If you are encountering lock loss issues in ActiveMQ Artemis with SMB storage 
(e.g., AWS FSxN), use the following configuration:
 # 
h3. Configuration for ActiveMQ Artemis on SMB Storage:

 ## {*}Disable Caching for SMB Client{*}:

 *** Use these commands to turn off directory, file, and "file not found" 
caching:
Set-SmbClientConfiguration -DirectoryCacheLifetime 0 -FileInfoCacheLifetime 0 
-FileNotFoundCacheLifetime 0
 
{{}}
 # {*}Restart the SMB Client Service{*}:

 ** Restart the {{LanmanWorkstation}} service to apply the new settings:
Restart-Service -Name LanmanWorkstation -F
 
 # {*}Verify Configuration{*}:

 ** After restarting, run:
Get-SmbClientConfiguration

 

Ensure {{{}DirectoryCacheLifetime{}}}, {{{}FileInfoCacheLifetime{}}}, and 
{{FileNotFoundCacheLifetime}} values are set to {{{}0{}}}.
h3. Configuration Impact:

Disabling caching is crucial when using SMB-based storage (e.g., AWS FSxN) to 
prevent stale data issues, which can lead to lock loss, especially with 
ActiveMQ Artemis versions 2.29.0 and above. This helps the server to accurately 
detect file locks in real-time and avoids unexpected shutdowns.

> Lost the lock according to the monitor, notifying listeners
> -----------------------------------------------------------
>
>                 Key: ARTEMIS-5047
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5047
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.33.0, 2.37.0
>         Environment: * *Storage Type:* SMB share hosted on AWS FSxN
>  * *Current Version:* NetApp Release 9.14.1P5
>  * *Affected Version:* 2.33.0 / 2.37.0
>  * *Previous Version:* 2.23.1 (issue not observed)
>            Reporter: Juan
>            Priority: Major
>
> After upgrading from version 2.23.1 to 2.33.0 the system has started to fail 
> due to a lock loss. This issue was not present in the previous version and 
> has only surfaced after the upgrade.
> I have seen a similar issue. 
> {noformat}
> (AuditLogger_impl.java:2843) - AMQ601767: STOMP connection c3e5b678 for user 
> unknown@10.118.189.108:64628 created FINEST|6324/0|Service 
> com.docshifter.mq.DocShifterMQ|24-08-22 01:03:51|22 Aug 2024 01:03:51,813 
> WARN [Thread-0 (ActiveMQ-scheduled-threads)] (FileLockNodeManager.java:557) - 
> Lost the lock according to the monitor, notifying listeners 
> FINEST|6324/0|Service com.docshifter.mq.DocShifterMQ|24-08-22 01:03:51|22 Aug 
> 2024 01:03:51,813 ERROR [Thread-0 (ActiveMQ-scheduled-threads)] 
> (ActiveMQServerLogger_impl.java:805) - AMQ222010: Critical IO Error, shutting 
> down the server. file=Lost NodeManager lock, message=NULL 
> FINEST|6324/0|Service com.docshifter.mq.DocShifterMQ|24-08-22 
> 01:03:51|java.io.IOException: lost lock{noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to