You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Margus Roo <ma...@roo.ee> on 2017/01/23 13:07:30 UTC
Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Hi
I have set up cluster. I am using external zookeeper. I have the same
connection strings in nifi.properties and state-management.xml files.
DistributedMapCacheServer is set up under controller services. One
interesting think I noticed that there is not any record under
Referencing Components under DistributedMapCacheServer settings tab but
I have set Distributed Cache Service property under ListHDFS processor.
I can get ListHDFS processor record from zookeeper cluster:
[zk: localhost:2181(CONNECTED) 1] get
/nifi/components/cb084e86-0159-1000-0000-00001b125b80
1484732837694listing.timestamp
cZxid = 0x800000315
ctime = Mon Jan 23 13:20:48 EET 2017
mZxid = 0x8000022cf
mtime = Mon Jan 23 14:55:47 EET 2017
pZxid = 0x800000315
cversion = 0
dataVersion = 7091
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 77
numChildren = 0
[zk: localhost:2181(CONNECTED) 2]
but trying to get state via NIFI I will get:
Unable to get the state for the specified component
cb084e86-0159-1000-0000-00001b125b80: java.io.IOException: Failed to
obtain value from ZooKeeper for component with ID
cb084e86-0159-1000-0000-00001b125b80 with exception code CONNECTIONLOSS
any hint?
--
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
https://www.facebook.com/allan.tuuring
+372 51 48 780
Re: Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Posted by Margus Roo <ma...@roo.ee>.
I think I found a root cause to. Reconfigured all servers I found that
in one server in state-management.xml <property name="Connect String">
property was empty. It was the last server I added and after added it I
got again CONNECTIONLOSS. So I filled Connection String as required and
now it works.
Conclusion - check everything twice :)
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
https://www.facebook.com/allan.tuuring
+372 51 48 780
On 24/01/2017 13:14, Margus Roo wrote:
> This 409 lead me to idea that smth is wrong with my states or in zk.
> So I stopped all nifis. Cleaned all repositories and state/local
> directories. Created new zookeeper namespace in state-management.xml
> and nifi.properties. Started servers. All my workflows were still
> there because I did not touch flow.xml.gz files. After nifis up and
> processors records were in zookeeper I can see states via nifi.
>
> I still do not know what causes error but at least I know now how to
> fix it somehow.
>
> Margus (margusja) Roo
> http://margus.roo.ee
> skype: margusja
> https://www.facebook.com/allan.tuuring
> +372 51 48 780
>
> On 24/01/2017 09:38, Margus Roo wrote:
>> Is 409 Conflict something I should focus?
>>
>> [nifi@bigdata32 nifi-1.1.1]$ telnet bigdata33 9090
>> Trying 192.168.80.21...
>> Connected to bigdata33.
>> Escape character is '^]'.
>> GET /nifi-api/processors/cb084e86-0159-1000-0000-00001b125b80/state
>> HTTP/1.1
>> Host: bigdata33:9090
>> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:47.0)
>> Gecko/20100101 Firefox/47.0
>> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>> Accept-Language: en-US,en;q=0.5
>> Accept-Encoding: gzip, deflate
>> Connection: keep-alive
>>
>> HTTP/1.1 409 Conflict
>> Date: Tue, 24 Jan 2017 07:37:46 GMT
>> Server: Jetty(9.3.9.v20160517)
>> Date: Tue, 24 Jan 2017 07:37:46 GMT
>> Date: Tue, 24 Jan 2017 07:37:46 GMT
>> Content-Type: text/plain
>> Content-Length: 242
>>
>> Unable to get the state for the specified component
>> cb084e86-0159-1000-0000-00001b125b80: java.io.IOException: Failed to
>> obtain value from ZooKeeper for component with ID
>> cb084e86-0159-1000-0000-00001b125b80 with exception code CONNECTIONLOSS
>>
>> Margus (margusja) Roo
>> http://margus.roo.ee
>> skype: margusja
>> https://www.facebook.com/allan.tuuring
>> +372 51 48 780
>>
>> On 23/01/2017 17:32, Margus Roo wrote:
>>> I am getting CONNECTIONLOSS every time I am trying to get status. I
>>> can not get this message from any log. Zookeeper out log is clean
>>> and there is no any hints in nifi app log.
>>> Any hints how to debug this CONNECTIONLOSS? As I understand I have
>>> necessary information written in Zookeeper but stateManager can not
>>> read it?
>>>
>>> Margus (margusja) Roo
>>> http://margus.roo.ee
>>> skype: margusja
>>> https://www.facebook.com/allan.tuuring
>>> +372 51 48 780
>>>
>>> On 23/01/2017 16:31, Bryan Bende wrote:
>>>> Regarding the distributed cache... ListHDFS references the
>>>> DistributedMapCacheClient, there is no direct reference between
>>>> DistributedMapCacheClient and DistributedMapCacheServer because
>>>> they communicate over a network connection.
>>>
>>
>
Re: Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Posted by Margus Roo <ma...@roo.ee>.
This 409 lead me to idea that smth is wrong with my states or in zk. So
I stopped all nifis. Cleaned all repositories and state/local
directories. Created new zookeeper namespace in state-management.xml and
nifi.properties. Started servers. All my workflows were still there
because I did not touch flow.xml.gz files. After nifis up and processors
records were in zookeeper I can see states via nifi.
I still do not know what causes error but at least I know now how to fix
it somehow.
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
https://www.facebook.com/allan.tuuring
+372 51 48 780
On 24/01/2017 09:38, Margus Roo wrote:
> Is 409 Conflict something I should focus?
>
> [nifi@bigdata32 nifi-1.1.1]$ telnet bigdata33 9090
> Trying 192.168.80.21...
> Connected to bigdata33.
> Escape character is '^]'.
> GET /nifi-api/processors/cb084e86-0159-1000-0000-00001b125b80/state
> HTTP/1.1
> Host: bigdata33:9090
> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:47.0)
> Gecko/20100101 Firefox/47.0
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: en-US,en;q=0.5
> Accept-Encoding: gzip, deflate
> Connection: keep-alive
>
> HTTP/1.1 409 Conflict
> Date: Tue, 24 Jan 2017 07:37:46 GMT
> Server: Jetty(9.3.9.v20160517)
> Date: Tue, 24 Jan 2017 07:37:46 GMT
> Date: Tue, 24 Jan 2017 07:37:46 GMT
> Content-Type: text/plain
> Content-Length: 242
>
> Unable to get the state for the specified component
> cb084e86-0159-1000-0000-00001b125b80: java.io.IOException: Failed to
> obtain value from ZooKeeper for component with ID
> cb084e86-0159-1000-0000-00001b125b80 with exception code CONNECTIONLOSS
>
> Margus (margusja) Roo
> http://margus.roo.ee
> skype: margusja
> https://www.facebook.com/allan.tuuring
> +372 51 48 780
>
> On 23/01/2017 17:32, Margus Roo wrote:
>> I am getting CONNECTIONLOSS every time I am trying to get status. I
>> can not get this message from any log. Zookeeper out log is clean and
>> there is no any hints in nifi app log.
>> Any hints how to debug this CONNECTIONLOSS? As I understand I have
>> necessary information written in Zookeeper but stateManager can not
>> read it?
>>
>> Margus (margusja) Roo
>> http://margus.roo.ee
>> skype: margusja
>> https://www.facebook.com/allan.tuuring
>> +372 51 48 780
>>
>> On 23/01/2017 16:31, Bryan Bende wrote:
>>> Regarding the distributed cache... ListHDFS references the
>>> DistributedMapCacheClient, there is no direct reference between
>>> DistributedMapCacheClient and DistributedMapCacheServer because they
>>> communicate over a network connection.
>>
>
Re: Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Posted by Margus Roo <ma...@roo.ee>.
Is 409 Conflict something I should focus?
[nifi@bigdata32 nifi-1.1.1]$ telnet bigdata33 9090
Trying 192.168.80.21...
Connected to bigdata33.
Escape character is '^]'.
GET /nifi-api/processors/cb084e86-0159-1000-0000-00001b125b80/state HTTP/1.1
Host: bigdata33:9090
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:47.0)
Gecko/20100101 Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
HTTP/1.1 409 Conflict
Date: Tue, 24 Jan 2017 07:37:46 GMT
Server: Jetty(9.3.9.v20160517)
Date: Tue, 24 Jan 2017 07:37:46 GMT
Date: Tue, 24 Jan 2017 07:37:46 GMT
Content-Type: text/plain
Content-Length: 242
Unable to get the state for the specified component
cb084e86-0159-1000-0000-00001b125b80: java.io.IOException: Failed to
obtain value from ZooKeeper for component with ID
cb084e86-0159-1000-0000-00001b125b80 with exception code CONNECTIONLOSS
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
https://www.facebook.com/allan.tuuring
+372 51 48 780
On 23/01/2017 17:32, Margus Roo wrote:
> I am getting CONNECTIONLOSS every time I am trying to get status. I
> can not get this message from any log. Zookeeper out log is clean and
> there is no any hints in nifi app log.
> Any hints how to debug this CONNECTIONLOSS? As I understand I have
> necessary information written in Zookeeper but stateManager can not
> read it?
>
> Margus (margusja) Roo
> http://margus.roo.ee
> skype: margusja
> https://www.facebook.com/allan.tuuring
> +372 51 48 780
>
> On 23/01/2017 16:31, Bryan Bende wrote:
>> Regarding the distributed cache... ListHDFS references the
>> DistributedMapCacheClient, there is no direct reference between
>> DistributedMapCacheClient and DistributedMapCacheServer because they
>> communicate over a network connection.
>
Re: Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Posted by Margus Roo <ma...@roo.ee>.
I can see some related traffic in zookeeper port:
[root@bigdata33 ~]# tcpdump -i any -A port 2181 | grep
cb084e86-0159-1000-0000-00001b125b80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535
bytes
.).@6.:k...B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.................
1484732837694......................nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
.*.+6.>X...B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.................
1484732837694......................nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
.*..6.BD...B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.............0f24
1484732837694......................nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
.*.!6.F....B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80...M........emitt
6.I46.D....B...N.......5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.................
~...6.-O...B...........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.0-8d84-52a750f24
.*..6.I2...B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.ck-0000000560...
1484732837694......................nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
.*..6.J....B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80...M........emitt
1484732837694......................nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
.*..6.N....B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80.Y.......Y.......
1484732837694....672-ebde-4110-8d..nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
.*..6.Q....B..c........5/nifi/components/cb084e86-0159-1000-0000-00001b125b80...M........emitt
1484732837694....672-ebde-4110-8d..nents/cb084e86-0159-1000-0000-00001b125b80...M........emitted.timestamp..
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
https://www.facebook.com/allan.tuuring
+372 51 48 780
On 23/01/2017 17:32, Margus Roo wrote:
> I am getting CONNECTIONLOSS every time I am trying to get status. I
> can not get this message from any log. Zookeeper out log is clean and
> there is no any hints in nifi app log.
> Any hints how to debug this CONNECTIONLOSS? As I understand I have
> necessary information written in Zookeeper but stateManager can not
> read it?
>
> Margus (margusja) Roo
> http://margus.roo.ee
> skype: margusja
> https://www.facebook.com/allan.tuuring
> +372 51 48 780
>
> On 23/01/2017 16:31, Bryan Bende wrote:
>> Regarding the distributed cache... ListHDFS references the
>> DistributedMapCacheClient, there is no direct reference between
>> DistributedMapCacheClient and DistributedMapCacheServer because they
>> communicate over a network connection.
>
Re: Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Posted by Margus Roo <ma...@roo.ee>.
I am getting CONNECTIONLOSS every time I am trying to get status. I can
not get this message from any log. Zookeeper out log is clean and there
is no any hints in nifi app log.
Any hints how to debug this CONNECTIONLOSS? As I understand I have
necessary information written in Zookeeper but stateManager can not read it?
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
https://www.facebook.com/allan.tuuring
+372 51 48 780
On 23/01/2017 16:31, Bryan Bende wrote:
> Regarding the distributed cache... ListHDFS references the
> DistributedMapCacheClient, there is no direct reference between
> DistributedMapCacheClient and DistributedMapCacheServer because they
> communicate over a network connection.
Re: Nifi 1.1.1 ListHDFS view state - Unable to get the state for the
specified component ... with exception code CONNECTIONLOSS
Posted by Bryan Bende <bb...@gmail.com>.
Hello,
Regarding the distributed cache... ListHDFS references the
DistributedMapCacheClient, there is no direct reference between
DistributedMapCacheClient and DistributedMapCacheServer because they
communicate over a network connection.
In 1.x the HDFS processors no longer use the distributed cache for state
management, they use NiFi's internal state management API (which is backed
by Zookeeper in this case), but we left the distributed cache so that if
someone upgrades from NiFi 0.x to 1.x it will migrate the data from the
cache to ZooKeeper.
Regarding the other error, is there any chance there is a network issue
between your NiFi nodes and your zookeeper nodes? do you get that error
every time you try to view state or just sometimes? It is showing a
CONNECTIONLOSS which means NiFi lost connection to the ZooKeeper server.
-Bryan
On Mon, Jan 23, 2017 at 8:07 AM, Margus Roo <ma...@roo.ee> wrote:
> Hi
> I have set up cluster. I am using external zookeeper. I have the same
> connection strings in nifi.properties and state-management.xml files.
> DistributedMapCacheServer is set up under controller services. One
> interesting think I noticed that there is not any record under Referencing
> Components under DistributedMapCacheServer settings tab but I have set
> Distributed Cache Service property under ListHDFS processor.
>
> I can get ListHDFS processor record from zookeeper cluster:
> [zk: localhost:2181(CONNECTED) 1] get /nifi/components/cb084e86-
> 0159-1000-0000-00001b125b80
> 1484732837694listing.timestamp
> cZxid = 0x800000315
> ctime = Mon Jan 23 13:20:48 EET 2017
> mZxid = 0x8000022cf
> mtime = Mon Jan 23 14:55:47 EET 2017
> pZxid = 0x800000315
> cversion = 0
> dataVersion = 7091
> aclVersion = 0
> ephemeralOwner = 0x0
> dataLength = 77
> numChildren = 0
> [zk: localhost:2181(CONNECTED) 2]
>
> but trying to get state via NIFI I will get:
> Unable to get the state for the specified component
> cb084e86-0159-1000-0000-00001b125b80: java.io.IOException: Failed to
> obtain value from ZooKeeper for component with ID cb084e86-0159-1000-0000-00001b125b80
> with exception code CONNECTIONLOSS
>
> any hint?
>
> --
> Margus (margusja) Roohttp://margus.roo.ee
> skype: margusjahttps://www.facebook.com/allan.tuuring+372 51 48 780 <+372%20514%208780>
>
>