VITALIoTOrg / vitaliot

The Open Source Project.
1 stars 7 forks source link

Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin #2

Open prokolyvakis opened 7 years ago

prokolyvakis commented 7 years ago

Hello, I am trying to install vital-iot with the code checked-out by: https://github.com/VITALIoTOrg/vitaliot.git. However, I am getting the following error:

Authenticating against security realm: ManagementRealm
Username:admin
Password:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] VITAL Data Management System ....................... SUCCESS [ 15.370 s]
[INFO] VITAL IoT Data Adapter ............................. FAILURE [  8.119 s]
[INFO] VITAL IoT Data Adapter PPI ......................... SKIPPED
[INFO] VITAL Core: Security Adapter ....................... SKIPPED
[INFO] VITAL Core: Security PPI Gateway ................... SKIPPED
[INFO] VITAL Core: Security SNMP Exposer .................. SKIPPED
[INFO] Vital Core: Service Discovery ...................... SKIPPED
[INFO] Vital Core: Filtering .............................. SKIPPED
[INFO] Vital Core: CEP .................................... SKIPPED
[INFO] Vital Core: Orchestrator ........................... SKIPPED
[INFO] Vital Core: Orchestrator EJB ....................... SKIPPED
[INFO] Vital Core: Orchestrator WAR ....................... SKIPPED
[INFO] Vital Core: Orchestrator EAR ....................... SKIPPED
[INFO] Vital Core: Orchestrator Frontend .................. SKIPPED
[INFO] Vital Management ................................... SKIPPED
[INFO] Vital Management: EJB .............................. SKIPPED
[INFO] Vital Management: WAR .............................. SKIPPED
[INFO] Vital Management: Trust Manager .................... SKIPPED
[INFO] Vital Management: Trust Engine ..................... SKIPPED
[INFO] Vital Management: EAR .............................. SKIPPED
[INFO] Vital Management: Frontend ......................... SKIPPED
[INFO] Vital OS: Frontend ................................. SKIPPED
[INFO] Vital .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.241 s
[INFO] Finished at: 2016-11-21T14:25:53+01:00
[INFO] Final Memory: 32M/88M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) on project vital-core-iot-data-adapter: Deployment failed and was rolled back. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :vital-core-iot-data-adapter

How I can resolve this problem?

Kind regards, Prodromos

angeloslenis commented 7 years ago

Hello, before you deploy please try executing mvn clean install to make sure no compilation or maven errors occur.

