Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error installing zenoss [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 564
Location: Texas

PostPosted: Fri Oct 17, 2008 9:29 pm    Post subject: Error installing zenoss [Solved] Reply with quote

Hey, Im going to poke around the zenoss forums too, but I usually get smarter answers on things over here. I get an error on the install.sh script for zenoss. Im following the gentoo-wiki doc, but I get an error on the mysql part, inside the install-functions.sh script.

I used the default answers for the script and tried a blank root password (which will work whether I set one or not on the direct login)
Code:

Password for the Zenoss "admin" user [zenoss]:
Enter the password again:
MySQL server hostname [localhost]:
MySQL server root username [root]:
MySQL server root password []:
MySQL event database name [events]:
MySQL username for Zenoss events database [zenoss]:
MySQL password for zenoss [zenoss]:
MySQL server port [3306]:
.
.
goes through a bunch of compiling for about 10 mins
.
.
install-functions.sh: line 65:  5473 Segmentation fault      mysql -h ${MYSQLHOST} -u ${MYSQLUSER} --port=${MYSQLPORT} -p"${MYSQLPASS}" < /dev/null > /dev/null
mysql install, user or password is incorrect


OK, I understand its obviously trying to tell my my password is incorrect, but I know it is correct as I can login with the one I put into the prompt. I also tried setting it to a blank password to no luck. I tried to code the password hard into the script but I didnt have any luck. I am not much of a mysql guru so I am winging it a bit there. I have emerged it and ran the install_db script and it is responding.

Code:
host zenoss-2.2.4 # mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.0.60-log Gentoo Linux mysql-5.0.60-r1

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit

_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.


Last edited by njcwotx on Mon Oct 20, 2008 8:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 564
Location: Texas

PostPosted: Mon Oct 20, 2008 8:23 pm    Post subject: Reply with quote

I managed to solve the problem. As I started going to each of the steps manually, I found the problem was in the section at the bottom of this function. Somehow it was failing login, although, I could do it manually. I just commented out the 'test mysql' line below and the install completed successfully.

Code:
# attempt to create the events database and login to it.  fail if unsuccessful
create_database()
{
    if [ "${MYSQLHOST}" = "localhost" ]; then
        MYSQL_HOST_PERM="localhost"
    else
        MYSQL_HOST_PERM="%"
    fi

    mysql --port=${MYSQLPORT} -h ${MYSQLHOST} -u ${MYSQLROOTUSER} --password="${MYSQLROOTPASSWD}" <<EOF
        grant all on $MYSQLEVENTDB.* to '$MYSQLUSER'@'${MYSQL_HOST_PERM}' identified by '$MYSQLPASS';
        grant super, file on *.* to '$MYSQLUSER'@'${MYSQL_HOST_PERM}';
        flush privileges;
EOF

    # attempt to login to the database using the mysql user
    mysql -h ${MYSQLHOST} -u ${MYSQLUSER} --port=${MYSQLPORT} -p"${MYSQLPASS}" < /dev/null >/dev/null || \
        fail mysql install, user or password is incorrect
}

# populate the events database with some initial information
run_zeneventbuild()
{
    # Don't create the database if it exists
    if [ -f backup.tar ]; then
        echo "backup.tar exists.  skipping events database build"
        return
    fi

    echo "creating events database using zenevent build..." >> zenbuild.log
    $ZENHOME/bin/zeneventbuild $MYSQLHOST $MYSQLUSER $MYSQLPASS $MYSQLEVENTDB $MYSQLPORT 2>>zenbuild.log || fail "failed to install event tables into MySQL"
}

Code:

# attempt to login to the database using the mysql user
    mysql -h ${MYSQLHOST} -u ${MYSQLUSER} --port=${MYSQLPORT} -p"${MYSQLPASS}" < /dev/null >/dev/null || \
        fail mysql install, user or password is incorrect

_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum