Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 shaun_lombard
		
			shaun_lombard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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:
  
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?
 
					
				
		
 shaun_lombard
		
			shaun_lombard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 Lech_Miszkiewic
		
			Lech_MiszkiewicHi 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
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can also try by giving data connection access to service account id if it is created by another ID
 
					
				
		
 shaun_lombard
		
			shaun_lombard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I gave access for the data connection to !user.IsAnonymous() and it made no difference.
 Lech_Miszkiewic
		
			Lech_MiszkiewicDid you try my suggestion? logging in to the box with service account and trying to create connection and reload manualy?
regards
Lech
 
					
				
		
 shaun_lombard
		
			shaun_lombard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry, I am RootAdmin on the environment but do not have access to the service account password, so cannot try that.
 Lech_Miszkiewic
		
			Lech_MiszkiewicIn 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
 
					
				
		
 shaun_lombard
		
			shaun_lombard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			shaun_lombard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
