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

Osman Sebati Cam commented on CURATOR-168:
------------------------------------------

 getting the same issue with curator version 4.6 as well, so highlighting that 
none of the fixes from 4.6 to 4.7 is causing that, here is the full stack trace

 [CuratorFramework-0-EventThread] ERROR o.a.c.f.imps.CuratorFrameworkImpl - 
Background exception was not retry-able or retry gave up
java.lang.IllegalArgumentException: Path must start with / character
at org.apache.curator.utils.PathUtils.validatePath(PathUtils.java:53) 
at org.apache.curator.utils.ZKPaths.getNodeFromPath(ZKPaths.java:56) 
at 
org.apache.curator.framework.recipes.leader.LeaderLatch.checkLeadership(LeaderLatch.java:523)
at 
org.apache.curator.framework.recipes.leader.LeaderLatch.access$700(LeaderLatch.java:62)
 
at 
org.apache.curator.framework.recipes.leader.LeaderLatch$7.processResult(LeaderLatch.java:581)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:715)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:502)
at 
org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:166)
at 
org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:590) 
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498) 

(as it is happening quite seldom there is no testcase to reproduce this)

> Error 'Path must start with / character'  caused by code 
> 'setNode(event.getName());'  in line 487 of LeaderLatch.class source file in 
> which  'event.getName()' sometimes only return the last part of znode path 
> instead of the full path.
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CURATOR-168
>                 URL: https://issues.apache.org/jira/browse/CURATOR-168
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.7.0
>         Environment: operating system:ubuntu
>            Reporter: zhaogang
>            Priority: Blocker
>             Fix For: 3.0.0, 2.7.1
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> We use LeaderLatch for leader election within our several zookeeper 
> clients,but sometimes our leaderLatch stopped to work due to a error 
> "Background exception was not retry-able or retry gave up 
> java.lang.IllegalArgumentException: Path must start with / characte".
> To found the reason we tracked the execution of program in class LeaderLatch 
> with debug mode,we found the code "setNode(event.getName());"  in line 487 of 
> LeaderLatch.class in which "event.getName()" code sometimes didn't return the 
> full path of the znode but only return the last part of the full path,like 
> "_c_b1097329-4a77-493b-806c-5c888067eeab-latch-0000004068", but the full path 
> should be 
> "/api1/leaders/_c_b1097329-4a77-493b-806c-5c888067eeab-latch-0000004068".
> So  the when 
> event.getName()=="_c_b1097329-4a77-493b-806c-5c888067eeab-latch-0000004068", 
> the program will fail to go through the codes below:
> 1.LeaderLatch.checkLeadership()  line 526
> 2.ZKPaths.getNodeFromPath()      line 61
> 3.PathUtils.validatePath(path)        line 46
> And then the LeaderLatch stopped to work. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to