DevPortal does not work well
search cancel

DevPortal does not work well


Article ID: 225421


Updated On:


CA API Developer Portal


Not all containers are started, specifically portal_analytics-server

root@ltdt ~]# docker service ls
ID                  NAME                        MODE                REPLICAS            IMAGE                                    PORTS
oo2lly47btex        portal_analytics-server     global              0/1                 caapim/analytics-server:5.0              *:9045->9045/tcp
w742nm39y496        portal_apim                 global              1/1                 caapim/ingress:5.0
vd7ieisj6rem        portal_authenticator        global              1/1                 caapim/authenticator:5.0



Release : 5.0

Component : API PORTAL


DevPortal was using 100% CPU, attempt to restart the portal using script "".  Issues with locks to portal_db occurred 

Log from the portal_analytics-server container


portal_analytics-server.0.4nn1bagcc32k@ltdt    | [QueryServer.log] [2021-10-04 16:12:07,332] [INFO ] [l.e.j.JdbcExecutor] [main] [|] [|||] SELECT ID,LOCKED,LOCKGRANTED,LOCKEDBY FROM public.databasechangeloglock WHERE ID=1 



portal_analytics-server.0.4nn1bagcc32k@ltdt    | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'analyticsLiquibase' defined in class path resource [com/ca/apim/portal/analytics/configuration/AnalyticsLiquibaseConfig.class]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ( since 9/2/21 7:56 PM


To solve need to clear the lock in the analytice DB





The  analytics DB is locked - most likely is shut down unexpectedly 

We will need to access the exec of the  portal_db container, then access postGres, analytics database to change the lock to false

# docker ps | grep postgres ls 

Get the container ID 

# docker exec -it <containerID-prmiary>  /bin/sh

psql -U admin


List databases:


Connect to analytics

\c analytics

To view:

select * from databasechangeloglock;

Set to false

update  databasechangeloglock set locked = false


The analytics container should start on next attempt

This will fix the start problem, but it the login still fails it maybe a user password issue