Issue encountered when installing WAR File Distribution on Debian

Hello,

I'm currently trying to install JasperReports on a Debian server, using the WAR File Distribution.

I followed the steps from the PDF 'jasperreports-server-cp-install-guide', and I encountered an error while using the scripts.

I used the testing script (./js-install-ce.sh test) to pinpoint the issue, here is the result :

Writing to log file: logs/js-install-ce_2017-04-20_17-01-22450.log
----------------------------------------------------------------------
Running JasperReports Server install script at 2017-04-20_17-01
----------------------------------------------------------------------
----------------------------------------------------------------------
Using ANT_OPTS: -Dnet.sf.ehcache.disabled=true -Xms512m -Xmx2048m -XX:PermSize=128m
----------------------------------------------------------------------
WARNING: JAVA_HOME environment variable not found
[test]
Running pre-install-test-ce Ant task.
----------------------------------------------------------------------
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Buildfile: /data/www/jasperreports/buildomatic/build.xml
     [echo] Filtering properties (cleaning out blank spaces)
     [echo] chkIfPackageManagedTomcat: check if package managed tomcat
     [echo] chkIfPackageManagedTomcat: CATALINA_HOME and CATALINA_BASE are BOTH set
     [echo] chkIfPackageManagedTomcat: CATALINA_HOME folder location exists
     [echo] chkIfPackageManagedTomcat: CATALINA_BASE folder location exists
     [echo] Tomcat DBCP Factory: com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory
     [echo] chkAndSetLocaleDbSettings: parse: scripts.properties for db commands
     [echo] chkIfPackageManagedTomcat: check if package managed tomcat
     [echo] chkIfPackageManagedTomcat: CATALINA_HOME and CATALINA_BASE are BOTH set
     [echo] chkIfPackageManagedTomcat: CATALINA_HOME folder location exists
     [echo] chkIfPackageManagedTomcat: CATALINA_BASE folder location exists
     [echo] tomcatPackageManaged IS SET
     [echo] Overriding fixedAppServerDir with value from CATALINA_BASE
     [echo] using settings file: /data/www/jasperreports/buildomatic/build_conf/default/maven_settings.xml

test-ce-all-props:
     [echo] Checking properties:
     [echo]   dbType=mysql
     [echo]   dbHost=localhost
     [echo]   dbUsername=**********
     [echo]   dbPassword=**********
     [echo]   dbPort=3306
     [echo]   js.dbName=jasperserver
     [echo]   sugarcrm.dbName=sugarcrm
     [echo]   foodmart.dbName=foodmart
     [echo]   webAppNameCE=jasperserver

check-dbtype-ce:

test-appServerType-ce:

do-install-upgrade-test:
     [echo] Checking DBMS host and port:
     [echo] About to validate port: localhost:3306
     [echo]   Port 3306 is OK
     [echo] Done validating port: localhost:3306
     [echo] Validating administrative database connection at jdbc:mysql://localhost:3306/mysql. Phase: [test]
     [echo] For JDBC driver the artifactId and version properties are set:
     [echo]   maven.jdbc.artifactId=mysql-connector-java
     [echo]   maven.jdbc.version=5.1.41-bin
     [echo]   Specified JDBC driver jar exists
[advanced-sql] Failed to connect: Communications link failure
[advanced-sql]
[advanced-sql] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
     [echo] Connection failed:
     [echo]   SQLState: 08S01
     [echo]   Vendor specific error code: 0
     [echo]   Message: [Communications link failure
     [echo]
     [echo] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.]

BUILD FAILED
/data/www/jasperreports/buildomatic/bin/validation.xml:495: The following error occurred while executing this line:
/data/www/jasperreports/buildomatic/bin/validation.xml:376: The following error occurred while executing this line:
/data/www/jasperreports/buildomatic/conf_source/db/mysql/db.xml:44: The following error occurred while executing this line:
/data/www/jasperreports/buildomatic/bin/validation.xml:401: The following error occurred while executing this line:
/data/www/jasperreports/buildomatic/bin/validation.xml:470: Invalid host/port combination: [localhost:3306]. Treating problem with JDBC connection as unrecoverable

Total time: 2 seconds
Checking Ant return code: OK
----------------------------------------------------------------------

I tried searching for the 'SQLState: 08S01' but didn't find anything relevant to my case.

Does someone know how to fix this ?

Regards,
Nicolas

Nicolas S.'s picture
Joined: Apr 24 2017 - 8:21am
Last seen: 6 years 2 months ago

3 Answers:

It says "Communications link failure," so the first thing I'd do is check that you have the correct database name and password in your buildomatic file. Also, I see you are using JDK 8.0 with a version that may not support it.  That can throw unexpected errors.

 

elizam's picture
15602
Joined: Mar 5 2012 - 9:19am
Last seen: 3 years 1 month ago

SQLState: 08S01 means JasperReports Server installation script can not connect to your database. It may be caused by wrong jdbc setting or network problem such as firewall blocking port 3306 that you've specified. Can't say from your script but you also need to set a database user with admin privilege.

 

hozawa's picture
190849
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

Thank you for both your answers.

I already checked that I had the correct database and password in the config file, yet the user I created has read-only privilege on the database, I'm going to check that.

I forgot to mention that I'm installing JasperReports on the same server that hosts the database, so a network or firewall issue seems unlikely.

Nicolas S.'s picture
Joined: Apr 24 2017 - 8:21am
Last seen: 6 years 2 months ago
Feedback
randomness