You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Chris Teoh <ch...@gmail.com> on 2015/09/18 07:39:57 UTC

How to recover flow graphics after running NiFi.sh install?

Hi,

I was testing NiFi using a test user and then decided to install it using
the NiFi.sh install script. Now it is running as root and I have lost all
the flows. Flow.xml.gz is empty. How do I get it back?

Thanks in advance
Chris

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Mark Payne <ma...@hotmail.com>.
Chris,

I want to make sure that we all are on the same page here about what is going on.

I'm wondering if the flow.xml.gz got destroyed somehow when switching between users or if NiFi
was just unable to read it due to permissions and what not. Can you check the size of the conf/flow.xml.gz file on disk
and tell me what size the file is?

Thanks
-Mark

> On Sep 18, 2015, at 1:39 AM, Chris Teoh <ch...@gmail.com> wrote:
> 
> Hi,
> 
> I was testing NiFi using a test user and then decided to install it using the NiFi.sh install script. Now it is running as root and I have lost all the flows. Flow.xml.gz is empty. How do I get it back?
> 
> Thanks in advance
> Chris


Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
Hi Matt,

Their browser goes to the NiFi loading page but never goes to the flows
diagram.
On Fri, 25 Sep 2015 at 9:48 PM, Matt Gilman <ma...@gmail.com> wrote:

> Chris,
>
> Can you please elaborate? What do you mean by the page stops working?
>
> Thanks!
>
> Matt
>
> On Fri, Sep 25, 2015 at 5:57 AM, Chris Teoh <ch...@gmail.com> wrote:
>
>> We have had other users encounter another issue where the page displaying
>> the flows stop working. How do they recover from this? A restart didn't
>> work.
>>
>> On Tue, 22 Sep 2015 at 12:13 Chris Teoh <ch...@gmail.com> wrote:
>>
>>> That being said, is there a way to backup and restore your flow files
>>> and flow graphics?
>>> On Sat, 19 Sep 2015 at 2:36 PM, Chris Teoh <ch...@gmail.com> wrote:
>>>
>>>> I was running NiFi as a non root and created all my flows with that. I
>>>> then ran install as root and started it as root. That was when I lost all
>>>> the flows, I was presented with an empty NiFi page.
>>>> On Sat, 19 Sep 2015 at 10:11 am Mark Payne <ma...@hotmail.com>
>>>> wrote:
>>>>
>>>>> Chris,
>>>>>
>>>>> It's really odd that you would lose the flow. I tried to replicate.
>>>>> Created a flow as myself. Then installed as a service as root. Restarted
>>>>> via "sudo service nifi start" and everything was fine.
>>>>> Then restarted as myself. This time, it failed to started because it
>>>>> didn't have sufficient read permissions on flow.xml.gz.
>>>>> Restarted as root and everything was fine.
>>>>> Changed permissions and restarted as myself and all was fine.
>>>>>
>>>>> Any other details as to what may have caused this to happen?
>>>>>
>>>>> Thanks
>>>>> -Mark
>>>>>
>>>>>
>>>>> On Sep 18, 2015, at 7:20 PM, Chris Teoh <ch...@gmail.com> wrote:
>>>>>
>>>>> Thanks for the prompt responses Mark.
>>>>>
>>>>> The size of flow.xml.gz is 20 bytes. A zcat returns nothing.
>>>>>
>>>>> I'm seeing the process run as sudo which seems ok but I never saw it
>>>>> listen on port 8080. I suspect because it was initially running as root
>>>>> after I ran install before I changed run.as setting, the non root
>>>>> user was failing to write the logs as they were owned by root.
>>>>>
>>>>> I changed the ownership back to the non root user and just manually su
>>>>> to that user and ran it. This time was fine except I had already lost the
>>>>> flows when I first ran as root.
>>>>>
>>>>> On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <ma...@hotmail.com>
>>>>> wrote:
>>>>>
>>>>>> Chris,
>>>>>>
>>>>>> We do have some work to do here to make the run.as work better.
>>>>>> Currently, the way that it works
>>>>>> is that you will see the bootstrap run as root, and it launches a new
>>>>>> process using "sudo -u ..."
>>>>>> That process that is launched with "sudo -u" is the NiFi instance, so
>>>>>> that it should be run as the user
>>>>>> specified. However, the bootstrap itself is still launched as root, I
>>>>>> believe.
>>>>>>
>>>>>> Is this not what you are seeing?
>>>>>>
>>>>>> Thanks
>>>>>> -Mark
>>>>>>
>>>>>>
>>>>>> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
>>>>>>
>>>>>> I tried editing the run.as setting NiFi properties file but that
>>>>>> appears to not work. I see the root owned process running sudo -u user but
>>>>>> doesn't seem to be working.
>>>>>> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Yes I ran the install as root. Previously just ran as a normal user
>>>>>>> running NiFi.sh start
>>>>>>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Chris,
>>>>>>>>
>>>>>>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it'
>>>>>>>> most
>>>>>>>> likely.  There is a (very) small chance that a partially written
>>>>>>>> version of the flow still exists there with it and you can check
>>>>>>>> that
>>>>>>>> with something like 'ls -altr'.
>>>>>>>>
>>>>>>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>>>>>>> to better understand the steps you followed so we can help prevent
>>>>>>>> this in the future if possible.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Joe
>>>>>>>>
>>>>>>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>>>>>>> wrote:
>>>>>>>> > Hi,
>>>>>>>> >
>>>>>>>> > I was testing NiFi using a test user and then decided to install
>>>>>>>> it using
>>>>>>>> > the NiFi.sh install script. Now it is running as root and I have
>>>>>>>> lost all
>>>>>>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>>>>>>> >
>>>>>>>> > Thanks in advance
>>>>>>>> > Chris
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Matt Gilman <ma...@gmail.com>.
Chris,

