I have setup monitoring on couple of nodeIds using node-opcua package.
It works fine for some time but then started printing some timeout messages.
Here's the journalctl output of my service:
Apr 07 08:02:02 test-machine myservice[559]: Timeout .... waiting for response for ReadRequest { /*RequestHeader*/
Apr 07 08:02:02 test-machine myservice[559]: authenticationToken /* NodeId */: ns=0;i=50
Apr 07 08:02:02 test-machine myservice[559]: timeStamp /* UtcTime */: 2017-04-07T15:01:02.501Z
Apr 07 08:02:02 test-machine myservice[559]: requestHandle /* IntegerId */: 334 0x14e
Apr 07 08:02:02 test-machine myservice[559]: returnDiagnostics /* UInt32 */: 0 0x0
Apr 07 08:02:02 test-machine myservice[559]: auditEntryId /* UAString */:
Apr 07 08:02:02 test-machine myservice[559]: timeoutHint /* UInt32 */: 0 0x0
Apr 07 08:02:02 test-machine myservice[559]: additionalHeader /* ExtensionObject */: null
Apr 07 08:02:02 test-machine myservice[559]: };
Apr 07 08:02:02 test-machine myservice[559]: warning : Transaction has timed out
Apr 07 08:02:15 test-machine myservice[559]: Timeout .... waiting for response for ReadRequest { /*RequestHeader*/
Apr 07 08:02:15 test-machine myservice[559]: authenticationToken /* NodeId */: ns=0;i=50
Apr 07 08:02:15 test-machine myservice[559]: timeStamp /* UtcTime */: 2017-04-07T15:01:15.835Z
Apr 07 08:02:15 test-machine myservice[559]: requestHandle /* IntegerId */: 335 0x14f
Apr 07 08:02:15 test-machine myservice[559]: returnDiagnostics /* UInt32 */: 0 0x0
Apr 07 08:02:15 test-machine myservice[559]: auditEntryId /* UAString */:
Apr 07 08:02:15 test-machine myservice[559]: timeoutHint /* UInt32 */: 0 0x0
Apr 07 08:02:15 test-machine myservice[559]: additionalHeader /* ExtensionObject */: null
Apr 07 08:02:15 test-machine myservice[559]: };
Apr 07 08:02:15 test-machine myservice[559]: warning : Transaction has timed out
Apr 07 08:02:29 test-machine myservice[559]: Timeout .... waiting for response for ReadRequest { /*RequestHeader*/
Apr 07 08:02:29 test-machine myservice[559]: authenticationToken /* NodeId */: ns=0;i=50
Apr 07 08:02:29 test-machine myservice[559]: timeStamp /* UtcTime */: 2017-04-07T15:01:29.169Z
Apr 07 08:02:29 test-machine myservice[559]: requestHandle /* IntegerId */: 336 0x150
Apr 07 08:02:29 test-machine myservice[559]: returnDiagnostics /* UInt32 */: 0 0x0
Apr 07 08:02:29 test-machine myservice[559]: auditEntryId /* UAString */:
Apr 07 08:02:29 test-machine myservice[559]: timeoutHint /* UInt32 */: 0 0x0
Apr 07 08:02:29 test-machine myservice[559]: additionalHeader /* ExtensionObject */: null
Apr 07 08:02:29 test-machine myservice[559]: };
Apr 07 08:02:29 test-machine myservice[559]: warning : Transaction has timed out
Apr 07 08:03:01 test-machine myservice[559]: Timeout .... waiting for response for OpenSecureChannelRequest { /*RequestHeader*/
Apr 07 08:03:01 test-machine myservice[559]: authenticationToken /* NodeId */: ns=0;i=0
Apr 07 08:03:01 test-machine myservice[559]: timeStamp /* UtcTime */: 2017-04-07T15:02:01.928Z
Apr 07 08:03:01 test-machine myservice[559]: requestHandle /* IntegerId */: 337 0x151
Apr 07 08:03:01 test-machine myservice[559]: returnDiagnostics /* UInt32 */: 0 0x0
Apr 07 08:03:01 test-machine myservice[559]: auditEntryId /* UAString */: null
Apr 07 08:03:01 test-machine myservice[559]: timeoutHint /* UInt32 */: 0 0x0
Apr 07 08:03:01 test-machine myservice[559]: additionalHeader /* ExtensionObject */: null
Apr 07 08:03:01 test-machine myservice[559]: };
Apr 07 08:03:01 test-machine myservice[559]: Warning: securityToken hasn't been renewed
Basically I want to keep the monitoring going forever and get the publishes every 15 minutes. So it would be really great if someone can help me with the parameters for that as well.
If you have access to the server you could take a look at this post.
In the post they state that, when you set up your client, the requestedLifetimeCount * requestedPublishingInterval shall be set to at least the PublishRequest.RequestHeader.timeoutHint:
var options = {
requestedPublishingInterval: 1000, // check on server
requestedMaxKeepAliveCount: 2,
requestedLifetimeCount: 100, // check on server
maxNotificationsPerPublish: 10,
publishingEnabled: true,
priority: 10,
}
var subscription = new opcua.ClientSubscription(opcSession, options);
Related
I am working on an event stream system. And my solution is: api-gatway->firehose data stream->data stream delivery->s3.
1.Send a json request(action is PUT) to api-getway
2.Integrate the request with Kinesis service
3.Valid data in the template mapping of the Integration Request
4.Delivery the data to data stream by firehose data delivery
5.Consume the stream and save into S3
It works with below data
1.Request data
{
"Data" : "this is a test"
}
2.Template mapping code of the Integration Request with firehose
{
"StreamName" : "Stream",
"Data" : "$util.base64Encode($input.json('$.Data'))",
"PartitionKey" : "1"
}
Execution log for request 4ad5f3a1-da7d-436f-bd3f-879ba045c622
Fri Jan 15 15:14:19 UTC 2021 : Starting execution for request: 4ad5f3a1-da7d-436f-bd3f-879ba045c622
Fri Jan 15 15:14:19 UTC 2021 : HTTP Method: PUT, Resource Path: /record
Fri Jan 15 15:14:19 UTC 2021 : Method request path: {}
Fri Jan 15 15:14:19 UTC 2021 : Method request query string: {}
Fri Jan 15 15:14:19 UTC 2021 : Method request headers: {}
Fri Jan 15 15:14:19 UTC 2021 : Method request body before transformations: {
"property":"1",
"name":"name"
}
Fri Jan 15 15:14:19 UTC 2021 : Endpoint request URI: https://kinesis.us-east-1.amazonaws.com/?Action=PutRecord
Fri Jan 15 15:14:19 UTC 2021 : Endpoint request headers: {Authorization=***************************************************************************************************************************************************************************************************************************************************************************************9bb292, X-Amz-Date=20210115T151419Z, x-amzn-apigateway-api-id=450acvde3l, Accept=application/json, User-Agent=AmazonAPIGateway_450acvde3l, X-Amz-Security-Token=IQoJb3JpZ2luX2VjEEAaCXVzLWVhc3QtMSJHMEUCIQC7W693nrtuUGrgUvOpn+PUKTRYTGAzRYVSWUPKoAc4eAIgGp/uH4yV/vynaMQUBNEBTwP79m0P9nVfCmw9CMWjY0Mq5QIIGBACGgw1MzUxMTE0MzMzNDAiDKy2z/4lnGJJJAWaOyrCAnANknvMUIbvf9diTZ4qYsdJ3LjETy9hE0f9pUZTBh7aKRjn2y4hbZc/oXGpsmHcgsgJAlIGD51gD0O5LR+N2EKjQeeo5GijkYvZvdbmxVRAZR27EhFzujCk3okePxAzVb3SeCQDWrBnEWn2VwqX4Y75QWwOgL8ZfcuxNKF/wbks0ukPFBo0p68KQ24PIXOYGMs9IAxHYa195+5mUMSi5Av62QKPpBbUAgZ2IJt9EKvRKyLYCs5XzS4lPCgsIbwouVB38f6UQKdQ9XsmD0cX04ODkdj2/0GHne6ufar7nANd3o08PmALd9mXK4z4gt/OxkZUe2AVLXvNQ4IodzW0WOUe1nFvq6YxpveDVfXKDRSK [TRUNCATED]
Fri Jan 15 15:14:19 UTC 2021 : Endpoint request body after transformations: {
"StreamName" : "EventStream",
"Data" : "IiI=",
"PartitionKey" : "1"
}
Fri Jan 15 15:14:19 UTC 2021 : Sending request to https://kinesis.us-east-1.amazonaws.com/?Action=PutRecord
Fri Jan 15 15:14:19 UTC 2021 : Received response. Status: 200, Integration latency: 21 ms
Fri Jan 15 15:14:19 UTC 2021 : Endpoint response headers: {x-amzn-RequestId=c028bf47-0059-8b93-9853-0cccfda9a977, x-amz-id-2=L15V+8AS8gN3HxJwiz0qVqi/UJn2xSWueRMnXdhqgjFw6TeuaRlYX62DZK9pa+O1PcKopTP55aHRLdhX0cQwovKefVpiuRtv, Date=Fri, 15 Jan 2021 15:14:19 GMT, Content-Type=application/x-amz-json-1.1, Content-Length=110}
Fri Jan 15 15:14:19 UTC 2021 : Endpoint response body before transformations: {"SequenceNumber":"49614572211779959518343530489315214421429290892684951554","ShardId":"shardId-000000000000"}
Fri Jan 15 15:14:19 UTC 2021 : Method response body after transformations: {"SequenceNumber":"49614572211779959518343530489315214421429290892684951554","ShardId":"shardId-000000000000"}
Fri Jan 15 15:14:19 UTC 2021 : Method response headers: {X-Amzn-Trace-Id=Root=1-6001b14b-bbccae126175224317a10a4e, Content-Type=application/json}
Fri Jan 15 15:14:19 UTC 2021 : Successfully completed execution
Fri Jan 15 15:14:19 UTC 2021 : Method completed with status: 200
But does not work with below:
1.Request data
{
"Data" : {
"property":"1",
"name":"name"
}
}
2.Template mapping code of the Integration Request with firehose
{
"StreamName" : "Stream",
"Data" : {
"property" : $input.json('$.property'),
"name" : $input.json('$.name')
},
"PartitionKey" : "1"
}
Execution log for request 05b707cc-d95c-40bf-8b75-375048697414
Fri Jan 15 15:39:34 UTC 2021 : Starting execution for request: 05b707cc-d95c-40bf-8b75-375048697414
Fri Jan 15 15:39:34 UTC 2021 : HTTP Method: PUT, Resource Path: /record
Fri Jan 15 15:39:34 UTC 2021 : Method request path: {}
Fri Jan 15 15:39:34 UTC 2021 : Method request query string: {}
Fri Jan 15 15:39:34 UTC 2021 : Method request headers: {}
Fri Jan 15 15:39:34 UTC 2021 : Method request body before transformations: {
"property":"1",
"name":"name"
}
Fri Jan 15 15:39:34 UTC 2021 : Endpoint request URI: https://kinesis.us-east-1.amazonaws.com/?Action=PutRecord
Fri Jan 15 15:39:34 UTC 2021 : Endpoint request headers: {Authorization=***************************************************************************************************************************************************************************************************************************************************************************************a43c70, X-Amz-Date=20210115T153934Z, x-amzn-apigateway-api-id=450acvde3l, Accept=application/json, User-Agent=AmazonAPIGateway_450acvde3l, X-Amz-Security-Token=IQoJb3JpZ2luX2VjEEAaCXVzLWVhc3QtMSJFMEMCHw0tTLi/gwtxUjwAQSl/CIY8aie2nmayl+Qsm6/i520CID9iXCFafaQTh4YqE1/tzvKgMO5IlYgFJrcNbAQB2Nc+KuUCCBkQAhoMNTM1MTExNDMzMzQwIgxeE22ch5hdFy3nB+UqwgJyKnQpnLuEY3zpcbRdEO5jks7yfx2+o1xfIz9Kga0S1PojPfzxh5aD/PthhP8D0jutv96ZVe8p52TwfSnv/z3YeDCFzsnw/U9kGFzGVt1pY2JMB4sg1vU7li8pFP/qiUQ3QA8cXbp4nWeE3kQGlPG4pjH0MsOvowTxM8G6yKosvCdD8fVyCJxWIjFnn1+dK9GGV/MnZlnaVqc57z0n0nrHgLjxBzDcDKJ5/xrgcqcYmUETFj8NyDJ9ESzCp0PhKJV9tGF4LgxbAgffe2Yw/3qpQyB6JNqJrZEczADp3gL0rjIBXhbnx5Yizs9MBMtoB9L22mAwEeqJRx4lK12wOqQZ5+0homLCugauYVoy3juNv/zW [TRUNCATED]
Fri Jan 15 15:39:34 UTC 2021 : Endpoint request body after transformations: {
"StreamName" : "EventStream",
"Data" : {
"property" : "1",
"name" : "name"
},
"PartitionKey" : "1"
}
Fri Jan 15 15:39:34 UTC 2021 : Sending request to https://kinesis.us-east-1.amazonaws.com/?Action=PutRecord
Fri Jan 15 15:39:34 UTC 2021 : Received response. Status: 400, Integration latency: 2 ms
Fri Jan 15 15:39:34 UTC 2021 : Endpoint response headers: {x-amzn-RequestId=cc937c57-744b-fca2-94e8-c5214b4386dd, x-amz-id-2=fqg8MLIbHOfeeFXp6wpii3l4yl32mI/5RyTwYQyzw9/OqpdLNqCBvBbTp8x7Q4YWAroefbfHb5IUEYeD68SQqh2bq87nL4vp, connection=close, Date=Fri, 15 Jan 2021 15:39:34 GMT, Content-Type=application/x-amz-json-1.1, Content-Length=99}
Fri Jan 15 15:39:34 UTC 2021 : Endpoint response body before transformations: {"__type":"SerializationException","Message":"Start of structure or map found where not expected."}
Fri Jan 15 15:39:34 UTC 2021 : Method response body after transformations: {"__type":"SerializationException","Message":"Start of structure or map found where not expected."}
Fri Jan 15 15:39:34 UTC 2021 : Method response headers: {X-Amzn-Trace-Id=Root=1-6001b736-328415f2db20383946bffd9e, Content-Type=application/json}
Fri Jan 15 15:39:34 UTC 2021 : Successfully completed execution
Fri Jan 15 15:39:34 UTC 2021 : Method completed with status: 200
reference: https://www.youtube.com/watch?v=0UxiV5sUlcA
My bad and I forgot to encode in template mapping.
The code should be:
{
"StreamName" : "Stream",
"Data" : "$util.base64Encode(
{
"property" : $input.json('$.property'),
"name" : $input.json('$.name')
}
),
"PartitionKey" : "1"
}
This has been working for months, I don't think I've changed anything, but with express.static, browsers show "pending" infinitely.
Here's the code:
const app = express();
app.use('/', express.static(
path.resolve('./build/web'),
{ dotfiles: 'allow' },
));
Here's a screenshot of Chrome's network tab:
Only main.js has this issue. If I open the file directly, it works. This also occurs in Firefox, so I suspect it's a Node/Express issue. I have adblockers turned off.
I ran DEBUG=* node server.js and the output is:
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send stat "/path/build/web/post/101"
[0] [1] /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router dispatching GET /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router query : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router expressInit : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router jsonParser : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT body-parser:json skip empty body
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router urlencodedParser : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT body-parser:urlencoded skip empty body
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router cookieParser : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router corsMiddleware : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router trim prefix (/js/main.js) from url /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router <anonymous> /js/main.js : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router serveStatic : /js/main.js?v=223
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send stat "/path/build/web/js/main.js"
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send pipe "/path/build/web/js/main.js"
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send accept ranges
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send cache-control public, max-age=0
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send modified Thu, 27 Aug 2020 06:50:21 GMT
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send etag W/"180a43-1742eae7e13"
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT send content-type application/javascript
[0] [1] Thu, 27 Aug 2020 07:02:15 GMT express:router dispatching GET /css/main.css?v=223
This output looks normal to me.
I tried:
clearing cache
incognito
closing/re-opening Chrome devtools
closing/re-opening Chrome
restarting the server
After several attempts with the above, the issue goes away for a few hours, but I don't think any particular action consistently fixes the issue.
Any ideas what might be the culprit?
I encountered the same issue on node v14.8.0 and v14.9.0 with the latest published version of Express and the latest code on their master branch. Using v12.16.2 it works again.
I have got ISPConfig installed on my VPS and I'm trying to set up the email function.
My Server IP is 146.71.76.30 and hostname is set to dutyhosts.tk
Whenever I try and send an email via Roundcube I am getting the below error in the mail logs
Can someone advise on what I have missed or need to sort?
Aug 25 12:44:06 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11098, secured, session=<DBQKD7Otrtx/AAAB>
Aug 25 12:44:06 dutyhosts postfix/pickup[10367]: A6C04A558D: uid=33 from=<support#dutyhosts.tk>
Aug 25 12:44:06 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=451 out=640
Aug 25 12:44:06 dutyhosts postfix/cleanup[11095]: warning: connect to Milter service inet:localhost:11332: Connection refused
Aug 25 12:44:06 dutyhosts postfix/cleanup[11095]: A6C04A558D: message-id=<f003feab44aba7e7cd98fba5afbea994#dutyhosts.tk>
Aug 25 12:44:06 dutyhosts postfix/qmgr[10368]: A6C04A558D: from=<support#dutyhosts.tk>, size=549, nrcpt=1 (queue active)
Aug 25 12:44:08 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11102, secured, session=<bZwnD7OtwNx/AAAB>
Aug 25 12:44:08 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=70 out=633
Aug 25 12:44:10 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11106, secured, session=<dio+D7Otwtx/AAAB>
Aug 25 12:44:10 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=76 out=546
Aug 25 12:44:10 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11108, secured, session=<daxCD7OtxNx/AAAB>
Aug 25 12:44:10 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=120 out=766
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 941C0A5586: from=<dave#dutyhosts.tk>, size=542, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/trivial-rewrite[11099]: warning: do not list domain dutyhosts.tk in BOTH mydestination and virtual_mailbox_domains
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 79F61A5585: from=<dave#dutyhosts.tk>, size=541, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 1459AA5550: from=<dave#dutyhosts.tk>, size=539, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/smtp[11115]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11116]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11117]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11100]: A6C04A558D: to=<silv3r.sc0rpion#gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.197.26]:25, delay=5.9, delays=0.26/0.04/0.32/5.3, dsn=5.7.26, status=bounced (host gmail-smtp-in.l.google.com[172.217.197.26] said: 550-5.7.26 This message does not have authentication information or fails to 550-5.7.26 pass authentication checks. To best protect our users from spam, the 550-5.7.26 message has been blocked. Please visit 550-5.7.26 https://support.google.com/mail/answer/81126#authentication for more 550 5.7.26 information. r1si9530921qvm.98 - gsmtp (in reply to end of DATA command))
Aug 25 12:44:12 dutyhosts postfix/cleanup[11095]: 7E798A558E: message-id=<20200825124412.7E798A558E#dutyhosts.tk>
Aug 25 12:44:12 dutyhosts postfix/bounce[11118]: A6C04A558D: sender non-delivery notification: 7E798A558E
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 7E798A558E: from=<>, size=3210, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/trivial-rewrite[11099]: warning: do not list domain dutyhosts.tk in BOTH mydestination and virtual_mailbox_domains
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: A6C04A558D: removed
Aug 25 12:44:12 dutyhosts postfix/smtp[11100]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11115 exit status 1
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: /usr/lib/postfix/sbin/smtp: bad command startup -- throttling
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11116 exit status 1
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11117 exit status 1
Aug 25 12:44:13 dutyhosts postfix/error[11121]: 941C0A5586: to=<dave#dutyhosts.tk>, relay=none, delay=938, delays=937/1.2/0/0.03, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/error[11122]: 79F61A5585: to=<dave#dutyhosts.tk>, relay=none, delay=999, delays=998/1.2/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11100 exit status 1
Aug 25 12:44:13 dutyhosts postfix/error[11121]: 1459AA5550: to=<dave#dutyhosts.tk>, relay=none, delay=571, delays=569/1.4/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/error[11124]: 7E798A558E: to=<support#dutyhosts.tk>, relay=none, delay=1.1, delays=0.02/1.1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Did you set your server up according to the Perfect Server tutorial?
I have integrated my loopback application with appDynamics library and all the middlewares are not firing from then on.
Used the debug command - DEBUG=* npm start to get the logs and found these logs coming up.
All the middlewares declared through middleware.json and imperatively through app.middleware() command are having this error message - No matching layer found
Any idea what's going wrong here - Which loopback package is responsible for express routing implementation
2020-07-10T15:23:11.241Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:boot:executor Configuring middleware "/usr/nodejs/njsDT_SIT/apps/wlpn/ob-cof-funds-confirmation-consents-channel/package/node_modules/compression"
2020-07-10T15:23:11.243Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:app use initial compression
2020-07-10T15:23:11.244Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT express:router use [] compression
2020-07-10T15:23:11.245Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT express:router:layer new []
2020-07-10T15:23:11.245Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:app No matching layer is found for initial compression
2020-07-10T15:23:11.245Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:boot:executor Configuring middleware "/usr/nodejs/njsDT_SIT/apps/wlpn/ob-cof-funds-confirmation-consents-channel/package/node_modules/loopback-context/server/middleware/per-request.js" 2020-07-10T15:23:11.246Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:app use initial perRequestContext
2020-07-10T15:23:11.253Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT express:router use [] perRequestContext
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT express:router:layer new []
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:app No matching layer is found for initial perRequestContext
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:boot:executor Configuring middleware "/usr/nodejs/njsDT_SIT/apps/wlpn/ob-cof-funds-confirmation-consents-channel/package/node_modules/cors"
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:app use initial corsMiddleware
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT express:router use [] corsMiddleware
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT express:router:layer new []
2020-07-10T15:23:11.254Z - : pid:36871 worker:1 Fri, 10 Jul 2020 15:23:11 GMT loopback:app No matching layer is found for initial corsMiddleware```
My purpose is to expire a token after 1hr (3600 secs). While trying with nodejs speakeasy the token is getting invalidated much before that. The below logs are for "1, 10 and 60 minutes" and that also getting invalidated muche before the 1 minute. Max of the time I am getting inconsistent results.
Partial code snippet
let secret = speakeasy.generateSecret({
length: 10
});
let seconds= 3600; //1Hr
let token = speakeasy.totp({
secret: secret.base32,
step: seconds
});
let otp = {
"secret": secret.base32.toString(),
"token": token
};
function checkOTP(otp) {
let verified = speakeasy.totp.verify({
secret: otp.secret,
token: otp.token,
step: seconds
});
return verified;
}
Am I doing something wrong? Few console logs from a sample script:
For 1 minute - Invalidated before 18secs
[ Fri Dec 08 2017 09:16:18 GMT-0800 (Pacific Standard Time) ](true) 9:16:59 AM
[ Fri Dec 08 2017 09:16:18 GMT-0800 (Pacific Standard Time) ](false) 9:17:00 AM
For 10Mins - Invalidated before 7minutes
[ Fri Dec 08 2017 09:18:28 GMT-0800 (Pacific Standard Time) ](true) 9:19:59 AM
[ Fri Dec 08 2017 09:18:28 GMT-0800 (Pacific Standard Time) ](true) 9:19:59 AM
[ Fri Dec 08 2017 09:18:28 GMT-0800 (Pacific Standard Time) ](true) 9:19:59 AM
[ Fri Dec 08 2017 09:18:28 GMT-0800 (Pacific Standard Time) ](true) 9:19:59 AM
[ Fri Dec 08 2017 09:18:28 GMT-0800 (Pacific Standard Time) ](false) 9:20:00 AM
For 1Hr - Invalidated before 7minutes
[ Fri Dec 08 2017 11:07:01 GMT-0800 (Pacific Standard Time) ](true) 11:56:41 AM
[ Fri Dec 08 2017 11:07:01 GMT-0800 (Pacific Standard Time) ](true) 11:56:43 AM
[ Fri Dec 08 2017 11:07:01 GMT-0800 (Pacific Standard Time) ](false) 12:00:37 PM
What is the appropriate way to validate within the above window?
From the readme of speakeasy it looks like your token parameters are wrong:
var token = speakeasy.totp({
secret: secret.base32,
encoding: 'base32',
time: 1453667708 // You have this as 'step' not 'time'
});