clean up some sphinx warnings
[dcaegen2.git] / docs / sections / services / slice-analysis-ms / slice_analysis_ms_troubleshooting.rst
1 .. This work is licensed under a
2    Creative Commons Attribution 4.0 International License.
3    http://creativecommons.org/licenses/by/4.0
4
5 Trouble shooting steps
6 ----------------------
7 1. **Microservice stops and restarts during startup**
8
9     Possible reason & Solution: Microservice is not registered with the consul
10      - Check the consul if the microservice is registered with it and the MS is able to fetch the app config from the CBS. Check if CBS and consul are   deployed properly and try to redeploy the MS
11         The below logs will be seen if CBS is not reachable by the MS
12
13        15:14:13.861 [main] WARN  org.postgresql.Driver - JDBC URL port: 0 not valid (1:65535)
14        15:14:13.862 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext -
15        Exception encountered during context initialization - cancelling refresh attempt:
16        org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
17        'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied
18        dependency expressed through constructor parameter 0; nested exception is
19        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource'
20        defined in org.onap.dcaegen2.services. sliceanalysisms.Application: Initialization of bean failed;
21        nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
22        'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': Invocation of init method failed; nested exception is
23        org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execute database script; nested exception is
24        java.lang.RuntimeException: Driver org.postgresql.Driver claims to not accept jdbcUrl, jdbc:postgresql://null:0/sliceanalysisms
25        15:14:13.865 [main] INFO  o.a.catalina.core.StandardService - Stopping service [Tomcat]
26        15:14:13.877 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - Error starting ApplicationContext.
27        To display the conditions report re-run      your application with 'debug' enabled.
28        15:14:13.880 [main] ERROR o.s.boot.SpringApplication - Application run failed
29
30 2. **No PostgreSQL clusters have been deployed on this manager**
31
32    Solution:
33
34     kubectl exec -ti -n onap dev-dcaemod-db-primary-56ff585cf7-dxkkx bash
35     psql
36     ALTER ROLE "postgres" WITH PASSWORD 'onapdemodb';
37     \q
38
39     kubectl exec -ti -n onap dev-dcae-bootstrap-b47854569-dnrqf bash
40     cfy blueprints upload -b pgaas_initdb /blueprints/k8s-pgaas-initdb.yaml
41     cfy deployments create -b pgaas_initdb -i k8s-pgaas-initdb-inputs.yaml pgaas_initdb
42     cfy executions start -d pgaas_initdb install
43
44
45 Logging
46 -------
47 Since the Slice Analysis MS is deployed as a pod in the kubernetes, we can check the logs by
48 using the following command:
49
50  $ kubectl logs <pod-name> -namespace onap