Can you please elaborate? What do you mean by the page stops working?

Thanks!

Matt

On Fri, Sep 25, 2015 at 5:57 AM, Chris Teoh <ch...@gmail.com> wrote:

> We have had other users encounter another issue where the page displaying
> the flows stop working. How do they recover from this? A restart didn't
> work.
>
> On Tue, 22 Sep 2015 at 12:13 Chris Teoh <ch...@gmail.com> wrote:
>
>> That being said, is there a way to backup and restore your flow files and
>> flow graphics?
>> On Sat, 19 Sep 2015 at 2:36 PM, Chris Teoh <ch...@gmail.com> wrote:
>>
>>> I was running NiFi as a non root and created all my flows with that. I
>>> then ran install as root and started it as root. That was when I lost all
>>> the flows, I was presented with an empty NiFi page.
>>> On Sat, 19 Sep 2015 at 10:11 am Mark Payne <ma...@hotmail.com> wrote:
>>>
>>>> Chris,
>>>>
>>>> It's really odd that you would lose the flow. I tried to replicate.
>>>> Created a flow as myself. Then installed as a service as root. Restarted
>>>> via "sudo service nifi start" and everything was fine.
>>>> Then restarted as myself. This time, it failed to started because it
>>>> didn't have sufficient read permissions on flow.xml.gz.
>>>> Restarted as root and everything was fine.
>>>> Changed permissions and restarted as myself and all was fine.
>>>>
>>>> Any other details as to what may have caused this to happen?
>>>>
>>>> Thanks
>>>> -Mark
>>>>
>>>>
>>>> On Sep 18, 2015, at 7:20 PM, Chris Teoh <ch...@gmail.com> wrote:
>>>>
>>>> Thanks for the prompt responses Mark.
>>>>
>>>> The size of flow.xml.gz is 20 bytes. A zcat returns nothing.
>>>>
>>>> I'm seeing the process run as sudo which seems ok but I never saw it
>>>> listen on port 8080. I suspect because it was initially running as root
>>>> after I ran install before I changed run.as setting, the non root user
>>>> was failing to write the logs as they were owned by root.
>>>>
>>>> I changed the ownership back to the non root user and just manually su
>>>> to that user and ran it. This time was fine except I had already lost the
>>>> flows when I first ran as root.
>>>>
>>>> On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <ma...@hotmail.com>
>>>> wrote:
>>>>
>>>>> Chris,
>>>>>
>>>>> We do have some work to do here to make the run.as work better.
>>>>> Currently, the way that it works
>>>>> is that you will see the bootstrap run as root, and it launches a new
>>>>> process using "sudo -u ..."
>>>>> That process that is launched with "sudo -u" is the NiFi instance, so
>>>>> that it should be run as the user
>>>>> specified. However, the bootstrap itself is still launched as root, I
>>>>> believe.
>>>>>
>>>>> Is this not what you are seeing?
>>>>>
>>>>> Thanks
>>>>> -Mark
>>>>>
>>>>>
>>>>> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
>>>>>
>>>>> I tried editing the run.as setting NiFi properties file but that
>>>>> appears to not work. I see the root owned process running sudo -u user but
>>>>> doesn't seem to be working.
>>>>> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Yes I ran the install as root. Previously just ran as a normal user
>>>>>> running NiFi.sh start
>>>>>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>>>>>
>>>>>>> Chris,
>>>>>>>
>>>>>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it'
>>>>>>> most
>>>>>>> likely.  There is a (very) small chance that a partially written
>>>>>>> version of the flow still exists there with it and you can check that
>>>>>>> with something like 'ls -altr'.
>>>>>>>
>>>>>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>>>>>> to better understand the steps you followed so we can help prevent
>>>>>>> this in the future if possible.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Joe
>>>>>>>
>>>>>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>>>>>> wrote:
>>>>>>> > Hi,
>>>>>>> >
>>>>>>> > I was testing NiFi using a test user and then decided to install
>>>>>>> it using
>>>>>>> > the NiFi.sh install script. Now it is running as root and I have
>>>>>>> lost all
>>>>>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>>>>>> >
>>>>>>> > Thanks in advance
>>>>>>> > Chris
>>>>>>>
>>>>>>
>>>>>
>>>>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
We have had other users encounter another issue where the page displaying
the flows stop working. How do they recover from this? A restart didn't
work.

On Tue, 22 Sep 2015 at 12:13 Chris Teoh <ch...@gmail.com> wrote:

> That being said, is there a way to backup and restore your flow files and
> flow graphics?
> On Sat, 19 Sep 2015 at 2:36 PM, Chris Teoh <ch...@gmail.com> wrote:
>
>> I was running NiFi as a non root and created all my flows with that. I
>> then ran install as root and started it as root. That was when I lost all
>> the flows, I was presented with an empty NiFi page.
>> On Sat, 19 Sep 2015 at 10:11 am Mark Payne <ma...@hotmail.com> wrote:
>>
>>> Chris,
>>>
>>> It's really odd that you would lose the flow. I tried to replicate.
>>> Created a flow as myself. Then installed as a service as root. Restarted
>>> via "sudo service nifi start" and everything was fine.
>>> Then restarted as myself. This time, it failed to started because it
>>> didn't have sufficient read permissions on flow.xml.gz.
>>> Restarted as root and everything was fine.
>>> Changed permissions and restarted as myself and all was fine.
>>>
>>> Any other details as to what may have caused this to happen?
>>>
>>> Thanks
>>> -Mark
>>>
>>>
>>> On Sep 18, 2015, at 7:20 PM, Chris Teoh <ch...@gmail.com> wrote:
>>>
>>> Thanks for the prompt responses Mark.
>>>
>>> The size of flow.xml.gz is 20 bytes. A zcat returns nothing.
>>>
>>> I'm seeing the process run as sudo which seems ok but I never saw it
>>> listen on port 8080. I suspect because it was initially running as root
>>> after I ran install before I changed run.as setting, the non root user
>>> was failing to write the logs as they were owned by root.
>>>
>>> I changed the ownership back to the non root user and just manually su
>>> to that user and ran it. This time was fine except I had already lost the
>>> flows when I first ran as root.
>>>
>>> On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <ma...@hotmail.com> wrote:
>>>
>>>> Chris,
>>>>
>>>> We do have some work to do here to make the run.as work better.
>>>> Currently, the way that it works
>>>> is that you will see the bootstrap run as root, and it launches a new
>>>> process using "sudo -u ..."
>>>> That process that is launched with "sudo -u" is the NiFi instance, so
>>>> that it should be run as the user
>>>> specified. However, the bootstrap itself is still launched as root, I
>>>> believe.
>>>>
>>>> Is this not what you are seeing?
>>>>
>>>> Thanks
>>>> -Mark
>>>>
>>>>
>>>> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
>>>>
>>>> I tried editing the run.as setting NiFi properties file but that
>>>> appears to not work. I see the root owned process running sudo -u user but
>>>> doesn't seem to be working.
>>>> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:
>>>>
>>>>> Yes I ran the install as root. Previously just ran as a normal user
>>>>> running NiFi.sh start
>>>>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>>>>
>>>>>> Chris,
>>>>>>
>>>>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>>>>>> likely.  There is a (very) small chance that a partially written
>>>>>> version of the flow still exists there with it and you can check that
>>>>>> with something like 'ls -altr'.
>>>>>>
>>>>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>>>>> to better understand the steps you followed so we can help prevent
>>>>>> this in the future if possible.
>>>>>>
>>>>>> Thanks
>>>>>> Joe
>>>>>>
>>>>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>>>>> wrote:
>>>>>> > Hi,
>>>>>> >
>>>>>> > I was testing NiFi using a test user and then decided to install it
>>>>>> using
>>>>>> > the NiFi.sh install script. Now it is running as root and I have
>>>>>> lost all
>>>>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>>>>> >
>>>>>> > Thanks in advance
>>>>>> > Chris
>>>>>>
>>>>>
>>>>
>>>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
That being said, is there a way to backup and restore your flow files and
flow graphics?
On Sat, 19 Sep 2015 at 2:36 PM, Chris Teoh <ch...@gmail.com> wrote:

