Question
I have installed the standalone JID on Windows 7 and want to connect up to a JobScheduler running on a separate server.
When the JID installer dialog asked for the MySQL connection, I entered the JobScheduler server IP address as a host but JID failed to start. Is any further configuration work required?
My environment is Windows 7 64bit, JDK 32bit, swt 32bit.
Answer
There are a number of possible reasons that you are having this problem: the two most likely being:
- the JobScheduler database is not allowing access from the remote host, which is the default configuration;
- the firewall of the JobScheduler host is blocking access.
When the dashboard is started from the command line using:
.\bin\dashboard debug
both of these situations will cause the following messsage to be given out:
org.hibernate.exception.JDBCConnectionException: Cannot open connection
Allow a remote Dashboard to access the JobScheduler database
On Windows Systems:
- Log onto the MySQL Command Line Client on the machine hosting your database
Enter the following, where 'password' is the password used by the JobScheduler to log onto the database:
grant all on scheduler.* to 'scheduler'@'%' identified by 'password'; flush privileges;
Check that this has worked by entering:
show grants for scheduler;
This should return:
+----------------------------------------------------------+ | Grants for scheduler@% | +----------------------------------------------------------+ | GRANT USAGE ON *.* TO 'scheduler'@'%' IDENTIFIED BY PASSWORD '*E94D...' | GRANT ALL PRIVILEGES ON "scheduler".* TO 'scheduler'@'%' | +----------------------------------------------------------+
Open the firewall port for the remote Dashboard to access the JobScheduler Database
The default port which Dashboard uses to access a JobScheduler database is 3306.
Note that although the machine on which the Dashboard is installed and the one with the database may be in the same network, it may be necessary to open the incoming port for public networks, depending on the security settings implemented for the database host.