If the above step succeeds you will need at minimum:

  1. A wildfly application server running on localhost
  2. A MongoDB running on localhost
  3. Copy the files from /configuration/edit/* to /standalone/configuration
  4. Check these files and update as necessary in you setup. The default values should work though if everything is installed on localhost.
  5. Start wildfly with ./standalone -c standalone-vital.xml
  6. After wildfly starts, run mvn clean package deploy

With the above steps, all applications should at least deploy properly.

If you still have troubles, please execute the last maven command with the -e flag (to enable debugging) and check the logs of wildfly for errors and attach both in this issue

prokolyvakis commented 7 years ago

Hello again, I went through a fresh install of Ubuntu. I summarize what I' ve done:

1) I have a MongoDB running on localhost. 2) I have a wildfly application server that is able to run with /bin/ -c standalone.xml without any mistake. I would like to mention that I haven't add any user in the wildfly application server by this time. 3) I have copied the files from /configuration/wildfly (namely the files: standalone-vital.xml, vital-properties.xml) to /standalone/configuration. 4) When I am trying to run: /bin/standalone -c standalone-vital.xml I get the following errors:

00:46:14,500 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "webservices")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
00:46:14,502 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "undertow"),
    ("server" => "default-server"),
    ("https-listener" => "https")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
00:46:14,504 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("core-service" => "management"),
    ("security-realm" => "UndertowRealm")
]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.server.controller.management.security_realm.UndertowRealm.key-manager" => "org.jboss.msc.service.StartException in service jboss.server.controller.management.security_realm.UndertowRealm.key-manager: Failed to start service
    Caused by: java.lang.IllegalStateException: org.jboss.msc.service.StartException in anonymous service: WFLYDM0086: The KeyStore can not be found at /opt/wildfly/standalone/configuration/vital-integration.jks
    Caused by: org.jboss.msc.service.StartException in anonymous service: WFLYDM0086: The KeyStore can not be found at /opt/wildfly/standalone/configuration/vital-integration.jks"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.server.controller.management.security_realm.UndertowRealm.key-manager"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
00:46:14,567 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.server.controller.management.security_realm.UndertowRealm.key-manager: org.jboss.msc.service.StartException in service jboss.server.controller.management.security_realm.UndertowRealm.key-manager: Failed to start service

00:46:14,685 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9991/management
00:46:14,685 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9991
00:46:14,688 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 4573ms - Started 316 of 559 services (5 services failed or missing dependencies, 376 services are lazy, passive or on-demand)

which is according to my understanding a problem of missing: vital-integration.jks.

angeloslenis commented 7 years ago

You can safely remove the following segment from standalone-vital.xml. It is used if you need to enable SSH on your server.

`

`

Alternatively you can create a self signed certificate with the following commands:

More detailed instructions, from a new Ubuntu installation to a full Vital setup can also be found in

https://docs.google.com/document/d/103MVa1UaHtdM4OOTf8plGSogzP1_2CrSDuflGoZqNzg/edit?usp=sharing

prokolyvakis commented 7 years ago

Hello again, I tried both ( removing the SSL segment or creating the trusted certificates ), however I was getting again errors. Finally changed the SSL segment to:

<security-realm name="UndertowRealm">
                <server-identities>
                    <ssl>
                        <keystore path="vital.jks" relative-to="jboss.server.config.dir" keystore-password="vitalpass" alias="local.vital-iot.eu" key-password="vitalpass" generate-self-signed-certificate-host="localhost"/>
                    </ssl>
                </server-identities>
            </security-realm>

Even if I don't consider it's the best choice, I managed to start the wildfly without errors, however, I cannot access to: localhost:9990...so I cannot start the procedure of deploying the vital-iot...

By ./standalone -c standalone.xml I do still have access to the localhost:9990. Any idea? Moreover, when I try to: mvn clean package wildfly:deploy I get the following error:

INFO: JBoss Remoting version 4.0.3.Final
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] VITAL Data Management System ....................... FAILURE [  9.316 s]
[INFO] VITAL IoT Data Adapter ............................. SKIPPED
[INFO] VITAL IoT Data Adapter PPI ......................... SKIPPED
[INFO] VITAL Core: Security Adapter ....................... SKIPPED
[INFO] VITAL Core: Security PPI Gateway ................... SKIPPED
[INFO] VITAL Core: Security SNMP Exposer .................. SKIPPED
[INFO] Vital Core: Service Discovery ...................... SKIPPED
[INFO] Vital Core: Filtering .............................. SKIPPED
[INFO] Vital Core: CEP .................................... SKIPPED
[INFO] Vital Core: Orchestrator ........................... SKIPPED
[INFO] Vital Core: Orchestrator EJB ....................... SKIPPED
[INFO] Vital Core: Orchestrator WAR ....................... SKIPPED
[INFO] Vital Core: Orchestrator EAR ....................... SKIPPED
[INFO] Vital Core: Orchestrator Frontend .................. SKIPPED
[INFO] Vital Management ................................... SKIPPED
[INFO] Vital Management: EJB .............................. SKIPPED
[INFO] Vital Management: WAR .............................. SKIPPED
[INFO] Vital Management: Trust Manager .................... SKIPPED
[INFO] Vital Management: Trust Engine ..................... SKIPPED
[INFO] Vital Management: EAR .............................. SKIPPED
[INFO] Vital Management: Frontend ......................... SKIPPED
[INFO] Vital OS: Frontend ................................. SKIPPED
[INFO] Vital .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.333 s
[INFO] Finished at: 2016-11-22T05:44:13-08:00
[INFO] Final Memory: 28M/67M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) on project vital-core-dms: Could not execute goal deploy on /home/pro/vitaliot/vital-core-dms/target/vital-core-dms.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
prokolyvakis commented 7 years ago

Hello again, the above mentioned problem was easy, I have just changed the port to 9990 (it was set to 9991 by default). And the procedure of the installation started without a problem until this step:

.MF - Generating one
[INFO] Building jar: /home/pro/vitaliot/vital-core-orchestrator/vital-core-orchestrator-ear/target/vital-core-orchestrator-ear.ear
[INFO] 
[INFO] >>> wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) > package @ vital-core-orchestrator-ear >>>
[INFO] 
[INFO] --- maven-ear-plugin:2.6:generate-application-xml (default-generate-application-xml) @ vital-core-orchestrator-ear ---
[INFO] Generating application.xml
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ vital-core-orchestrator-ear ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/pro/vitaliot/vital-core-orchestrator/vital-core-orchestrator-ear/src/main/resources
[INFO] 
[INFO] --- maven-ear-plugin:2.6:ear (default-ear) @ vital-core-orchestrator-ear ---
[INFO] Could not find manifest file: /home/pro/vitaliot/vital-core-orchestrator/vital-core-orchestrator-ear/target/vital-core-orchestrator-ear/META-INF/MANIFEST.MF - Generating one
[INFO] Building jar: /home/pro/vitaliot/vital-core-orchestrator/vital-core-orchestrator-ear/target/vital-core-orchestrator-ear.ear
[INFO] 
[INFO] <<< wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) < package @ vital-core-orchestrator-ear <<<
[INFO] 
[INFO] --- wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) @ vital-core-orchestrator-ear ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] VITAL Data Management System ....................... SUCCESS [ 10.309 s]
[INFO] VITAL IoT Data Adapter ............................. SUCCESS [  6.046 s]
[INFO] VITAL IoT Data Adapter PPI ......................... SUCCESS [  2.375 s]
[INFO] VITAL Core: Security Adapter ....................... SUCCESS [  4.629 s]
[INFO] VITAL Core: Security PPI Gateway ................... SUCCESS [  3.446 s]
[INFO] VITAL Core: Security SNMP Exposer .................. SUCCESS [  2.027 s]
[INFO] Vital Core: Service Discovery ...................... SUCCESS [  3.782 s]
[INFO] Vital Core: Filtering .............................. SUCCESS [  7.688 s]
[INFO] Vital Core: CEP .................................... SUCCESS [  7.820 s]
[INFO] Vital Core: Orchestrator ........................... SUCCESS [  0.026 s]
[INFO] Vital Core: Orchestrator EJB ....................... SUCCESS [  2.841 s]
[INFO] Vital Core: Orchestrator WAR ....................... SUCCESS [  4.875 s]
[INFO] Vital Core: Orchestrator EAR ....................... FAILURE [01:18 min]
[INFO] Vital Core: Orchestrator Frontend .................. SKIPPED
[INFO] Vital Management ................................... SKIPPED
[INFO] Vital Management: EJB .............................. SKIPPED
[INFO] Vital Management: WAR .............................. SKIPPED
[INFO] Vital Management: Trust Manager .................... SKIPPED
[INFO] Vital Management: Trust Engine ..................... SKIPPED
[INFO] Vital Management: EAR .............................. SKIPPED
[INFO] Vital Management: Frontend ......................... SKIPPED
[INFO] Vital OS: Frontend ................................. SKIPPED
[INFO] Vital .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:15 min
[INFO] Finished at: 2016-11-23T05:14:01-08:00
[INFO] Final Memory: 67M/161M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) on project vital-core-orchestrator-ear: Error executing FORCE_DEPLOY: Operation failed: Channel closed -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :vital-core-orchestrator-ear

And the output in the terminal that i run wildfly is:

05:13:10,304 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'ServiceDAO' in deployment unit 'subdeployment "vital-core-orchestrator-ejb.jar" of deployment "vital-core-orchestrator-ear.ear"' are as follows:

    java:global/vital-core-orchestrator-ear/vital-core-orchestrator-ejb/ServiceDAO!eu.vital.orchestrator.service.ServiceDAO
    java:app/vital-core-orchestrator-ejb/ServiceDAO!eu.vital.orchestrator.service.ServiceDAO
    java:module/ServiceDAO!eu.vital.orchestrator.service.ServiceDAO
    java:global/vital-core-orchestrator-ear/vital-core-orchestrator-ejb/ServiceDAO
    java:app/vital-core-orchestrator-ejb/ServiceDAO
    java:module/ServiceDAO

05:13:10,379 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'SchedulerBean' in deployment unit 'subdeployment "vital-core-orchestrator-ejb.jar" of deployment "vital-core-orchestrator-ear.ear"' are as follows:

    java:global/vital-core-orchestrator-ear/vital-core-orchestrator-ejb/SchedulerBean!eu.vital.orchestrator.job.SchedulerBean
    java:app/vital-core-orchestrator-ejb/SchedulerBean!eu.vital.orchestrator.job.SchedulerBean
    java:module/SchedulerBean!eu.vital.orchestrator.job.SchedulerBean
    java:global/vital-core-orchestrator-ear/vital-core-orchestrator-ejb/SchedulerBean
    java:app/vital-core-orchestrator-ejb/SchedulerBean
    java:module/SchedulerBean

05:13:10,500 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'OperationDAO' in deployment unit 'subdeployment "vital-core-orchestrator-ejb.jar" of deployment "vital-core-orchestrator-ear.ear"' are as follows:

    java:global/vital-core-orchestrator-ear/vital-core-orchestrator-ejb/OperationDAO!eu.vital.orchestrator.service.OperationDAO
    java:app/vital-core-orchestrator-ejb/OperationDAO!eu.vital.orchestrator.service.OperationDAO
    java:module/OperationDAO!eu.vital.orchestrator.service.OperationDAO
    java:global/vital-core-orchestrator-ear/vital-core-orchestrator-ejb/OperationDAO
    java:app/vital-core-orchestrator-ejb/OperationDAO
    java:module/OperationDAO

05:13:12,380 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 69) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
05:13:12,396 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 69) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
Killed

Do you have any idea?

P.S: It is needed this symbolic link: "ln -s /usr/bin/nodejs /usr/bin/node" or else the installation stops

angeloslenis commented 7 years ago

The above error indicates that nodejs is either not installed or not found. In Ubuntu, you would need to run the following (notice the -legacy part that actually installs some symbolic links like the one you have mentioned):

sudo apt-get install nodejs-legacy
sudo npm install -g bower
sudo npm install -g grunt-cli