> I was running NiFi as a non root and created all my flows with that. I
> then ran install as root and started it as root. That was when I lost all
> the flows, I was presented with an empty NiFi page.
> On Sat, 19 Sep 2015 at 10:11 am Mark Payne <ma...@hotmail.com> wrote:
>
>> Chris,
>>
>> It's really odd that you would lose the flow. I tried to replicate.
>> Created a flow as myself. Then installed as a service as root. Restarted
>> via "sudo service nifi start" and everything was fine.
>> Then restarted as myself. This time, it failed to started because it
>> didn't have sufficient read permissions on flow.xml.gz.
>> Restarted as root and everything was fine.
>> Changed permissions and restarted as myself and all was fine.
>>
>> Any other details as to what may have caused this to happen?
>>
>> Thanks
>> -Mark
>>
>>
>> On Sep 18, 2015, at 7:20 PM, Chris Teoh <ch...@gmail.com> wrote:
>>
>> Thanks for the prompt responses Mark.
>>
>> The size of flow.xml.gz is 20 bytes. A zcat returns nothing.
>>
>> I'm seeing the process run as sudo which seems ok but I never saw it
>> listen on port 8080. I suspect because it was initially running as root
>> after I ran install before I changed run.as setting, the non root user
>> was failing to write the logs as they were owned by root.
>>
>> I changed the ownership back to the non root user and just manually su to
>> that user and ran it. This time was fine except I had already lost the
>> flows when I first ran as root.
>>
>> On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <ma...@hotmail.com> wrote:
>>
>>> Chris,
>>>
>>> We do have some work to do here to make the run.as work better.
>>> Currently, the way that it works
>>> is that you will see the bootstrap run as root, and it launches a new
>>> process using "sudo -u ..."
>>> That process that is launched with "sudo -u" is the NiFi instance, so
>>> that it should be run as the user
>>> specified. However, the bootstrap itself is still launched as root, I
>>> believe.
>>>
>>> Is this not what you are seeing?
>>>
>>> Thanks
>>> -Mark
>>>
>>>
>>> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
>>>
>>> I tried editing the run.as setting NiFi properties file but that
>>> appears to not work. I see the root owned process running sudo -u user but
>>> doesn't seem to be working.
>>> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:
>>>
>>>> Yes I ran the install as root. Previously just ran as a normal user
>>>> running NiFi.sh start
>>>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>>>
>>>>> Chris,
>>>>>
>>>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>>>>> likely.  There is a (very) small chance that a partially written
>>>>> version of the flow still exists there with it and you can check that
>>>>> with something like 'ls -altr'.
>>>>>
>>>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>>>> to better understand the steps you followed so we can help prevent
>>>>> this in the future if possible.
>>>>>
>>>>> Thanks
>>>>> Joe
>>>>>
>>>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>>>> wrote:
>>>>> > Hi,
>>>>> >
>>>>> > I was testing NiFi using a test user and then decided to install it
>>>>> using
>>>>> > the NiFi.sh install script. Now it is running as root and I have
>>>>> lost all
>>>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>>>> >
>>>>> > Thanks in advance
>>>>> > Chris
>>>>>
>>>>
>>>
>>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
I was running NiFi as a non root and created all my flows with that. I then
ran install as root and started it as root. That was when I lost all the
flows, I was presented with an empty NiFi page.
On Sat, 19 Sep 2015 at 10:11 am Mark Payne <ma...@hotmail.com> wrote:

