1
0
-1

ONAP 1.1.0-STAGING-latest

After deploying portal seeing the following error message after login

Failed to communicate with the widget microservice.

Any idea on where I should look?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      I have found a work around

      From the ecomp-portal-widget-ms container logs


      2017-08-01 17:29:56 [main] ERROR o.h.e.jdbc.spi.SqlExceptionHelper - Could not connect: Unknown database 'portal&connecttimeout=2000'
      2017-08-01 17:29:56 [main] ERROR o.o.p.w.listener.WidgetEventListener - Exception occurred while performing WidgetsCatalogController.initializeWidgetCatalog in widget microservices. Details:Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not open connection
      2017-08-01 17:29:56 [main] INFO o.o.p.widget.MicroserviceApplication - Started MicroserviceApplication in 486.22 seconds (JVM running for 510.694)
      2017-08-01 18:21:45 [http-nio-8082-exec-1] INFO o.a.c.c.C.[.[localhost].[/widget] - Initializing Spring FrameworkServlet 'dispatcherServlet'
      2017-08-01 18:21:45 [http-nio-8082-exec-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization started
      2017-08-01 18:21:46 [http-nio-8082-exec-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization completed in 308 ms
      2017-08-01 18:21:47 [http-nio-8082-exec-1] WARN o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 1049, SQLState: 42000
      2017-08-01 18:21:47 [http-nio-8082-exec-1] ERROR o.h.e.jdbc.spi.SqlExceptionHelper - Could not connect: Unknown database 'portal&connecttimeout=2000'
      2017-08-01 18:21:47 [http-nio-8082-exec-1] ERROR o.o.p.w.c.WidgetsCatalogController - Exception occurred while performing WidgetsCatalogController.getUserWidgetCatalog in widget microservices. Details:Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not open connection

      Mount for the container 


      "Type": "bind",
      "Source": "/PROJECT/OpenSource/UbuntuEP/etc/ECOMPWIDGETMS/application.properties",
      "Destination": "/application.properties",
      "Mode": "",
      "RW": true,
      "Propagation": ""

      It's really strange that /PROJECT/OpenSource/UbuntuEP/etc/ECOMPWIDGETMS/application.properties and /application.properties differs

      Login to ecomp-portal-widget-ms container

      docker exec -ti ecomp-portal-widget-ms sh

      and edit file vi /application.properties

      Make sure following present

      ## App DB Properties

      spring.datasource.url=jdbc:mysql://portal.api.simpledemo.openecomp.org:3306/portal
      spring.datasource.connectTimeout=2000
      spring.datasource.username=root
      spring.datasource.password=Aa123456
      spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
      spring.database.driver.classname=org.mariadb.jdbc.Driver
      spring.jpa.show-sql=false
      spring.jpa.properties.hibernate.format_sql=false

      When I first check its like spring.datasource.url=jdbc:mysql://portal.api.simpledemo.openecomp.org:3306/portal&connectTimeout=2000  and that is the reason for error


      Now restart ecomp-portal-widget-ms

      docker restart ecomp-portal-widget-ms


      Clear the browser cookies and login again


        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi,

        1.0.0 version is more stable, if you would like to use it. I informed the Portal dev team to take a look at this issue and opened a bug  PORTAL-30 - Failed to communicate with the widget microservice Closed .

        1. kranthi guttikonda

          Hi Manoop Talasila Thank you. 
          Do you mean gerrit_branch or artifacts_version/docker_version in env file?

          #gerrit_branch: release-1.0.0
          gerrit_branch: master

        2. Manoop Talasila

          Gerrit branch release-1.0.0 is stable.

          Nexus have stable docker images of this 1.0.0 branch which can be deployed for your testing.

        3. kranthi guttikonda

          I am using following


          artifacts_version: 1.1.0-SNAPSHOT

          docker_version: 1.1-STAGING-latest

          #gerrit_branch: release-1.0.0
          gerrit_branch: master


          I am afraid that using release-1.0.0 will yield single AAI VM


          Daniel Rose Marco Platania Can you please help me here

        CommentAdd your comment...