-1

I am setup apache cloudstack on windows. I did mvn clean and mvn install successfully but I got an error when I enter $ mvn -P developer -pl developer -Ddeploydb command in cygwin.

When I hit enter that show below error.

$ mvn -P developer -pl developer -Ddeploydb  

[INFO] Scanning for projects...  
[INFO]  
[INFO] ------------------------------------------------------------------------  
[INFO] Building Apache CloudStack Developer Mode 4.6.0-SNAPSHOT  
[INFO] ------------------------------------------------------------------------  
[INFO]  
[INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-de
veloper ---  
[INFO] Starting audit...
Audit done.

[INFO]  
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default)
 @ cloud-developer ---  
[WARNING] Ignoring missing properties file: C:\cs\developer\..\utils\conf\db.pro
perties.override  
[INFO]  
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-developer
 ---  
[INFO]  
[INFO] --- maven-antrun-plugin:1.8:run (default) @ cloud-developer ---  
[INFO] Executing tasks  

main:  
[INFO] Executed tasks  
[INFO]  
[INFO] >>> exec-maven-plugin:1.2.1:java (create-schema) > validate @ cloud-devel
oper >>>  
[INFO]  
[INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-de
veloper ---  
[INFO] Starting audit...
Audit done.  

[INFO]  
[INFO] <<< exec-maven-plugin:1.2.1:java (create-schema) < validate @ cloud-devel
oper <<<  
[INFO]  
[INFO] --- exec-maven-plugin:1.2.1:java (create-schema) @ cloud-developer ---
log4j:WARN No appenders could be found for logger (org.springframework.core.env.
StandardEnvironment).  
log4j:WARN Please initialize the log4j system properly.  
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.  
========> WARNING: Provided file does not exist: C:\cs\developer/../utils/conf/d
b.properties.override  
========> WARNING: Provided file does not exist: C:\cs\developer/developer-prefi
ll.sql.override  
========> Initializing database=cloud with host=localhost port=3306 username=clo
ud password=cloud  
============> Running query: drop database if exists `cloud`
SQL exception in trying initDB: com.mysql.jdbc.exceptions.jdbc4.CommunicationsEx
ception: Communications link failure  

The last packet sent successfully to the server was 0 milliseconds ago. The driv
er has not received any packets from the server. 

Anyone give me solution of this problem please.
Thanks.

Justin Force
  • 6,203
  • 5
  • 29
  • 39
  • 3
    May be it is not a good idea to post your DB's username/password and port on a website. – Alp Jun 29 '15 at 20:21

1 Answers1

1
SQL exception in trying initDB: com.mysql.jdbc.exceptions.jdbc4.CommunicationsEx
ception: Communications link failure

It means that the DB isn't reachable at all. This can have one or more of the following causes:

  • IP address or hostname in JDBC URL is wrong.
  • Hostname in JDBC URL is not recognized by local DNS server.
  • Port number is missing or wrong in JDBC URL.
  • DB server is down or DB server doesn't accept TCP/IP connections or DB server has run out of connections.
  • Something is blocking connections, e.g. a firewall or proxy.

To solve these you can follow:

  • Verify and test DB server with ping, If DB is not started then Start the DB.
  • Refresh DNS or use IP address in JDBC URL instead.
  • Verify if mysqld is started without the --skip-networking option.
  • Disable firewall and/or configure firewall/proxy to allow/forward the port.
Arpit Aggarwal
  • 27,626
  • 16
  • 90
  • 108