> Chris,
>
> It's really odd that you would lose the flow. I tried to replicate.
> Created a flow as myself. Then installed as a service as root. Restarted
> via "sudo service nifi start" and everything was fine.
> Then restarted as myself. This time, it failed to started because it
> didn't have sufficient read permissions on flow.xml.gz.
> Restarted as root and everything was fine.
> Changed permissions and restarted as myself and all was fine.
>
> Any other details as to what may have caused this to happen?
>
> Thanks
> -Mark
>
>
> On Sep 18, 2015, at 7:20 PM, Chris Teoh <ch...@gmail.com> wrote:
>
> Thanks for the prompt responses Mark.
>
> The size of flow.xml.gz is 20 bytes. A zcat returns nothing.
>
> I'm seeing the process run as sudo which seems ok but I never saw it
> listen on port 8080. I suspect because it was initially running as root
> after I ran install before I changed run.as setting, the non root user
> was failing to write the logs as they were owned by root.
>
> I changed the ownership back to the non root user and just manually su to
> that user and ran it. This time was fine except I had already lost the
> flows when I first ran as root.
>
> On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <ma...@hotmail.com> wrote:
>
>> Chris,
>>
>> We do have some work to do here to make the run.as work better.
>> Currently, the way that it works
>> is that you will see the bootstrap run as root, and it launches a new
>> process using "sudo -u ..."
>> That process that is launched with "sudo -u" is the NiFi instance, so
>> that it should be run as the user
>> specified. However, the bootstrap itself is still launched as root, I
>> believe.
>>
>> Is this not what you are seeing?
>>
>> Thanks
>> -Mark
>>
>>
>> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
>>
>> I tried editing the run.as setting NiFi properties file but that appears
>> to not work. I see the root owned process running sudo -u user but doesn't
>> seem to be working.
>> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:
>>
>>> Yes I ran the install as root. Previously just ran as a normal user
>>> running NiFi.sh start
>>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>>
>>>> Chris,
>>>>
>>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>>>> likely.  There is a (very) small chance that a partially written
>>>> version of the flow still exists there with it and you can check that
>>>> with something like 'ls -altr'.
>>>>
>>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>>> to better understand the steps you followed so we can help prevent
>>>> this in the future if possible.
>>>>
>>>> Thanks
>>>> Joe
>>>>
>>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>>> wrote:
>>>> > Hi,
>>>> >
>>>> > I was testing NiFi using a test user and then decided to install it
>>>> using
>>>> > the NiFi.sh install script. Now it is running as root and I have lost
>>>> all
>>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>>> >
>>>> > Thanks in advance
>>>> > Chris
>>>>
>>>
>>
>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Mark Payne <ma...@hotmail.com>.
Chris,

