2
1
0

 I used onap_openstack_nofloat.yaml to create stack. Stack creation was successful, however for some reason, post-installation-script didn't not run successfully for portal-vm. 

Hence I manually logged into portal-vm and executed below part manually.

# Download and run install script
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_install.sh
-o /opt/portal_install.sh
cd /opt
chmod +x portal_install.sh
./portal_install.sh


I had to change some lines w.r.t our environment, http_proxy for docker, dns nameserver change etc. After all these steps, I could point to portal-vm:8989 successfully. However I'm unable to locate ECOMPPORTAL/login.htm . I was hit with below exception upon navigating to portal.


HTTP Status 500 - Servlet.init() for servlet dispatcher threw exception

type Exception report

message Servlet.init() for servlet dispatcher threw exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Thread.java:745)

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'manageService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.openecomp.portalapp.portal.service.EPAppService org.openecomp.portalapp.service.sessionmgt.ManageService.appService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'epAppService': Invocation of init method failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection
    org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
    org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:667)
    org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:539)
    org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:493)
    org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    javax.servlet.GenericServlet.init(GenericServlet.java:158)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)



Please advise!


PS : I had updated my

 /etc/hosts

file accordingly with right IPs as per my environment.


BR,

Viswa

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Dear All,

      I was able to bring up the portal by manually entering the docker container and editing /etc/hosts file. I was under the assumption that, editing /etc/hosts of portal VM would do the trick for me, but I had to enter the "1610-1" docker to do it.

      Furthermore, I had to manually put an entry in mysql as explained in portal tutorial page.

      Thanks for your support.

      BR,

      Viswa 

      1. Chandrakiran Barad

        Hello All,

        I am also facing same issue, cannot access ECOMPPORTAL.I have ONAP deployed on Newton release of openstack. I have used onap_openstack_float.yaml file for onap deployment.

        As mentioned i edited the /etc/hosts on portal vm and on "1610-1" container.

        added portal vm public ip and hostname in  "1610-1" container /etc/hosts along with container ip and hostname.

        Also i ran the mysql command and have ingress rule for 8989 port on openstack but still no luck. Am i missing something ?

      2. Chandrakiran Barad

        There was an issue with our lab VLAN configuration due to which portal was not accessible. Now after solving it, i can access to ecomp portal. Thanks.

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

      Based on the error: "Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection"

      I assume the Portal's database docker image might not be running. "docker ps -a" should tell that.

      1. Viswanath KSP

        Hi Manoop Talasila,

        Following is my output of docker ps -a

        ```

        CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
        341b1f036e31 ep:1610-1 "/PROJECT/OpenSour..." About an hour ago Up About an hour 0.0.0.0:8006->8005/tcp, 0.0.0.0:8010->8009/tcp, 0.0.0.0:8989->8080/tcp 1610-1
        ae928d90c699 ecompdb:portal "docker-entrypoint..." About an hour ago Up About an hour ecompdb_portal
        a31c1601db1a mariadb "docker-entrypoint..." About an hour ago Created data_vol_portal

        ```

      2. Viswanath KSP

        Is there any update on my query? I'm stuck here and would appreciate some immediate help.

        BR,

        Viswa

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

      What is the output of docker ps -a?

      Manoop Talasila, any clue about this Portal issue?

      1. Viswanath KSP

        Here you go!

        CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
        341b1f036e31 ep:1610-1 "/PROJECT/OpenSour..." About an hour ago Up About an hour 0.0.0.0:8006->8005/tcp, 0.0.0.0:8010->8009/tcp, 0.0.0.0:8989->8080/tcp 1610-1
        ae928d90c699 ecompdb:portal "docker-entrypoint..." About an hour ago Up About an hour ecompdb_portal
        a31c1601db1a mariadb "docker-entrypoint..." About an hour ago Created data_vol_portal
      2. Manoop Talasila

        ep:1610-1 image contains the Portal java web application which tries to connect to database using the portal vm name. May be the changes to http_proxy for docker, dns nameserver change might be blocking some DB connections.

      3. Daniel Rose

        why did the http proxy need to change? that seems like a possible culprit


      4. Viswanath KSP

        In our environment, we don't have direct access to internet. We normally connect to our corporate proxy to get outside. Hence proxy changes to apt.conf, docker etc is very much necessary here.

        Could you please suggest some other workaround without removing docker proxy settings?

        BR,

        Viswa

      5. Daniel Rose

        ok so it may have to change but is it correctly setup? For instance if you dont exclude the hostnames that onap uses you will send those out to the proxy (where they dont exist) and you wont be able to connect.

      6. Viswanath KSP

        Yup. I had added those *.openecomp.org to no_proxy env. Also while connecting via browser, I added those as exceptions.

      7. Viswanath KSP

        Dear All,

        Is there any workaround for me? I even tried to manually start maria_db containter . But still portal fails to connect to DB container.


        BR,

        Viswa

      8. Viswanath KSP

        Is there any update on my query? I'm stuck here and would appreciate some immediate help.

        BR,

        Viswa

      9. Manoop Talasila

        The workaround to fix this database connection issue would be to edit the portal application's system.properties file to point the database host with actual IP address of the portal vm.

        To do that:

        1) I would first check if the database is really accessible from any "sql developer" kind of tool. Try test connection using the IP and port.

        2) Now connect to ep:1610-1 container, using command "docker exec -it ep:1610-1 /bin/bash".

        3) Go to "/opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/conf/system.properties"

        4) change the "portal.api.simpledemo.openecomp.org" to portal's vm public IP at line "db.connectionURL = jdbc:mysql://portal.api.simpledemo.openecomp.org:3306/portal"

        The reason for trying this would be to rule out the doubt of whether the application is able to figure out the IP of "portal.api.simpledemo.openecomp.org" or not. So by providing the actual IP, the application must be able to connect to it (unless it is some other proxy issue).

      10. Viswanath KSP

        Thanks Manoop Talasila . This could have been easier (smile) . But then I worked-around by changing the /etc/hosts file of the container instead. Anyways many thanks for providing me this info.

      11. Manoop Talasila

        Also, please check the discussion at Re: Tutorial: Accessing the ONAP Portal. There is suggestion on changing "recursion no;" value to yes to help resolve the portal FQDN.

      12. Andreas Geissler

        Also thanks for the hint.
        I changed both the "recursion no" in the DNS VM and the /etc/hosts in the Portal Container. Now the Portal is up again.
        Is someone working on the fixes in the Portal Container as well ? 

      13. Manoop Talasila

        The issue seems to environment specific. The value "recursion no" worked in Rackspace environment for us. @Marco team is looking into it to see, if there is any chance to improve.

      14. Michael O'Brien

        I have the same issue in the 20170804 tagged version of master/1.1 in Rackspace.

        portaldb failed on VM cloud-init - restarted tomcat after starting the db - fixed the login (but not the later VID-AAI 500 during the first rest call 

        root@vm1-portal:~# docker ps -a

        CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                    PORTS                                                                    NAMES

        d4968a92403b        widget-ms           "sh -c 'java $JAVA..."   34 hours ago        Up 34 hours               0.0.0.0:8082->8082/tcp                                                   ecomp-portal-widget-ms

        06c0071911cf        ep:1610-1           "/configure-and-ru..."   34 hours ago        Up 34 hours               0.0.0.0:8006->8005/tcp, 0.0.0.0:8010->8009/tcp, 0.0.0.0:8989->8080/tcp   onap_portal

        9c143d60a356        ecompdb:portal      "docker-entrypoint..."   34 hours ago        Exited (1) 34 hours ago                                                                            ecompdb_portal

        305de51fd1e1        mariadb             "docker-entrypoint..."   34 hours ago        Created                                                                                            data_vol_portal



        docker start ecompdb_portal

        docker restart onap_portal 


        root@vm1-portal:~# docker ps -a

        CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                                                    NAMES

        d4968a92403b        widget-ms           "sh -c 'java $JAVA..."   34 hours ago        Up 34 hours         0.0.0.0:8082->8082/tcp                                                   ecomp-portal-widget-ms

        06c0071911cf        ep:1610-1           "/configure-and-ru..."   34 hours ago        Up 10 minutes       0.0.0.0:8006->8005/tcp, 0.0.0.0:8010->8009/tcp, 0.0.0.0:8989->8080/tcp   onap_portal

        9c143d60a356        ecompdb:portal      "docker-entrypoint..."   34 hours ago        Up 12 minutes                                                                                ecompdb_portal

        305de51fd1e1        mariadb             "docker-entrypoint..."   34 hours ago        Created 

      CommentAdd your comment...