Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shaun_lombard
Creator II
Creator II

Reload now fails but manual load works

Hi all,

I have a Qlik Sense app that loads fine when run through data load editor, but fails when I do a "reload now" through QMC.

The script log indicates that there is a problem with the connection to the database and to check Username and Password. I know the Username and Password are correct because I am using them in the manual load. The database I am connecting to is the QSR (postgreSQL repository).

My data connection definition is as follows:

Capture.JPG 

I have tried updating the password in the above data connection directly but it made no difference.

The load script is as follows:

LIB CONNECT TO 'QSR';

LOAD ID,

  Name;

[CustomPropertyDefinitions]:

SELECT "ID",

  "Name"

FROM "public"."CustomPropertyDefinitions"

WHERE "Deleted" = 'False';

The script log is as follows:

2017-02-17 11:54:47      Reload Executed By            UserDirectory=INTERNAL; UserId=sa_scheduler

2017-02-17 11:54:47      Process Executing             Qlik Sense Server

...

2017-02-17 11:54:47 0049 *** CONNECT TO ***

2017-02-17 11:54:48 0051 LOAD ID,

2017-02-17 11:54:48 0052 Name

2017-02-17 11:54:48 0054 [CustomPropertyDefinitions]:

2017-02-17 11:54:48 0055 SELECT "ID",

2017-02-17 11:54:48 0056 "Name"

2017-02-17 11:54:48 0057 FROM "public"."CustomPropertyDefinitions"

2017-02-17 11:54:48 0058 WHERE "Deleted" = 'False'

2017-02-17 11:54:48 0059 and "Name" = 'ORG'

2017-02-17 11:54:49      Error: Unable to connect to database:

2017-02-17 11:54:49          Error message:

2017-02-17 11:54:49      Please check the values for Username‚ Password‚ Host and other properties.

Does anyone no of any issues with connecting to PostgreSQL when running as a task?

1 Solution

Accepted Solutions
shaun_lombard
Creator II
Creator II
Author

Finally got to the bottom of this issue.

I had specified a specific hostname in the connection, when I changed this to localhost the automated reload worked.

We have an environment with 4 nodes.

Thanks to everyone for the suggestions and ideas.

Shaun

View solution in original post

8 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Shaun,

I suggst you do folloing.

please login as a service account (one that is running Qlik Sense server) and try to run reload manualy.

See f it works -  I quess it will not.

I think connection string works ok when you are using it with your credentials, but service account may have different priviliges - maybe it should be created using service account credentials? Give it a try!

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
shraddha_g
Partner - Master III
Partner - Master III

You can also try by giving data connection access to service account id if it is created by another ID

shaun_lombard
Creator II
Creator II
Author

I gave access for the data connection to !user.IsAnonymous() and it made no difference.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Did you try my suggestion? logging in to the box with service account and trying to create connection and reload manualy?

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
shaun_lombard
Creator II
Creator II
Author

Sorry, I am RootAdmin on the environment but do not have access to the service account password, so cannot try that.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

In this case it may be hard to troubleshoot. I think it is related to account privileges and since service account is different than yours it may not be able to run that connection.

I hope you can get admins to check that with you.

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
shaun_lombard
Creator II
Creator II
Author

I need to define a system DSN on the server with the exact same name as my data connection, which will work apparently. I will test it and see.

shaun_lombard
Creator II
Creator II
Author

Finally got to the bottom of this issue.

I had specified a specific hostname in the connection, when I changed this to localhost the automated reload worked.

We have an environment with 4 nodes.

Thanks to everyone for the suggestions and ideas.

Shaun