Hi, Issue was the database name. I did the following changes in the setup.conf and now clean.sh is working properly.
# export userstore_db_schema="userstore" export userstore_db_schema="USERSTORE_DB_SCHEMA" # for mac osx Is there any issue or conflict in above setup? Thanks, Thushara On Wed, Sep 17, 2014 at 2:50 PM, Thushara Ranawaka <[email protected]> wrote: > Hi Manula, > > FYI > > In mac when we run mysql -u $mysql_user -p$mysql_pass -e "DROP DATABASE > IF EXISTS $userstore_db_schema;" it works without any issue. we will > debug the shell script and let you know. > > mysql> show databases; > > +---------------------+ > > | Database | > > +---------------------+ > > | information_schema | > > | USERSTORE_DB_SCHEMA | > > | mysql | > > | performance_schema | > > | test | > > +---------------------+ > > 5 rows in set (0.00 sec) > > > mysql> exit > > Bye > > Thusharas-MacBook-Pro:~ thushara$ mysql -u root -ppassword -e "DROP > DATABASE IF EXISTS USERSTORE_DB_SCHEMA;" > > Warning: Using a password on the command line interface can be insecure. > > Thusharas-MacBook-Pro:~ thushara$ mysql > > Welcome to the MySQL monitor. Commands end with ; or \g. > > Your MySQL connection id is 28 > > Server version: 5.6.20 MySQL Community Server (GPL) > > > Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights > reserved. > > > Oracle is a registered trademark of Oracle Corporation and/or its > > affiliates. Other names may be trademarks of their respective > > owners. > > > Type 'help;' or '\h' for help. Type '\c' to clear the current input > statement. > > > mysql> show databases; > > +--------------------+ > > | Database | > > +--------------------+ > > | information_schema | > > | mysql | > > | performance_schema | > > | test | > > +--------------------+ > > 4 rows in set (0.00 sec) > > > > On Wed, Sep 17, 2014 at 2:41 PM, Manula Chathurika Thantriwatte < > [email protected]> wrote: > >> Hi Suhan, >> >> Can you please debug and see the username and the password is actually >> there in the database cleanup function. You can simply use echo statement >> inside the drop database function and verify that. clean.sh script work >> perfectly in ubuntu. I'm not sure is there any impact on MAC. >> >> Thanks ! >> >> >> On Wed, Sep 17, 2014 at 2:29 PM, Suhan Dharmasuriya <[email protected]> >> wrote: >> >>> Hi Manula, >>> >>> Nirmal, Thushara and I did try running clean.sh script but had no luck. >>> Sample output is as follows. >>> Note that mysql root password is 'pass'. >>> Suhans-MacBook-Pro:stratos-installer suhanr$ sudo ./clean.sh -u root -p >>> pass >>> Please confirm that you want to remove stratos databases, servers and >>> logs [y/n] y >>> Stopping all java processes >>> No matching processes were found >>> Waiting for applications to exit >>> Removing userstore database >>> Warning: Using a password on the command line interface can be insecure. >>> Removing Stratos >>> Removing logs >>> Suhans-MacBook-Pro:stratos-installer suhanr$ >>> >>> According to the mysql server output the database is still there. >>> mysql> show databases; >>> +---------------------+ >>> | Database | >>> +---------------------+ >>> | information_schema | >>> | USERSTORE_DB_SCHEMA | >>> | mysql | >>> | performance_schema | >>> | test | >>> +---------------------+ >>> 5 rows in set (0.00 sec) >>> >>> mysql> show databases; >>> +---------------------+ >>> | Database | >>> +---------------------+ >>> | information_schema | >>> | USERSTORE_DB_SCHEMA | >>> | mysql | >>> | performance_schema | >>> | test | >>> +---------------------+ >>> 5 rows in set (0.00 sec) >>> >>> Thanks, >>> Suhan >>> >>> On Wed, Sep 17, 2014 at 1:38 PM, Prasanna Dangalla <[email protected]> >>> wrote: >>> >>>> HI, >>>> >>>> The sed issue came to me also. I modifed the scripts and changed all >>>> sed to gsed. >>>> >>>> >>>> On Wed, Sep 17, 2014 at 12:52 PM, Manula Chathurika Thantriwatte < >>>> [email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> The $subject error occurs because in the first time the script fails, >>>>> and at that time it already create the database. Since you didn't run the >>>>> clean.sh databases are already in the environment. After you run the >>>>> setup.sh in second time you will get the $subject error. >>>>> >>>>> Thanks ! >>>>> >>>>> >>>>> On Wed, Sep 17, 2014 at 12:46 PM, Thushara Ranawaka < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Udara, >>>>>> Yes, We will do the needful. >>>>>> >>>>>> Thanks, >>>>>> Thushara. >>>>>> >>>>>> On Wed, Sep 17, 2014 at 12:43 PM, Udara Liyanage <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Sep 17, 2014 at 12:16 PM, Suhan Dharmasuriya < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Thanks Lasindu, >>>>>>>> >>>>>>>> Thushara and I are in the process of modifying the shell scripts >>>>>>>> suitable for osx. >>>>>>>> We contacted Nirmal, Lakmal, Waruna and Udara and had a quick >>>>>>>> discussion. >>>>>>>> >>>>>>>> After the discussion, the solution we found was to delete the >>>>>>>> USERSTORE_DB_SCHEMA database from mysql manually. >>>>>>>> >>>>>>>> As mentioned earlier, once $ sudo ./setup.sh -p "default" -s command >>>>>>>> is run we get the following error. >>>>>>>> <outputEventAdaptor name="JMSOutputAdaptor" statistics="disable" >>>>>>>> trace="enable" type="jms" xmlns=" >>>>>>>> http://wso2.org/carbon/eventadaptormanager"> >>>>>>>> <!--property >>>>>>>> name="java.naming.provider.url">CEP_HOME/repository/conf/jndi.properties</property--> >>>>>>>> <property name="java.naming.provider.url">tcp:// >>>>>>>> 10.100.5.175:61616</property> >>>>>>>> <property >>>>>>>> name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</property> >>>>>>>> <property >>>>>>>> name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property> >>>>>>>> <property name="transport.jms.DestinationType">topic</property> >>>>>>>> </outputEventAdaptor> >>>>>>>> End configuring the Complex Event Processor >>>>>>>> /WSO2/Products/stratos/opt/stratos-installer >>>>>>>> Changing owner of /WSO2/Products/stratos/opt/stratos to >>>>>>>> suhanr:suhanr >>>>>>>> chown: suhanr: illegal group name >>>>>>>> >>>>>>>> What it tries to do is changing the ownership of installer to user >>>>>>> suhanr that he can start Stratos. I guess the user group "suhanr" is >>>>>>> not >>>>>>> present in your environment. Please check with the command "groups". >>>>>>> >>>>>>> *After the second attempt we were getting the said error. $subject.* >>>>>>>> >>>>>>>> As a temporary solution we deleted the said database from mysql. >>>>>>>> mysql> show databases; >>>>>>>> +---------------------+ >>>>>>>> | Database | >>>>>>>> +---------------------+ >>>>>>>> | information_schema | >>>>>>>> | *USERSTORE_DB_SCHEMA* | >>>>>>>> | mysql | >>>>>>>> | performance_schema | >>>>>>>> | test | >>>>>>>> +---------------------+ >>>>>>>> 5 rows in set (0.00 sec) >>>>>>>> >>>>>>>> mysql> drop database *USERSTORE_DB_SCHEMA*; >>>>>>>> Query OK, 39 rows affected (0.05 sec) >>>>>>>> >>>>>>>> mysql> show databases; >>>>>>>> +--------------------+ >>>>>>>> | Database | >>>>>>>> +--------------------+ >>>>>>>> | information_schema | >>>>>>>> | mysql | >>>>>>>> | performance_schema | >>>>>>>> | test | >>>>>>>> +--------------------+ >>>>>>>> 4 rows in set (0.00 sec) >>>>>>>> >>>>>>>> Then we were able to avoid the mentioned error in $subject. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Suhan >>>>>>>> >>>>>>>> On Wed, Sep 17, 2014 at 11:21 AM, Lasindu Charith <[email protected] >>>>>>>> > wrote: >>>>>>>> >>>>>>>>> Hi Thushara and Suhan, >>>>>>>>> >>>>>>>>> Better if you can discuss the issues related to Apaches Stratos in >>>>>>>>> stratos-dev list ( >>>>>>>>> http://stratos.apache.org/community/mailing-lists.html) >>>>>>>>> But for now, regarding the issues you have when setting up Stratos >>>>>>>>> in osx, Nirmal, Reka or Prasanna might be able to help (Added). >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> On Tue, Sep 16, 2014 at 3:57 PM, Suhan Dharmasuriya < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> We have installed mysql for OSX 10.9 [1] >>>>>>>>>> >>>>>>>>>> [1] http://www.macminivault.com/mysql-mavericks/ >>>>>>>>>> >>>>>>>>>> On Tue, Sep 16, 2014 at 3:55 PM, Suhan Dharmasuriya < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> Myself and Thushara were following the tutorial [1] installing >>>>>>>>>>> apache Stratos and came to the following section. >>>>>>>>>>> >>>>>>>>>>> - Run the stratos-setup.sh file as the root. >>>>>>>>>>> >>>>>>>>>>> $ sudo ./setup.sh -p "default" >>>>>>>>>>> >>>>>>>>>>> After running the command we got the following error in our mac >>>>>>>>>>> book pros. >>>>>>>>>>> Detail terminal output is attached in the mail for reference. >>>>>>>>>>> >>>>>>>>>>> /WSO2/Products/stratos/opt/stratos-installer >>>>>>>>>>> Warning: Using a password on the command line interface can be >>>>>>>>>>> insecure. >>>>>>>>>>> *ERROR 1061 (42000) at line 57: Duplicate key name >>>>>>>>>>> 'REG_PATH_IND_BY_PATH_VALUE'* >>>>>>>>>>> >>>>>>>>>> >>>>>>> This issue occurs when you try to install Stratos for the second >>>>>>> time since database values are already there. Ideally clean.sh should >>>>>>> delete the database. If databases are not cleaned correctly by >>>>>>> clean.sh it >>>>>>> is a bug. Please create a jira and report it. Before that try following >>>>>>> and >>>>>>> check whether databases are deleted >>>>>>> >>>>>>> ./clean.sh -u<db_username> -p<db_pass> or >>>>>>> ./clean.sh -u <db_username> -p <db_pass> . >>>>>>> (Please mind the space in second option) >>>>>>> >>>>>>> Installer scripts are not tested very much in MAC environment as per >>>>>>> my knowledge. It is highly appreciated if you can add your finding >>>>>>> (installer scripts for MAC) to Stratos. It will be helpful for future >>>>>>> MAC >>>>>>> users. >>>>>>> >>>>>>>> >>>>>>>>>>> We also followed the apache stratos wiki [3]. >>>>>>>>>>> Please provide a direction to proceed from here. >>>>>>>>>>> >>>>>>>>>>> *Note*: *earlier setup.sh file gave an error saying,* >>>>>>>>>>> sed: illegal option --r >>>>>>>>>>> *Then the shell script was changed accordingly[2].* >>>>>>>>>>> *Please note that we are using Mac OSX 10.9.4* >>>>>>>>>>> >>>>>>>>>>> *Then again an error appeared stating -i switch is not >>>>>>>>>>> supported.* >>>>>>>>>>> >>>>>>>>>>> *Therefore the following shell script files were modified >>>>>>>>>>> removing -i switch.* >>>>>>>>>>> *ec2.sh* >>>>>>>>>>> *openstack.sh* >>>>>>>>>>> *setup.sh* >>>>>>>>>>> *setup.conf* >>>>>>>>>>> >>>>>>>>>>> sed -i <pattern> <file> will modify the original file which you >>>>>>> can achieve the same as below without -i option >>>>>>> sed <pattern> <file> > <file> >>>>>>> >>>>>>> >>>>>>> *Scripts are attached for reference. * >>>>>>>>>>> >>>>>>>>>>> [1] >>>>>>>>>>> http://blog.ravihansa3000.com/2014/04/installing-apache-stratos-40-with.html >>>>>>>>>>> [2] http://www.flashesofpanic.com/panic/002596.php >>>>>>>>>>> [3] >>>>>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Cloud+Controller+Configuration >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Suhan and Thushara >>>>>>>>>>> -- >>>>>>>>>>> Suhan Dharmasuriya >>>>>>>>>>> Software Engineer - Test Automation >>>>>>>>>>> >>>>>>>>>>> *WSO2, Inc. * >>>>>>>>>>> >>>>>>>>>>> lean . enterprise . middleware >>>>>>>>>>> Tel: +94 112 145345 >>>>>>>>>>> Mob: +94 779 869138 >>>>>>>>>>> Blog: http://suhancoold.blogspot.com/ >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Suhan Dharmasuriya >>>>>>>>>> Software Engineer - Test Automation >>>>>>>>>> >>>>>>>>>> *WSO2, Inc. * >>>>>>>>>> >>>>>>>>>> lean . enterprise . middleware >>>>>>>>>> Tel: +94 112 145345 >>>>>>>>>> Mob: +94 779 869138 >>>>>>>>>> Blog: http://suhancoold.blogspot.com/ >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Dev mailing list >>>>>>>>>> [email protected] >>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Lasindu Charith* >>>>>>>>> Software Engineer, WSO2 Inc. >>>>>>>>> Mobile: +94714427192 >>>>>>>>> Web: blog.lasindu.com >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Suhan Dharmasuriya >>>>>>>> Software Engineer - Test Automation >>>>>>>> >>>>>>>> *WSO2, Inc. * >>>>>>>> >>>>>>>> lean . enterprise . middleware >>>>>>>> Tel: +94 112 145345 >>>>>>>> Mob: +94 779 869138 >>>>>>>> Blog: http://suhancoold.blogspot.com/ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> Udara Liyanage >>>>>>> Software Engineer >>>>>>> WSO2, Inc.: http://wso2.com >>>>>>> lean. enterprise. middleware >>>>>>> >>>>>>> web: http://udaraliyanage.wordpress.com >>>>>>> phone: +94 71 443 6897 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Thushara Kasun Ranawaka >>>>>> Software Engineer >>>>>> WSO2 Inc.; <http://www.wso2.com> >>>>>> lean.enterprise.middleware >>>>>> Mobile : *+94 (0) 773438949 <%2B94%20%280%29%20773438949>* >>>>>> *[email protected] <[email protected]>* >>>>>> >>>>>> _______________________________________________ >>>>>> Dev mailing list >>>>>> [email protected] >>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Manula Chathurika Thantriwatte >>>>> Software Engineer >>>>> WSO2 Inc. : http://wso2.com >>>>> lean . enterprise . middleware >>>>> >>>>> email : [email protected] / [email protected] >>>>> phone : +94 772492511 >>>>> blog : http://manulachathurika.blogspot.com/ >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Prasanna Dangalla >>>> Software Engineer, WSO2, Inc.; http://wso2.com/ >>>> lean.enterprise.middleware >>>> >>>> cell: +94 777 55 80 30 | +94 718 11 27 51 >>>> twitter: @prasa77 >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Suhan Dharmasuriya >>> Software Engineer - Test Automation >>> >>> *WSO2, Inc. * >>> >>> lean . enterprise . middleware >>> Tel: +94 112 145345 >>> Mob: +94 779 869138 >>> Blog: http://suhancoold.blogspot.com/ >>> >> >> >> >> -- >> Regards, >> Manula Chathurika Thantriwatte >> Software Engineer >> WSO2 Inc. : http://wso2.com >> lean . enterprise . middleware >> >> email : [email protected] / [email protected] >> phone : +94 772492511 >> blog : http://manulachathurika.blogspot.com/ >> >> >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Thushara Kasun Ranawaka > Software Engineer > WSO2 Inc.; <http://www.wso2.com> > lean.enterprise.middleware > Mobile : *+94 (0) 773438949 <%2B94%20%280%29%20773438949>* > *[email protected] <[email protected]>* > -- Thushara Kasun Ranawaka Software Engineer WSO2 Inc.; <http://www.wso2.com> lean.enterprise.middleware Mobile : *+94 (0) 773438949* *[email protected] <[email protected]>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
