Tagged with headless - Visokio Forums http://forums.visokio.com/discussions/tagged/headless/feed.rss Mon, 30 Oct 17 16:54:57 -0400 Tagged with headless - Visokio Forums en-CA Linux Headless Server/Scheduler - Unable to read data from database http://forums.visokio.com/discussion/2736/linux-headless-serverscheduler-unable-to-read-data-from-database Wed, 01 Oct 2014 14:04:01 -0400 Veaceslav 2736@/discussions Unable to read data from database errors on a headless Omniscope server or scheduler running on Linux.

If you can run Omniscope Desktop on your machine, you don't need to follow these instructions. Instead, you should run Omniscope Desktop, open your file, go to Data Manager and expand your database block. A dialog should be displayed asking you to locate your database driver. Select the jar file, re-load your data and save the file.

Note: Database (jar file) drivers should be downloaded from the official website distributing the driver.

If you cannot run Omniscope Desktop on your machine to configure the driver from the UI (e.g. you have a headless Linux machine) then you should follow the next steps:

1. Check whether you need to specify a driver location
  • If you already know that the driver location is wrong or missing, go to step 2.
  • If you get only 'Error Unable to read data from database' without any additional details, you need to check whether the driver location is the root cause of the problem.

    a. Edit {OMNISCOPE_INSTALL_DIR}/_launch.sh

        {OMNISCOPE_INSTALL_DIR} is the directory where Omniscope is installed

    Change JAVA_VM_PARS property to include both AppSetting_APPSETTING_REPORT_RECOGNISED_ERRORS_AS_BUGS and AppSetting_APPSETTING_REPORT_DATABASE_ERRORS_AS_BUG, leave all other JVM flags unchanged.

    E.g.
    JAVA_VM_PARS='-Xms64M -Xmx1100m -XX:MaxPermSize=128M -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=50 -XX:NewRatio=8 -XX:+UseG1GC -DAppSetting_APPSETTING_REPORT_RECOGNISED_ERRORS_AS_BUGS=true -DAppSetting_APPSETTING_REPORT_DATABASE_ERRORS_AS_BUGS=true'

    b. Run your tasks again
    At this point you should get more details about the error and it should look like this:

    ...driver JAR file location not specified. Please reconfigure this legacy file's database connection in the desktop application.


2. Configure Omniscope to use a specific driver
My example shows how to configure Omniscope to use a MySQL driver. Other database types are very similar.
  1. Download MySQL JDBC driver from MySQL website.
    E.g. http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.33.zip
  2. Unzip, get the jar file and put it somewhere on the machine running Omniscope scheduler
    E.g. /home/visokio/visokio-omniscope-2.9-b1200/lib/mysql-connector-java-5.1.33-bin.jar
  3. Edit {OMNISCOPE_INSTALL_DIR}/_launch.sh again
    Modify JAVA_VM_PARS property to include the JDBC driver location and remove the flags added at step 1.(a)
    E.g.
    JAVA_VM_PARS='-Xms64M -Xmx1100m -XX:MaxPermSize=128M -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=50 -XX:NewRatio=8 -XX:+UseG1GC -DMySqlDriverSearch_driverDir=/home/visokio/visokio-omniscope-b620/lib/mysql-connector-java-5.1.33-bin.jar'

Note: Here are property names for the other databases (make sure you prepend a '-D' in front of the property e.g -DMySqlDriverSearch_driverDir):

IngresSqlDriverSearch_driverDir
MySqlDriverSearch_driverDir
OracleThinDriverSearch_jarFile
PostgreSqlDriverSearch_driverDir
SqlServer2008DriverSearch_jarFile


These steps configured Omniscope scheduler/server to locate and use database drivers when running in headless mode.

Note: If you configure your file on one machine, then use it on another machine, the driver needs to be added manually on the second machine, otherwise you will get the 'Unable to read data from database' error.]]>