Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
costin1
Contributor
Contributor

Metaservlet as Web API

I use Metaservlet to run a task from a web-based application.

When I send the request without context everything works fine. The context was set in the job.

{
"actionName": "runTask",
"authPass": "admin",
"authUser": "XXXXXX",
"mode": "synchronous",
"taskId":5
}

 

When I add some context I am getting a timeout error:

{
"actionName": "runTask",
"authPass": "admin",
"authUser": "XXXXXX",
"mode": "synchronous",
"context":{"host":"X.X.X.X",
"port":"1433",
"databaseName":"test",
"TableName":"sampler",
"username":"talend",
"password":"talend",
"sampleMethod":"Stratified",
"sampleType":"Percentage",
"percentage":"5",
"nominal":"5000",
"targetFeature":"city_id"}
"taskId":5
}

 

### Job STARTED at 2020/06/04 13:14:53 (jobId=20200604_115423_jCFsy, jobExecutionId=20200604131453_QIXtU) ###
[INFO ]: datasampler.copy_of_randomsampling_0_1.Copy_of_RandomSampling - TalendJob: 'Copy_of_RandomSampling' - Start.
[statistics] connecting to socket on port 10494
[statistics] connected

### Job ENDED WITH ERROR at 2020/06/04 13:15:15 (jobId=20200604_115423_jCFsy, jobExecutionId=20200604131453_QIXtU) ###
[FATAL]: datasampler.copy_of_randomsampling_0_1.Copy_of_RandomSampling - tDBInput_2 Network error IOException: Connection timed out: connect
java.sql.SQLException: Network error IOException: Connection timed out: connect
at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:436)

 

Please advise.

Thanks

Costin

Labels (3)
2 Replies
akumar2301
Specialist II
Specialist II

I am not sure about connection timeout . But looks like in your syntex one commma is missing

 

"targetFeature":"city_id"}

 

should be 

 

"targetFeature":"city_id"},

costin1
Contributor
Contributor
Author

Hi,

 

I actually discovered that I missed a digit in the IP address.

It works now.

Thanks

Costin Marzea