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