BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sathya66
Barite | Level 11

Hi All,

I have taken the score code generated in Viya and am trying to run it in EG.   I have changed the variables that feed into the macro as best as I can 

but I am getting below error.

ERROR: The tcpSockRead call failed. The system error is 'The connection was reset by a peer.'.

ERROR: Connection has been closed.

1 ACCEPTED SOLUTION

Accepted Solutions
naveend13
Calcite | Level 5

I have faced this kind of error once before and this error message is reported when the object spawner has been stopped intermittently and interactive sessions get disconnected without informing the applications about the reason.

 

http://support.sas.com/kb/34/776.html

View solution in original post

6 REPLIES 6
sathya66
Barite | Level 11

Thank you,

see the log below.

 


34 /*****************************************************************************
35 ** Macro: Score Data Mining Model
36 **
37 ** Description: Score the specified model using the score execution service
38 ******************************************************************************/
39
40 %macro DMScoreModel(hostname, port, token, projectId, modelId, datasourceUri, outputCasLib, outputTableName);
41
42 filename resp TEMP;
43 filename headers TEMP;
44 filename data TEMP;
45
46 %let scoreModelUrl=&hostname:&port/dataMining/projects/&projectId/models/&modelId/scoreExecutions;
47
48 proc json out=data pretty;
49 write open object;
50 write values "dataTableUri" "&datasourceUri";
51 write values "outputCasLibName" "&outputCasLib";
52 write values "outputTableName" "&outputTableName";
53 write close;
54 run;
55
56 proc http
57 method="POST"
58 url="&scoreModelUrl"
59 in=data
60 headerout=headers
61 out=resp;
62 headers
63 "Accept"="application/vnd.sas.score.execution+json"
64 "Content-Type"="application/vnd.sas.analytics.data.mining.model.score.request+json"
65 "Authorization"=&token;
66 run;
67
68 %mend;
69
70 /**********************************************************************************************
71 * Edit the following options to customize the scoring operation
72 * hostname: REQUIRED: The Viya host name
73 * port: REQUIRED: The Viya port
74 * token: REQUIRED: The OAuth2 token used to authenticate the request
75 * projectId: REQUIRED: The id of the project that contains the model to score
76 * modelId: REQUIRED: The id of the model to score
77 * datasourceUri: REQUIRED: The uri of the datasource being used for scoring. This information is available from the
77 ! dataTables endpoint.
78 * http://HOST:PORT/dataTables/dataSources
79 * outputCasLib: REQUIRED: The name of the cas lib where the score output table should be written
80 * outputTableName: REQUIRED: The name of the output scoring table to create
81 **********************************************************************************************/
82 %let hostname =XXXXXXX;
83 %let port = 5570;
84 %let token="XXXXXXXXXXXXX";
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.
85 %let projectId = c5f6c81c-3a7b-4f7d-bd17-6b7a3943a64a;
86 %let modelId = 68812741-d3c7-483c-b4c5-8ff0725e544a;
87 %let datasourceUri = /dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/HMEQ_TEST;
88 %let outputCasLib = CASUSER;
89 %let outputTableName = HMEQ_SCORED;
90 %DMScoreModel(&hostname, &port, &token, &projectId, &modelId, &datasourceUri, &outputCasLib, &outputTableName);
NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.

 

NOTE: PROCEDURE JSON used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.

ERROR: The tcpSockRead call failed. The system error is 'The connection was reset by a peer.'.
ERROR: Connection has been closed.
NOTE: PROCEDURE HTTP used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.

 

sathya66
Barite | Level 11

Sorry I can't find the unbalanced quotes. in which line?  from above log.

Thanks,

SS

 

naveend13
Calcite | Level 5

I have faced this kind of error once before and this error message is reported when the object spawner has been stopped intermittently and interactive sessions get disconnected without informing the applications about the reason.

 

http://support.sas.com/kb/34/776.html

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 7683 views
  • 0 likes
  • 3 in conversation