It's really odd that you would lose the flow. I tried to replicate. Created a flow as myself. Then installed as a service as root. Restarted via "sudo service nifi start" and everything was fine. 
Then restarted as myself. This time, it failed to started because it didn't have sufficient read permissions on flow.xml.gz. 
Restarted as root and everything was fine. 
Changed permissions and restarted as myself and all was fine.

Any other details as to what may have caused this to happen?

Thanks
-Mark


> On Sep 18, 2015, at 7:20 PM, Chris Teoh <ch...@gmail.com> wrote:
> 
> Thanks for the prompt responses Mark.
> 
> The size of flow.xml.gz is 20 bytes. A zcat returns nothing.
> 
> I'm seeing the process run as sudo which seems ok but I never saw it listen on port 8080. I suspect because it was initially running as root after I ran install before I changed run.as <http://run.as/> setting, the non root user was failing to write the logs as they were owned by root.
> 
> I changed the ownership back to the non root user and just manually su to that user and ran it. This time was fine except I had already lost the flows when I first ran as root.
> 
> On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <markap14@hotmail.com <ma...@hotmail.com>> wrote:
> Chris,
> 
> We do have some work to do here to make the run.as <http://run.as/> work better. Currently, the way that it works
> is that you will see the bootstrap run as root, and it launches a new process using "sudo -u ..."
> That process that is launched with "sudo -u" is the NiFi instance, so that it should be run as the user
> specified. However, the bootstrap itself is still launched as root, I believe.
> 
> Is this not what you are seeing?
> 
> Thanks
> -Mark
> 
> 
>> On Sep 18, 2015, at 2:09 AM, Chris Teoh <chris.teoh@gmail.com <ma...@gmail.com>> wrote:
>> 
>> I tried editing the run.as <http://run.as/> setting NiFi properties file but that appears to not work. I see the root owned process running sudo -u user but doesn't seem to be working.
>> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <chris.teoh@gmail.com <ma...@gmail.com>> wrote:
>> Yes I ran the install as root. Previously just ran as a normal user running NiFi.sh start
>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <joe.witt@gmail.com <ma...@gmail.com>> wrote:
>> Chris,
>> 
>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>> likely.  There is a (very) small chance that a partially written
>> version of the flow still exists there with it and you can check that
>> with something like 'ls -altr'.
>> 
>> So when you ran the nifi.sh install script you ran it as root?  Want
>> to better understand the steps you followed so we can help prevent
>> this in the future if possible.
>> 
>> Thanks
>> Joe
>> 
>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <chris.teoh@gmail.com <ma...@gmail.com>> wrote:
>> > Hi,
>> >
>> > I was testing NiFi using a test user and then decided to install it using
>> > the NiFi.sh install script. Now it is running as root and I have lost all
>> > the flows. Flow.xml.gz is empty. How do I get it back?
>> >
>> > Thanks in advance
>> > Chris
> 


Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
Thanks for the prompt responses Mark.

The size of flow.xml.gz is 20 bytes. A zcat returns nothing.

I'm seeing the process run as sudo which seems ok but I never saw it listen
on port 8080. I suspect because it was initially running as root after I
ran install before I changed run.as setting, the non root user was failing
to write the logs as they were owned by root.

I changed the ownership back to the non root user and just manually su to
that user and ran it. This time was fine except I had already lost the
flows when I first ran as root.

On Fri, 18 Sep 2015 at 11:10 pm Mark Payne <ma...@hotmail.com> wrote:

> Chris,
>
> We do have some work to do here to make the run.as work better.
> Currently, the way that it works
> is that you will see the bootstrap run as root, and it launches a new
> process using "sudo -u ..."
> That process that is launched with "sudo -u" is the NiFi instance, so that
> it should be run as the user
> specified. However, the bootstrap itself is still launched as root, I
> believe.
>
> Is this not what you are seeing?
>
> Thanks
> -Mark
>
>
> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
>
> I tried editing the run.as setting NiFi properties file but that appears
> to not work. I see the root owned process running sudo -u user but doesn't
> seem to be working.
> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:
>
>> Yes I ran the install as root. Previously just ran as a normal user
>> running NiFi.sh start
>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>
>>> Chris,
>>>
>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>>> likely.  There is a (very) small chance that a partially written
>>> version of the flow still exists there with it and you can check that
>>> with something like 'ls -altr'.
>>>
>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>> to better understand the steps you followed so we can help prevent
>>> this in the future if possible.
>>>
>>> Thanks
>>> Joe
>>>
>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>> wrote:
>>> > Hi,
>>> >
>>> > I was testing NiFi using a test user and then decided to install it
>>> using
>>> > the NiFi.sh install script. Now it is running as root and I have lost
>>> all
>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>> >
>>> > Thanks in advance
>>> > Chris
>>>
>>
>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Mark Payne <ma...@hotmail.com>.
Chris,

We do have some work to do here to make the run.as work better. Currently, the way that it works
is that you will see the bootstrap run as root, and it launches a new process using "sudo -u ..."
That process that is launched with "sudo -u" is the NiFi instance, so that it should be run as the user
specified. However, the bootstrap itself is still launched as root, I believe.

Is this not what you are seeing?

Thanks
-Mark


> On Sep 18, 2015, at 2:09 AM, Chris Teoh <ch...@gmail.com> wrote:
> 
> I tried editing the run.as <http://run.as/> setting NiFi properties file but that appears to not work. I see the root owned process running sudo -u user but doesn't seem to be working.
> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <chris.teoh@gmail.com <ma...@gmail.com>> wrote:
> Yes I ran the install as root. Previously just ran as a normal user running NiFi.sh start
> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <joe.witt@gmail.com <ma...@gmail.com>> wrote:
> Chris,
> 
> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
> likely.  There is a (very) small chance that a partially written
> version of the flow still exists there with it and you can check that
> with something like 'ls -altr'.
> 
> So when you ran the nifi.sh install script you ran it as root?  Want
> to better understand the steps you followed so we can help prevent
> this in the future if possible.
> 
> Thanks
> Joe
> 
> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <chris.teoh@gmail.com <ma...@gmail.com>> wrote:
> > Hi,
> >
> > I was testing NiFi using a test user and then decided to install it using
> > the NiFi.sh install script. Now it is running as root and I have lost all
> > the flows. Flow.xml.gz is empty. How do I get it back?
> >
> > Thanks in advance
> > Chris


Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
Red hat 6.5 or 6.6
On Fri, 18 Sep 2015 at 4:11 pm Joe Witt <jo...@gmail.com> wrote:

> K.  Which os/version are you running?
>
> On Thu, Sep 17, 2015 at 11:09 PM, Chris Teoh <ch...@gmail.com> wrote:
> > I tried editing the run.as setting NiFi properties file but that
> appears to
> > not work. I see the root owned process running sudo -u user but doesn't
> seem
> > to be working.
> >
> > On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:
> >>
> >> Yes I ran the install as root. Previously just ran as a normal user
> >> running NiFi.sh start
> >> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
> >>>
> >>> Chris,
> >>>
> >>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
> >>> likely.  There is a (very) small chance that a partially written
> >>> version of the flow still exists there with it and you can check that
> >>> with something like 'ls -altr'.
> >>>
> >>> So when you ran the nifi.sh install script you ran it as root?  Want
> >>> to better understand the steps you followed so we can help prevent
> >>> this in the future if possible.
> >>>
> >>> Thanks
> >>> Joe
> >>>
> >>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
> >>> wrote:
> >>> > Hi,
> >>> >
> >>> > I was testing NiFi using a test user and then decided to install it
> >>> > using
> >>> > the NiFi.sh install script. Now it is running as root and I have lost
> >>> > all
> >>> > the flows. Flow.xml.gz is empty. How do I get it back?
> >>> >
> >>> > Thanks in advance
> >>> > Chris
>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Joe Witt <jo...@gmail.com>.
K.  Which os/version are you running?

