(connect ECONNREFUSED 127.0.0.1:80)
-
Hi I'm trying to use N8N to create users on my Cloudron instance.
N8N is hosted on Cloudron. I get this error:
{
"status": "rejected",
"reason": {
"message": "connect ECONNREFUSED 127.0.0.1:80",
"name": "Error",
"stack": "Error: connect ECONNREFUSED 127.0.0.1:80 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)",
"code": "ECONNREFUSED"
}
}
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest.node.js:860:27)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:44I see the other user(s?) with this problem are in Docker containers
https://community.n8n.io/t/http-request-via-proxy-connect-econnrefused-127-0-0-1-80/8469 -
@murgero thanks.
After a restart, I get a different error.
Form.io Trigger: Cast to ObjectId failed for value "undefined" (type string) at path "_id" for model "action"
There are some informative logs too (previously there was nothing that looked useful)
Oct 14 21:49:00 node: {
Oct 14 21:49:00 parameters: {
Oct 14 21:49:00 projectId: '6168084eb35ff178dd907fd7',
Oct 14 21:49:00 formId: '61680a64e1092633bce1b86c',
Oct 14 21:49:00 events: [Array],
Oct 14 21:49:00 simple: true
Oct 14 21:49:00 },
Oct 14 21:49:00 name: 'Form.io Trigger',
Oct 14 21:49:00 type: 'n8n-nodes-base.formIoTrigger',
Oct 14 21:49:00 typeVersion: 1,
Oct 14 21:49:00 position: [ 450, 450 ],
Oct 14 21:49:00 webhookId: '1bd8a0f4-de81-42f5-8037-4766712e0a3f',
Oct 14 21:49:00 alwaysOutputData: true,
Oct 14 21:49:00 credentials: { formIoApi: 'Form.io account' }
Oct 14 21:49:00 },
Oct 14 21:49:00 timestamp: 1634244540934,
Oct 14 21:49:00 httpCode: '400',
Oct 14 21:49:00 description: 'Cast to ObjectId failed for value "undefined" (type string) at path "_id" for model "action"'
Oct 14 21:49:00 }
Oct 14 21:49:12 ERROR RESPONSE
Oct 14 21:49:12 NodeApiError: Bad request - please check your parameters
Oct 14 21:49:12 at Object.formIoApiRequest (/app/code/node_modules/n8n-nodes-base/dist/nodes/FormIo/GenericFunctions.js:49:15)
Oct 14 21:49:12 at processTicksAndRejections (internal/process/task_queues.js:95:5)
Oct 14 21:49:12 at async Object.delete (/app/code/node_modules/n8n-nodes-base/dist/nodes/FormIo/FormIoTrigger.node.js:167:21)
Oct 14 21:49:12 at async ActiveWebhooks.removeWorkflow (/app/code/node_modules/n8n-core/dist/src/ActiveWebhooks.js:97:13)
Oct 14 21:49:12 at async TestWebhooks.needsWebhookData (/app/code/node_modules/n8n/dist/src/TestWebhooks.js:101:17)
Oct 14 21:49:12 at async /app/code/node_modules/n8n/dist/src/Server.js:490:38
Oct 14 21:49:12 at async /app/code/node_modules/n8n/dist/src/ResponseHelper.js:86:26 {
Oct 14 21:49:12 cause: Error: Request failed with status code 400
Oct 14 21:49:12 at createError (/app/code/node_modules/axios/lib/core/createError.js:16:15)
Oct 14 21:49:12 at settle (/app/code/node_modules/axios/lib/core/settle.js:17:12)
Oct 14 21:49:12 at IncomingMessage.handleStreamEnd (/app/code/node_modules/axios/lib/adapters/http.js:269:11)
Oct 14 21:49:12 at IncomingMessage.emit (events.js:388:22)
Oct 14 21:49:12 at IncomingMessage.emit (domain.js:470:12)
Oct 14 21:49:12 at endReadableNT (internal/streams/readable.js:1336:12)
Oct 14 21:49:12 at processTicksAndRejections (internal/process/task_queues.js:82:21) {
Oct 14 21:49:12 config: undefined,
Oct 14 21:49:12 request: undefined,
Oct 14 21:49:12 response: {
Oct 14 21:49:12 status: 400,
Oct 14 21:49:12 statusText: 'Bad Request',
Oct 14 21:49:12 headers: [Object],
Oct 14 21:49:12 config: [Object],
Oct 14 21:49:12 request: [ClientRequest],
Oct 14 21:49:12 data: [Object]
Oct 14 21:49:12 },
Oct 14 21:49:12 isAxiosError: true,
Oct 14 21:49:12 toJSON: [Function: toJSON],
Oct 14 21:49:12 cause: {},
Oct 14 21:49:12 error: {
Oct 14 21:49:12 status: 400,
Oct 14 21:49:12 message: 'Cast to ObjectId failed for value "undefined" (type string) at path "_id" for model "action"'
Oct 14 21:49:12 },
Oct 14 21:49:12 statusCode: 400,
Oct 14 21:49:12 options: {
Oct 14 21:49:12 url: 'https://api.form.io/project/6168084eb35ff178dd907fd7/form/61680a64e1092633bce1b86c/action/undefined',
Oct 14 21:49:12 method: 'delete',
Oct 14 21:49:12 data: '{}',
Oct 14 21:49:12 headers: [Object],
Oct 14 21:49:12 transformRequest: undefined,
Oct 14 21:49:12 transformResponse: undefined,
Oct 14 21:49:12 timeout: 300000,
Oct 14 21:49:12 adapter: undefined,
Oct 14 21:49:12 xsrfCookieName: 'XSRF-TOKEN',
Oct 14 21:49:12 xsrfHeaderName: 'X-XSRF-TOKEN',
Oct 14 21:49:12 maxContentLength: -1,
Oct 14 21:49:12 maxBodyLength: -1,
Oct 14 21:49:12 validateStatus: undefined,
Oct 14 21:49:12 transitional: [Object],
Oct 14 21:49:12 httpsAgent: undefined,
Oct 14 21:49:12 paramsSerializer: undefined
Oct 14 21:49:12 }
Oct 14 21:49:12 },
Oct 14 21:49:12 node: {
Oct 14 21:49:12 parameters: {
Oct 14 21:49:12 projectId: '6168084eb35ff178dd907fd7',
Oct 14 21:49:12 formId: '61680a64e1092633bce1b86c',
Oct 14 21:49:12 events: [Array],
Oct 14 21:49:12 simple: true
Oct 14 21:49:12 },
Oct 14 21:49:12 name: 'Form.io Trigger',
Oct 14 21:49:12 type: 'n8n-nodes-base.formIoTrigger',
Oct 14 21:49:12 typeVersion: 1,
Oct 14 21:49:12 position: [ 450, 450 ],
Oct 14 21:49:12 webhookId: '1bd8a0f4-de81-42f5-8037-4766712e0a3f',
Oct 14 21:49:12 alwaysOutputData: true,
Oct 14 21:49:12 credentials: { formIoApi: 'Form.io account' }
Oct 14 21:49:12 },
Oct 14 21:49:12 timestamp: 1634244552654,
Oct 14 21:49:12 httpCode: '400',
Oct 14 21:49:12 description: 'Cast to ObjectId failed for value "undefined" (type string) at path "_id" for model "action"'
Oct 14 21:49:12 } -
@robi I'm not quite sure I understand your comment.
In N8N I have a HTTP/JSON node. Within that node, I'm trying to run
curl -X POST -H "Content-Type: application/json" -d '{ "email": "{{$node["Form.io Trigger"].json["email"]}}" }' https://my.cloudron-space.org/api/v1/users?access_token=my-token
Where {{$node["Form.io Trigger"].json["email"]}}" } is a user email from a form.io form.
-
@brutalbirdie no problem, below.
{
"name": "Cloudron user v2",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"formId": "=",
"events": [
"create",
"update"
],
"simple": false
},
"name": "Form.io Trigger",
"type": "n8n-nodes-base.formIoTrigger",
"typeVersion": 1,
"position": [
450,
450
],
"webhookId": "3362f54d-56a7-4bfc-a175-44c2cad397f3",
"alwaysOutputData": false,
"credentials": {
"formIoApi": {
"id": "5",
"name": "Form.io account"
}
}
},
{
"parameters": {
"authentication": "headerAuth",
"requestMethod": "=POST",
"url": "=curl -X POST -H "Content-Type: application/json" -d '{ "email": "{{$node["Form.io Trigger"].json["email"]}}" }' https://my.cloudron-space.org/api/v1/users\?access_token\=mytoken",
"jsonParameters": "=",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
790,
340
],
"credentials": {
"httpHeaderAuth": {
"id": "3",
"name": "Header Auth account"
}
}
}
],
"connections": {
"Form.io Trigger": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Start": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"id": 4
}