Project

General

Profile

Installation-process (Console mode + MySQL-DB) --> Stuck in "Checking connection to the database"

Julian R
Added almost 5 years ago

Hi,

i've actual got the problem, that the installation process gets stuck in "Checking connection to the database". I'm using the console installer and the version 5.2.0. The mysql db is running and the root-access is okay. I've replaced the "bind-access"-rule with "0.0.0.0" in /etc/mysql/my.conf.

One thing i'd like to mention is that i cannot access the database from a remote pc. But i really don't know why...

As i thought i do not have to configure the db by myself, right? However this should not be a problem at this point in the installation process?

Hope you can help me again.

Thanks and best regards

Julsky


Replies (12)

Added by Julian R almost 5 years ago

Update: Now i can access the db from a remote pc :-) But the installation process is stuck at the mentioned point anyway.

Added by Wojciech Kapcia TigaseTeam over 4 years ago

What do you mean by 'I can access db from remote pc'? With the exact same credentials you are using the installer? Could you try to run the installer from console (i.e. @java -jar tigase-server-5.2.0-b3447.jar@) and check whether there are any errors? (or better yet provide the output)?

Added by Julian R over 4 years ago

Hi :-)

"I can access the db from a remote pc" --> I'm using a MySQL-database in the server. Well, because the installation process seems not to be able to access the database on the same machine onto which i'm installting tigase server, i've tried to access the database from my desktop computer (windows) with the MySQL-client. This works quite fine. So the database should be running well.

I'm running the installer always in console-mode and with the same credentials (root user/root password) as i'm accessing the database from my desktop machine. So thats why im confused... it works from remote but not on the server itself. As i mentioned above I've replaced the "bind-access"-rule with "0.0.0.0" in /etc/mysql/my.conf.

Here is the output of the console installation process:

The installed application needs a JDK. A java runtime environment (JRE) will be not sufficient.

Enter path: /usr/lib/jvm/jdk-7-oracle-armhf

*** Select what you want to do next:

On this panel you can specify whether you want to install only or configure already installed server or to do both. If you are just installing a server on your machine it is a good idea to do both steps.


The wizards you want to execute

Installation of the Tigase Server

[on, off]

on

Configuration of the Tigase Server

[on, off]

on


[...]


Select target path [/usr/tigase]

/usr/tigase/server

press 1 to continue, 2 to quit, 3 to redisplay

1


Select the packs you want to install:

1 => Base, The base files

2 => Unix Files, Files needed to run the server on Unix like systems

3 => [x] Docs, The documentation

4 => [x] Extras, Extras libraries, MUC, PubSub, STUN, Socks5, Message Archiving, ACS

5 => [x] Groovy scripting, Various Groovy scripts extending server functionality

6 => [x] Derby Database (DB included), Derby database (included) and JDBC driver

7 => [x] MySQL Database driver (DB not included), MySQL JDBC driver (MySQL has to be installed separately)

8 => [x] PostgreSQL Database driver (DB not included), PostgreSQL JDBC driver (PostgreSQL has to be installed separately)

9 => [x] SQL Server Database driver (DB not included), SQL Server JDBC driver (SQL Server has to be installed separately)

10 => [ ] OSGi dependencies, If you intend to run Tigase in OSGi mode you need additional libraries. Enabling this Pack will also setup configuration files to start Tigase XMPP server in OSGi mode.

11 => [ ] HTTP API Component, Interface for the service administration, monitoring and exchange data between Tigase and external system

12 => [ ] Sources, The server source files, tools and libraries sources are not included

r => Redisplay menu

d => Done

Choose action: d

press 1 to continue, 2 to quit, 3 to redisplay

1

[ Starting to unpack ]

[ Processing package: Base (1/9) ]

[ Processing package: Unix Files (2/9) ]

[ Processing package: Docs (3/9) ]

[ Processing package: Extras (4/9) ]

[ Processing package: Groovy scripting (5/9) ]

[ Processing package: Derby Database (DB included) (6/9) ]

[ Processing package: MySQL Database driver (DB not included) (7/9) ]

[ Processing package: PostgreSQL Database driver (DB not included) (8/9) ]

[ Processing package: SQL Server Database driver (DB not included) (9/9) ]

[ Unpacking finished ]

*** Basic Tigase server configuration

On this panel you can specify basic configuration settings for the Tigase server.

Based on your selection here more configuration options might be presented later on. After the configuration is complete init.properties file will be created.

You can optionally restart the server at the end of the process if you like.


0 [x] Default installation

1 [ ] Default plus extra components

2 [ ] Session Manager only

3 [ ] Network connectivity only

input selection:

0

Your XMPP (Jabber) domains [fknpi]

fknpi.de

Server administrators [admin@fknpi]

admin@fknpi.de

Admin password [tigase]

mypassword:-)

0 [x] Derby (built-in database)

1 [ ] MySQL

2 [ ] PostgreSQL

3 [ ] SQLServer

4 [ ] Other...

input selection:

1


Advanced configuration options

[on, off]

off

press 1 to continue, 2 to quit, 3 to redisplay

1

*** Database configuration:

You have selected MySQL database. This database needs additional configuration parameters. Please enter all required information.


MySQL super user account will be used only to create and configure database for the Tigase server. It will not be used by the Tigase server later on.

Super user account name: [root]

root

WARNING: password will be visible while entering

Super user password: root

WARNING: password will be visible while entering

Retype password: root


MySQL database details. It will be created automatically if it does not exist.

Database account: [tigase]

tigase

Account password: [tigase12]

mypassword:-)

Database name: [tigasedb]

tigasedb

Database host or IP: [localhost]

localhost

Additional database parameters: []

press 1 to continue, 2 to quit, 3 to redisplay

1

Performing DB tasks

Checking connection to the database

[now it takes around 10 minutes until the process continues ...]

Communications link failure

Last packet sent to the server was 5 ms ago.

Checking if the database exists

Connection not validated

Checking the database schema

Connection not validated

Checking whether the database needs conversion

Connection not validated

Adding XMPP admin accounts

Connection not validated

Post installation actions

Connection not validated

Loading socks5 component schema

Connection not validated

Loading PubSub component schema

Connection not validated

Install was successeful

application installed on /usr/tigase/server

[ Console installation done ]

That's it. The server might be installed, but won't be working without a database-connection?

As soon as i start the tigase-server with

./scripts/tigase.sh start etc/tigase.conf

it starts. But i can't connect with the admin-user or any other one that shall be created. So i think the connection from the tigase-server to the MySQL-database doesn't work.

Thanks a lot for your help!

Best regards

Julsky

Added by Julian R over 4 years ago

Hi,

me again...

Doesn't got someone any idea?

Thanks and best regards

Julsky

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Yes, creating schema is essential for running the server. Could you try to run the installer in the normal GUI mode and check if the problem exists? Also - could you try running in the debug mode (i.e. @java -DTRACE=TRUE -jar -console@) and check the logs regarding connectivity/database creation or share such log (can be done privately by e-mail).

I just tried to run the installer with the remote DB and it went without any problem. Please verify that you are using correct username, correct root password and correct hostname of the machine. Also - please verify that you have all rights as a remote user (i.e. for the account 'root'@'%', not only 'root'@'localhost').

Added by Julian R over 4 years ago

Hi,

thanks for your response.

First i'd like to clarify that the DB is one the same machine as the tigase server. I just tried to access via remote for testing purposes. Only if i wrote ambiguous :-)

I verified in console mode that i'm using correct username/password for the root-user of the DB. Also i've verified that the root-user has all rights as a remote user (GRANT ALL PRIVILEGES ON . TO 'root'@'%';). Also i've verified that i'm using the correct hostname of the machine.

I've also tried the GUI installer: same behaviour.

I'll send you the trace via mail.

Maybe it doesn't work on raspbian (Raspberry Pi)? I've installed it some months ago on a "normal" debian-server and it works quite fine. Just got to install MySQL and then run the console installer. I Didn't have to configure anything in MySQL.

Thanks for your help!

Best regards

Julsky

Added by Wojciech Kapcia TigaseTeam over 4 years ago

To be honest we haven't tried running it in such environment. I'll wait for your logs. In the meantime - were there any relevant entries in the debug output from the time of creating database except for the connection timeout? Also - could you please try to run same installer on different machine (i.e. non-raspbian) and try to connect to the same MySQL database?

Added by Wojciech Kapcia TigaseTeam over 4 years ago

OK, I think I was misreading your posts a bit. So to clarify - you have a raspbian on which you want to install Tigase, on the same raspbian you have a running instance of MySQL server; you are able to connect to such server from remote machine, you say you can connect to it from localhost as well. Can you verify that while trying to connect locally you are using network tcp connection instead of system socket (i.e. does $mysql -h 127.0.0.1 -u root -p works?).

Added by Julian R over 4 years ago

OK, I think I was misreading your posts a bit. So to clarify - you have a raspbian on which you want to install Tigase, on the same raspbian you have a running instance of MySQL server; you are able to connect to such server from remote machine,

Yes thats right.

you say you can connect to it from localhost as well.

Well i can login with the root-user.

Can you verify that while trying to connect locally you are using network tcp connection instead of system socket (i.e. does $mysql -h 127.0.0.1 -u root -p works?).

root@fknpi:/# mysql -h 127.0.0.1 -u root -p

Enter password:

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (110)

root@fknpi:/#

Seems like there is a problem. What does this mean concretely? I'm no real expert on mysql.

Best regards

Julsky

Added by Wojciech Kapcia TigaseTeam over 4 years ago

OK, it looks like you are using local socket while trying to connect as root to the local instance, and given that we don't use such when performing installation (everything is 'over the network', even if it's localhost) hence problems when trying to create schema.

Could you check if you have permissions for 'root'@'localhost'? As I previously misread your comments I asked you for permissions of wrong user (i.e. global, not local and those are different).

Added by Julian R over 4 years ago

Well i checked the permissions for the localhost-root-access. They are the same as for the global access.

Added by Wojciech Kapcia TigaseTeam over 4 years ago

There may be a number of reason why it's not working - you can check possible solutions in Can't connect to [local] MySQL server document.

    (1-12/12)