Getting 503 error while restoring repository 18/6318/2
authorSumit Kaushik <sk00613223@TechMahindra.com>
Wed, 22 Jan 2020 14:46:49 +0000 (20:16 +0530)
committerSumit Kaushik <sk00613223@techmahindra.com>
Wed, 22 Jan 2020 14:55:59 +0000 (14:55 +0000)
ISSUE-ID : ACUMOS-3918

Even Repository is stored but getting 503 error while restoring

Change-Id: I85f95b90ec4b070f59ab437e65f85256eb8ffc6b
Signed-off-by: Sumit Kaushik <sk00613223@TechMahindra.com>
elk-client/src/main/java/org/acumos/elk/client/service/SnapshotRepositoryServiceImpl.java

index c228e9a..81c9983 100644 (file)
@@ -228,6 +228,7 @@ public class SnapshotRepositoryServiceImpl extends AbstractELKClientConnection i
                        if (p[0] != null && p[0].length() > 0 && p[1] != null && p[1].length() > 0) {
                                archiveInfo1 = new ArchiveInfo(p[0], p[1]);
                        }
+                       logger.debug("archiveInfo1:{}", archiveInfo1);
                        return archiveInfo1;
                };
 
@@ -238,6 +239,8 @@ public class SnapshotRepositoryServiceImpl extends AbstractELKClientConnection i
                if (action.equalsIgnoreCase(ElkClientConstants.INFO)) {
                        try {
                                result = ElkServiceUtils.executeScript(action, "NA");
+                       
+                               logger.debug("result INFO: {} ", result);
                                resultList.add(result.trim());
                        } catch (Exception ex) {
                                logger.debug("Exception:", ex);
@@ -247,7 +250,9 @@ public class SnapshotRepositoryServiceImpl extends AbstractELKClientConnection i
                        try {
                                for (String repoName : archiveRequest.getRepositoryName()) {
                                        result = ElkServiceUtils.executeScript(action, repoName);
+                                       logger.debug("result : {}", result);
                                        resultList.add(result.trim());
+                                       logger.debug("resultList.size(): {}", resultList.size());
 
                                        
                                }
@@ -270,7 +275,7 @@ public class SnapshotRepositoryServiceImpl extends AbstractELKClientConnection i
                        elkArchiveResponse.setMsg("Action:" + action + " done");
                        elkArchiveResponse.setStatus(ElkClientConstants.SUCCESS);
                        elkArchiveResponse.setArchiveInfo(archiveInfoList);
-                       logger.debug("archiveInfoList:" + archiveInfoList);
+                       logger.debug("archiveInfoList:{}" + archiveInfoList);
                        if (action.equalsIgnoreCase("RESTORE")) {
                                for (ArchiveInfo archiveInfo : archiveInfoList) {
                                        ElkRepositoriesRequest elkCreateRepositoriesRequest = new ElkRepositoriesRequest();
@@ -284,9 +289,11 @@ public class SnapshotRepositoryServiceImpl extends AbstractELKClientConnection i
                        logger.debug("result:" + result);
                        if (result.contains("\n")) {
                                result = result.replace("\n", "");
+                               logger.debug("result :{}" + result);
                        }
                        elkArchiveResponse.setStatus(ElkClientConstants.FAIL);
                        elkArchiveResponse.setMsg(result.trim());
+                       logger.debug("elkArchiveResponse:{}" + elkArchiveResponse);
                }
                return elkArchiveResponse;
        }