[ 
https://issues.apache.org/jira/browse/OAK-12112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Miroslav Smiljanic updated OAK-12112:
-------------------------------------
    Description: 
UnresolvedAddressException can prevent azure repository lock lease renewal

{noformat}
2026-02-25 00:23:47.555 [AzureRepositoryLock-Refresher] 
org.apache.jackrabbit.oak.segment.azure.AzurePersistence Lost connection to the 
Azure. The client will be closed.
2026-02-25 00:23:47.555 [AzureRepositoryLock-Refresher] 
org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock Can't renew the 
lease
java.nio.channels.UnresolvedAddressException: null
        at java.base/sun.nio.ch.Net.checkAddress(Net.java:143)
        at java.base/sun.nio.ch.Net.checkAddress(Net.java:151)
        at 
java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:842)
        at 
java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:865)
        at io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:91) 
[org.apache.ja
{noformat}


  was:
When the Azure lease renewal times out on the client side (reactor 
IllegalStateException wrapping TimeoutException), the current exception 
handling treats it as a fatal error and triggers shutdown, even though this is 
a transient condition that should be retried. The exception handling in 
refreshLease() should be updated to recognize timeout exceptions (similar to 
BlobStorageException with OPERATION_TIMED_OUT) and continue the retry loop 
instead of invoking the shutdown hook.

{noformat}
11.12.2025 10:37:33.576 *ERROR* [AzureRepositoryLock-Refresher] 
org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock Can't renew the 
lease
java.lang.IllegalStateException: Timeout on blocking read for 5000000000 
NANOSECONDS
        at 
reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:124)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at reactor.core.publisher.Mono.block(Mono.java:1766) 
[org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout(StorageImplUtils.java:149)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse(BlobLeaseClient.java:244)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
com.azure.storage.blob.specialized.BlobLeaseClient.renewLeaseWithResponse(BlobLeaseClient.java:212)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at 
org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock.refreshLease(AzureRepositoryLock.java:137)
 [org.apache.jackrabbit.oak-segment-azure:1.88.0.T20251029163355-5d5086d]
        at java.base/java.lang.Thread.run(Thread.java:1583)
{noformat}

https://github.com/apache/jackrabbit-oak/blob/4cdee6e21938e1d82a67416462bee9c3d4b6dc17/oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java#L164-L167


The place from where the timeout exception is thrown in reactor-core:

https://github.com/reactor/reactor-core/blob/60e3e4d8e5f10992d8d7acee75a5caa58eda1e68/reactor-core/src/main/java/reactor/core/publisher/BlockingSingleSubscriber.java#L127C18-L129C6

Related discussion:
https://github.com/Azure/azure-sdk-for-java/issues/32666


> Add UnresolvedAddressException to the list of transient exceptions that can 
> prevent lease renewal Add UnresolvedAddressException to the list of transient 
> exceptions that can prevent the lease renewal 
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-12112
>                 URL: https://issues.apache.org/jira/browse/OAK-12112
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-azure
>    Affects Versions: 1.88.0
>            Reporter: Miroslav Smiljanic
>            Assignee: Miroslav Smiljanic
>            Priority: Major
>             Fix For: 1.90.0
>
>
> UnresolvedAddressException can prevent azure repository lock lease renewal
> {noformat}
> 2026-02-25 00:23:47.555 [AzureRepositoryLock-Refresher] 
> org.apache.jackrabbit.oak.segment.azure.AzurePersistence Lost connection to 
> the Azure. The client will be closed.
> 2026-02-25 00:23:47.555 [AzureRepositoryLock-Refresher] 
> org.apache.jackrabbit.oak.segment.azure.AzureRepositoryLock Can't renew the 
> lease
> java.nio.channels.UnresolvedAddressException: null
>       at java.base/sun.nio.ch.Net.checkAddress(Net.java:143)
>       at java.base/sun.nio.ch.Net.checkAddress(Net.java:151)
>       at 
> java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:842)
>       at 
> java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:865)
>       at io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:91) 
> [org.apache.ja
> {noformat}



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

Reply via email to