10 Replies Latest reply on May 16, 2016 3:46 PM by Farah Juma

    Openshift Wildfly 10 Failed deployments

    Blagovest Todorov Newbie

      I am developing on my local machine for a about a month and decided to go online.

       

       

      And the following is printed in the git( i am using TortuiseGit)

       

       

          CLIENT_MESSAGE: Failed deployments: ./ROOT.war

          remote: -------------------------

          remote: Git Post-Receive Result: success

          remote: Activation status: success

          remote: Deployment completed with status: success

       

       

      and decided to look in the root/wildfly/logs/server.log

      and there is this message:

       

       

          2016-05-11 04:36:30,567 INFO [org.jboss.as.server.deployment] (MSC service thre ad 1-1) WFLYSRV0028: Stopped deployment ROOT.war (runtime-name: ROOT.war) in 190 0ms

          2016-05-11 04:36:32,177 INFO [org.jboss.as.repository] (DeploymentScanner-threa ds - 2) WFLYDR0002: Content removed from location /var/lib/openshift/57234b570c1 e660f250000a9/wildfly/standalone/data/content/ae/df177fbae16100f06f022b340958dd0 bb68f6d/content

          2016-05-11 04:36:32,262 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0009: Undeployed "ROOT.war" (runtime-name: "ROOT.war")

          2016-05-11 04:36:32,262 INFO [org.jboss.as.controller] (DeploymentScanner-threa ds - 2) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service jboss.deployment.uni t."ROOT.war".INSTALL

        • 1. Re: Openshift Wildfly 10 Failed deployments
          Nicklas Karlsson Master

          What is in the log *before* it determines to stop the deployment?

          • 2. Re: Openshift Wildfly 10 Failed deployments
            Blagovest Todorov Newbie

            04:33:53,292 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC0000                                                                                                                     01: Failed to start service jboss.deployment.unit."ROOT.war".INSTALL: org.jboss.                                                                                                                     msc.service.StartException in service jboss.deployment.unit."ROOT.war".INSTALL:                                                                                                                      WFLYSRV0153: Failed to process phase INSTALL of deployment "ROOT.war"

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deplo                                                                                                                     ymentUnitPhaseService.java:154)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se                                                                                                                     rviceControllerImpl.java:1948)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont                                                                                                                     rollerImpl.java:1881)

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.                                                                                                                     java:1142)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor                                                                                                                     .java:617)

                    at java.lang.Thread.run(Thread.java:745)

            Caused by: java.lang.IllegalArgumentException: WFLYEE0047: Incompatible conflict                                                                                                                     ing binding at java:jboss/datasources/MySQLDS source: lookup (java:comp/DefaultD                                                                                                                     ataSource)

                    at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJnd                                                                                                                     iBinding(ModuleJndiBindingProcessor.java:238)

                    at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy                                                                                                                     (ModuleJndiBindingProcessor.java:107)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deplo                                                                                                                     ymentUnitPhaseService.java:147)

                    ... 5 more

             

             

            04:33:53,296 ERROR [org.jboss.as.controller.management-operation] (Controller Bo                                                                                                                     ot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" =                                                                                                                     > "ROOT.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jbos                                                                                                                     s.deployment.unit.\"ROOT.war\".INSTALL" => "org.jboss.msc.service.StartException                                                                                                                      in service jboss.deployment.unit.\"ROOT.war\".INSTALL: WFLYSRV0153: Failed to p                                                                                                                     rocess phase INSTALL of deployment \"ROOT.war\"

                Caused by: java.lang.IllegalArgumentException: WFLYEE0047: Incompatible conf                                                                                                                     licting binding at java:jboss/datasources/MySQLDS source: lookup (java:comp/Defa                                                                                                                     ultDataSource)"}}

             

            ps. i am new to unix and to the tail command and i thought that tail without parameters read the whole file.And yes, this is the error.

            • 3. Re: Openshift Wildfly 10 Failed deployments
              Nicklas Karlsson Master

              Could you show the code where the datasource is injected (make sure you use the correct @Resource annotation and use the "lookup" attribute and not the "name" if I recall correctly)

              • 4. Re: Openshift Wildfly 10 Failed deployments
                Blagovest Todorov Newbie

                I dont use Spring nor the @Resource annotation. I use Hibernate but without datasource

                • 5. Re: Openshift Wildfly 10 Failed deployments
                  jaikiran pai Master

                  Can you attach the standalone.xml configuration of the server, assuming that's the one you are using and have access to? Maybe fjuma knows more and might be able to help.

                  • 6. Re: Openshift Wildfly 10 Failed deployments
                    Farah Juma Apprentice

                    Please share your Hibernate configuration as well.

                    • 7. Re: Openshift Wildfly 10 Failed deployments
                      Blagovest Todorov Newbie

                      For local development i use mysql on openshift i use postgresql

                      I don' think the problem comes from hibernate because SessionFactory is initialized on first connected, but my build fails on "launch"

                       

                      standalone.xml - http://pastebin.com/p3nwd8KP

                       

                      HibernateUtils - http://pastebin.com/2BZn43EH

                      • 8. Re: Openshift Wildfly 10 Failed deployments
                        Farah Juma Apprentice

                        A couple things about your standalone.xml file:

                         

                        • You should always use OpenShift environment variables in your MySQL / PostgreSQL datasource configuration (e.g., see the default configuration provided by the WildFly cartridge: https://github.com/openshift-cartridges/openshift-wildfly-cartridge/blob/wildfly-10/versions/10/standalone/configuration/standalone.xml#L147-L180). The variables will automatically get populated with appropriate values when you add a MySQL / PostgreSQL cartridge to your app.
                        • You mentioned you're using PostgreSQL on OpenShift. However, one thing to note is your current datasource configuration actually enables the MySQL datasource and disables the PostgreSQL datasource. (With the default standalone.xml file provided by the WildFly cartridge, the value of the "enabled" attribute for the MySQL / PostgreSQL datasource gets automatically populated when the corresponding database cartridge is added.)
                        • 9. Re: Openshift Wildfly 10 Failed deployments
                          Blagovest Todorov Newbie

                          Yes you are right. Now it's builds, but i cannot connect now to websocket? Should i create a new thread

                          • 10. Re: Openshift Wildfly 10 Failed deployments
                            Farah Juma Apprentice

                            Yes, please create a new thread for that.