On Thu, Sep 17, 2015 at 11:09 PM, Chris Teoh <ch...@gmail.com> wrote:
> I tried editing the run.as setting NiFi properties file but that appears to
> not work. I see the root owned process running sudo -u user but doesn't seem
> to be working.
>
> On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:
>>
>> Yes I ran the install as root. Previously just ran as a normal user
>> running NiFi.sh start
>> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>>>
>>> Chris,
>>>
>>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>>> likely.  There is a (very) small chance that a partially written
>>> version of the flow still exists there with it and you can check that
>>> with something like 'ls -altr'.
>>>
>>> So when you ran the nifi.sh install script you ran it as root?  Want
>>> to better understand the steps you followed so we can help prevent
>>> this in the future if possible.
>>>
>>> Thanks
>>> Joe
>>>
>>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>>> wrote:
>>> > Hi,
>>> >
>>> > I was testing NiFi using a test user and then decided to install it
>>> > using
>>> > the NiFi.sh install script. Now it is running as root and I have lost
>>> > all
>>> > the flows. Flow.xml.gz is empty. How do I get it back?
>>> >
>>> > Thanks in advance
>>> > Chris

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
I tried editing the run.as setting NiFi properties file but that appears to
not work. I see the root owned process running sudo -u user but doesn't
seem to be working.
On Fri, 18 Sep 2015 at 4:05 pm Chris Teoh <ch...@gmail.com> wrote:

> Yes I ran the install as root. Previously just ran as a normal user
> running NiFi.sh start
> On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:
>
>> Chris,
>>
>> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
>> likely.  There is a (very) small chance that a partially written
>> version of the flow still exists there with it and you can check that
>> with something like 'ls -altr'.
>>
>> So when you ran the nifi.sh install script you ran it as root?  Want
>> to better understand the steps you followed so we can help prevent
>> this in the future if possible.
>>
>> Thanks
>> Joe
>>
>> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I was testing NiFi using a test user and then decided to install it
>> using
>> > the NiFi.sh install script. Now it is running as root and I have lost
>> all
>> > the flows. Flow.xml.gz is empty. How do I get it back?
>> >
>> > Thanks in advance
>> > Chris
>>
>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Chris Teoh <ch...@gmail.com>.
Yes I ran the install as root. Previously just ran as a normal user running
NiFi.sh start
On Fri, 18 Sep 2015 at 3:47 pm Joe Witt <jo...@gmail.com> wrote:

> Chris,
>
> Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
> likely.  There is a (very) small chance that a partially written
> version of the flow still exists there with it and you can check that
> with something like 'ls -altr'.
>
> So when you ran the nifi.sh install script you ran it as root?  Want
> to better understand the steps you followed so we can help prevent
> this in the future if possible.
>
> Thanks
> Joe
>
> On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com> wrote:
> > Hi,
> >
> > I was testing NiFi using a test user and then decided to install it using
> > the NiFi.sh install script. Now it is running as root and I have lost all
> > the flows. Flow.xml.gz is empty. How do I get it back?
> >
> > Thanks in advance
> > Chris
>

Re: How to recover flow graphics after running NiFi.sh install?

Posted by Joe Witt <jo...@gmail.com>.
Chris,

Unfortunately if your conf/flow.xml. was overwritten that is 'it' most
likely.  There is a (very) small chance that a partially written
version of the flow still exists there with it and you can check that
with something like 'ls -altr'.

So when you ran the nifi.sh install script you ran it as root?  Want
to better understand the steps you followed so we can help prevent
this in the future if possible.

Thanks
Joe

On Thu, Sep 17, 2015 at 10:39 PM, Chris Teoh <ch...@gmail.com> wrote:
> Hi,
>
> I was testing NiFi using a test user and then decided to install it using
> the NiFi.sh install script. Now it is running as root and I have lost all
> the flows. Flow.xml.gz is empty. How do I get it back?
>
> Thanks in advance
> Chris