#2794 closed defect (fixed)

Fix - rasservers are all stuck after some importings

Reported by: Bang Pham Huu Owned by: Dimitar Misev
Priority: major Milestone: 10.2
Component: server Version: 10.2
Keywords: Cc:
Complexity: Medium

Description

With the patch in the attachment, after running test wcst_import, rasservers will be stuck like below:

  INFO [2023-12-12 08:44:02] RasUtil@202: Executing rasql query rasql-784 with user rasadmin: UPDATE test_subsetting_crs_xy SET test_subsetting_crs_xy[0:136,0:136] ASSIGN decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/rasdaman_community/rasdaman/systemtest/30-wcstimport/testdata/135-wcs_subsetting_crs_xy/file.tiff\"]}")
 ERROR [2023-12-12 08:44:07] AbstractController@923: Failed processing request req-712, evaluation time 5011 ms. Reason: RasManager Error: Could not connect to RasServer .
 ERROR [2023-12-12 08:44:07] ExceptionUtil@98: Caught an exception:
RasManager Error: Could not connect to RasServer .

The reason is because of the rascontrol command to get the roles of the user:

Process process = runtime.exec(ConfigManager.RASDAMAN_BIN_PATH + "/rascontrol -q -e -x list user -rights", envp);

Attachments (1)

0001-ticket-2792-Fix-add-authentication_type-basic_header.patch (64.9 KB ) - added by Bang Pham Huu 12 months ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Bang Pham Huu, 12 months ago

Owner: set to Dimitar Misev
Status: newassigned

comment:2 by Bang Pham Huu, 12 months ago

Resolution: fixed
Status: assignedclosed

The issue was in RasUtil.java when the Rasimplementation was not closed properly.

It should be like below:

        try {
            impl.setUserIdentification(username, inputPassword);
        } catch (Exception ex) {
            String errorMessage = ex.getMessage();
            boolean userNotExist = errorMessage.contains("user") && errorMessage.contains("does not exist");
            boolean passwordInCorrect = errorMessage.contains("password") && errorMessage.contains("is invalid");
            if (userNotExist || passwordInCorrect) {
                throw new PetascopeException(ExceptionCode.InvalidCredentials, "rasdaman credentials are invalid for user: " + username);
            } else {
                throw new RasdamanException("Could not check if credentials for user '" + username + "' are valid in rasdaman. Reason: " + ex.getMessage(), ex);
            }
        } finally {
            try {
                // impl.setUserIdentification(...) implicitly calls connectClient(...),
                // which registers a client in rasmgr, so it has to be unregistered
                // with disconnectClient() at the end.
                impl.disconnectClient();
            } catch (Exception ex) {
                log.warn("Failed closing connection to rasdaman, reason: " + ex.getMessage());
            }
        }
Note: See TracTickets for help on using tickets.