You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@metron.apache.org by Hema malini <nh...@gmail.com> on 2019/03/14 06:34:59 UTC
Metron rest db issues
Hi ,
I followed the instructions in
https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.0/bk_installation/content/installing_rest_app.html
to set up the metron rest db . I have used the profile as dev. But whenever
I restart the metron rest , I am getting the below error.
Caused by: org.springframework.dao.DuplicateKeyException:
PreparedStatementCallback; SQL [insert into users (username, password,
enabled) values (?,?,?)Duplicate entry 'user' for key 'PRIMARY'; nested
exception is com.mysql.jdbc.excepti$
at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:242)
~[metron-rest-0.7.1.jar:?]
I deleted the schema and recreated again as mentioned in the link above.
How can we disable the users being inserted every time during metron rest
start up .
Thanks ,
Hema
Re: Metron rest db issues
Posted by Hema malini <nh...@gmail.com>.
Ryan,
Thanks for your reply. I want to know how using as dev profile , inserts
users. Where can I find that in the code. What are all the profile options
available.
Thanks and regards
Hema
On Thu, Mar 14, 2019, 7:16 PM Ryan Merriman <me...@gmail.com> wrote:
> If I had to guess the dev profile is causing your problems. The dev
> profile automatically loads a couple test users for development so if you
> are adding the same user(s) separately then I would expect the error you
> are seeing. A couple of ideas:
>
> - skip the step in the instructions to add users or add different users
> besides 'user' and 'admin'
> - don't use the dev profile and manage users yourself
> - if you're able to use a more recent version, enable LDAP instead
>
> Hope that helps.
>
> On Thu, Mar 14, 2019 at 5:42 AM Hema malini <nh...@gmail.com>
> wrote:
>
>> I am still facing tge same issue with Ambari interface
>>
>> On Thu, Mar 14, 2019, 3:59 PM Srikanth Nagarajan <sr...@gandivanetworks.com>
>> wrote:
>>
>>> Hi - If you are using Ambari interface to start and stop the Metron and
>>> associated processes this should not happen. I had similar issue only
>>> during the install once upon a command line start of the process.
>>>
>>> Thanks
>>>
>>> Srikanth
>>>
>>> On March 14, 2019 at 2:34 AM Hema malini <nh...@gmail.com>
>>> wrote:
>>>
>>> Hi ,
>>>
>>>
>>>
>>> I followed the instructions in
>>> https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.0/bk_installation/content/installing_rest_app.html
>>> to set up the metron rest db . I have used the profile as dev. But whenever
>>> I restart the metron rest , I am getting the below error.
>>>
>>>
>>>
>>> Caused by: org.springframework.dao.DuplicateKeyException:
>>> PreparedStatementCallback; SQL [insert into users (username, password,
>>> enabled) values (?,?,?)Duplicate entry 'user' for key 'PRIMARY'; nested
>>> exception is com.mysql.jdbc.excepti$
>>>
>>> at
>>> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:242)
>>> ~[metron-rest-0.7.1.jar:?]
>>>
>>>
>>>
>>> I deleted the schema and recreated again as mentioned in the link above.
>>> How can we disable the users being inserted every time during metron rest
>>> start up .
>>>
>>>
>>>
>>>
>>>
>>> Thanks ,
>>>
>>> Hema
>>>
>>>
>>>
>>>
>>> ______________________
>>>
>>> *Srikanth Nagarajan *
>>> *Principal*
>>>
>>> *Gandiva Networks Inc*
>>>
>>> *732.690.1884* Mobile
>>>
>>> sri@gandivanetworks.com
>>>
>>> www.gandivanetworks.com
>>>
>>> Please consider the environment before printing this. NOTICE: The
>>> information contained in this e-mail message is intended for addressee(s)
>>> only. If you have received this message in error please notify the sender.
>>>
>>
Re: Metron rest db issues
Posted by Ryan Merriman <me...@gmail.com>.
If I had to guess the dev profile is causing your problems. The dev
profile automatically loads a couple test users for development so if you
are adding the same user(s) separately then I would expect the error you
are seeing. A couple of ideas:
- skip the step in the instructions to add users or add different users
besides 'user' and 'admin'
- don't use the dev profile and manage users yourself
- if you're able to use a more recent version, enable LDAP instead
Hope that helps.
On Thu, Mar 14, 2019 at 5:42 AM Hema malini <nh...@gmail.com> wrote:
> I am still facing tge same issue with Ambari interface
>
> On Thu, Mar 14, 2019, 3:59 PM Srikanth Nagarajan <sr...@gandivanetworks.com>
> wrote:
>
>> Hi - If you are using Ambari interface to start and stop the Metron and
>> associated processes this should not happen. I had similar issue only
>> during the install once upon a command line start of the process.
>>
>> Thanks
>>
>> Srikanth
>>
>> On March 14, 2019 at 2:34 AM Hema malini <nh...@gmail.com>
>> wrote:
>>
>> Hi ,
>>
>>
>>
>> I followed the instructions in
>> https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.0/bk_installation/content/installing_rest_app.html
>> to set up the metron rest db . I have used the profile as dev. But whenever
>> I restart the metron rest , I am getting the below error.
>>
>>
>>
>> Caused by: org.springframework.dao.DuplicateKeyException:
>> PreparedStatementCallback; SQL [insert into users (username, password,
>> enabled) values (?,?,?)Duplicate entry 'user' for key 'PRIMARY'; nested
>> exception is com.mysql.jdbc.excepti$
>>
>> at
>> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:242)
>> ~[metron-rest-0.7.1.jar:?]
>>
>>
>>
>> I deleted the schema and recreated again as mentioned in the link above.
>> How can we disable the users being inserted every time during metron rest
>> start up .
>>
>>
>>
>>
>>
>> Thanks ,
>>
>> Hema
>>
>>
>>
>>
>> ______________________
>>
>> *Srikanth Nagarajan *
>> *Principal*
>>
>> *Gandiva Networks Inc*
>>
>> *732.690.1884* Mobile
>>
>> sri@gandivanetworks.com
>>
>> www.gandivanetworks.com
>>
>> Please consider the environment before printing this. NOTICE: The
>> information contained in this e-mail message is intended for addressee(s)
>> only. If you have received this message in error please notify the sender.
>>
>
Re: Metron rest db issues
Posted by Hema malini <nh...@gmail.com>.
I am still facing tge same issue with Ambari interface
On Thu, Mar 14, 2019, 3:59 PM Srikanth Nagarajan <sr...@gandivanetworks.com>
wrote:
> Hi - If you are using Ambari interface to start and stop the Metron and
> associated processes this should not happen. I had similar issue only
> during the install once upon a command line start of the process.
>
> Thanks
>
> Srikanth
>
> On March 14, 2019 at 2:34 AM Hema malini <nh...@gmail.com> wrote:
>
> Hi ,
>
>
>
> I followed the instructions in
> https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.0/bk_installation/content/installing_rest_app.html
> to set up the metron rest db . I have used the profile as dev. But whenever
> I restart the metron rest , I am getting the below error.
>
>
>
> Caused by: org.springframework.dao.DuplicateKeyException:
> PreparedStatementCallback; SQL [insert into users (username, password,
> enabled) values (?,?,?)Duplicate entry 'user' for key 'PRIMARY'; nested
> exception is com.mysql.jdbc.excepti$
>
> at
> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:242)
> ~[metron-rest-0.7.1.jar:?]
>
>
>
> I deleted the schema and recreated again as mentioned in the link above.
> How can we disable the users being inserted every time during metron rest
> start up .
>
>
>
>
>
> Thanks ,
>
> Hema
>
>
>
>
> ______________________
>
> *Srikanth Nagarajan *
> *Principal*
>
> *Gandiva Networks Inc*
>
> *732.690.1884* Mobile
>
> sri@gandivanetworks.com
>
> www.gandivanetworks.com
>
> Please consider the environment before printing this. NOTICE: The
> information contained in this e-mail message is intended for addressee(s)
> only. If you have received this message in error please notify the sender.
>
Re: Metron rest db issues
Posted by Srikanth Nagarajan <sr...@gandivanetworks.com>.
Hi - If you are using Ambari interface to start and stop the Metron and
associated processes this should not happen. I had similar issue only during
the install once upon a command line start of the process.
Thanks
Srikanth
> On March 14, 2019 at 2:34 AM Hema malini <nh...@gmail.com> wrote:
>
>
>
> Hi ,
>
>
> ____
>
> I followed the instructions
in<https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.3.0/bk_installation/content/installing_rest_app.html>
to set up the metron rest db . I have used the profile as dev. But whenever I
restart the metron rest , I am getting the below error. __ __
>
> ____
>
> Caused by: org.springframework.dao.DuplicateKeyException:
PreparedStatementCallback; SQL [insert into users (username, password,
enabled) values (?,?,?)Duplicate entry 'user' for key 'PRIMARY'; nested
exception is com.mysql.jdbc.excepti$ __ __
>
> at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:242)
~[metron-rest-0.7.1.jar:?] __ __
>
> ____
>
> I deleted the schema and recreated again as mentioned in the link above. How
can we disable the users being inserted every time during metron rest start up
. __ __
>
> ____
>
> ____
>
> Thanks , __ __
>
> Hema __ __
>
> __
> __
______________________
**Srikanth Nagarajan**
**Principal**
**Gandiva Networks Inc**
**732.690.1884** Mobile
[sri@gandivanetworks.com ](mailto:sri@gandivanetworks.com)
[www.gandivanetworks.com ](http://www.gandivanetworks.com/)
Please consider the environment before printing this. NOTICE: The information
contained in this e-mail message is intended for addressee(s) only. If you
have received this message in error please notify the sender.