Azure-Samples / azure-batch-samples

Azure Batch and HPC Code Samples
Other
261 stars 487 forks source link

Get started with Batch SDK for Node.js #255

Closed robert-tinn closed 5 years ago

robert-tinn commented 5 years ago

I am trying to run nodjs_batch_client_samples.js but I get an error:

<An error occured while creating the pool... nodejs_batch_client_sample.js:53 Object {body: "{>

I think the problem occurs when calling the add() method on batchClient.pool and this is because of the incorrect format of the poolConfig object. For example in the documentation the object has an attribute "targetDedicated" in the code, "targetDedicatedNodes" in the documentation (https://docs.microsoft.com/en-us/javascript/api/azure-batch/pooladdparameter?view=azure-node-latest#id) and "targetDedicatedComputeNodes" in a tutorial (https://docs.microsoft.com/en-us/azure/batch/batch-nodejs-get-started). However, I've tried all configurations but always get the same error.

I am using Node v8.12.0 on Windows 10.

bgklein commented 5 years ago

The correct attribute for the current SDK version is targetDedicatedNodes. Could you try re-trying the operation with attributes as specified by this model https://github.com/Azure/azure-sdk-for-node/blob/master/lib/services/batch/lib/models/poolAddParameter.js ?

If you continue to get the error please post the full error contents.

alfpark commented 5 years ago

Closing as there has been no response. Please re-open if you continue to encounter errors.