-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Must run on port 8080? Failure ECONNREFUSED 127.0.0.1:8080 #204
Comments
for reference here is my full setup:
{
"name" : "TestJob",
"url" : "http://localhost:8008/webhook/:eventId",
"method" : "GET",
"callback" : {
"url" : "http://localhost:8008/invoked",
"method" : "POST"
}
}
{
"name" : "TestJob",
"interval" : "1642967160522",
"data": {
"params" : { "eventId": "61eca3a6d9dd5a296a17a8be"}
}
} on my web service (running on
looking in the db i see the reason for failure is that it requests a relative path (relative to > db.agendaJobs.findOne()
{
"_id" : ObjectId("61edb056c694492a53f49588"),
"name" : "TestJob",
"data" : {
"params" : {
"eventId" : "61eca3a6d9dd5a296a17a8be"
}
},
"type" : "normal",
"priority" : 0,
"nextRunAt" : null,
"lastModifiedBy" : null,
"lockedAt" : null,
"lastRunAt" : ISODate("2022-01-23T19:46:00.525Z"),
"failCount" : 1,
"failReason" : "failure in callback: 404 - \"<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n<meta charset=\\\"utf-8\\\">\\n<title>Error</title>\\n</head>\\n<body>\\n<pre>Cannot POST /invoked</pre>\\n</body>\\n</html>\\n\"",
"failedAt" : ISODate("2022-01-23T19:46:01.043Z"),
"lastFinishedAt" : ISODate("2022-01-23T19:46:01.043Z")
} |
hello, have you solved this issue in your fork? |
@Jaykingamez yes. See from this commit up to this commit. The others after that were project/docker specific customization. |
When i run
agenda-rest -u <mongo URI> -p 8082
i get the following failure on jobsmy job definitions do not use port 8080 so i was very confused.
i then ran
agenda-rest
on port 8080 to see if it was failing to connect to the agenda-rest API (expecting it on 8080) and the job worked!i dont see anywhere in the code this hardcoded expectation of agenda-rest running on 8080. where is that coming from and how can it be modified to match the port passed in
-p
CLI option?also a related error is the
callback.url
seems to invoke the agenda-rest API at that path. the job succeeded but callback failed (i had setcallback.url
to be another endpoint of mine to confirm how it worked). it looks like it ignores the host/port and just tries to do<agenda-rest>/path
. is that expected?The text was updated successfully, but these errors were encountered: