ColdFusion SMS Gateway Instance problem - coldfusion

I am having a strange problem with my SMS Gateway. The SMPP connection to the external gateway is fine, and outgoing messages are never a problem.
The problem is to do with my incoming.cfc - the gateway instance points to "incoming.cfc" and that file is set up to send an auto reply to the incoming message and add some details to a database. Simple and it works as tested.
Every couple of days though the incoming messages stop getting added to the database, and the auto reply messages don't get generated. The log files indicate that (although no changes have been made to either the incoming.cfc file or any other files or configuration settings) we have somehow "switched back" to an earlier version of the incoming.cfc file - I can tell this because the wording of the return message in the logs matches this earlier version.
I have read Adobe documentation that says the gateway will use whatever incoming.cfc it is pointed to and you don't need to refresh the event gateway instance if you change the cfc - even though the old cfc has been deleted off the server entirely and the new one not changed - when the problem occurs (every other day) an instance refresh appears to fix it.
Has anyone seen anything like this?
Thanks for listening!
Simon

Try renaming your cfc from incoming.cfc to incoming2.cfc

Related

Is there a better way to see data change posted on index.html webserver (NGINX) besides refreshing the page every second?

I have made a flutter app which gives notifications whenever I get an error on the machine running embedded. The way I achieved this is by posting the error on the hosted webserver's page every time I have an error, and then the moment the error is resolved, removing it from the page. Meanwhile, the flutter app connects to this webserver page via the ip address using http request and then refreshes it every second to see if there is any data. If there is, then it sends a notfication on the phone, and starts comparing the data every second to see if any change happens. If the data is changed, another notification is sent else it keeps on refreshing the page and reading it.
The program I used to write the error to this webserver is through C++ code which opens the index.html file, performs write operation and then closes the file every time a new error occurs. The moment, the error is resolved, the file is again opened and the record is deleted making the index.html blank and ready to receive another error.
I want to know if there is any better way to achieve this so that the page only refreshes on new data arrival. As I have been told, refreshing the webpage every second can cause extra pressure on the embedded processor it has been hosted on. Any leads will be appreciated.
Thanks for your time ^^.

Can't see my AWS EventBridge rules because signature expired

I have multiple EventBridge cron events in different regions, that I use only to trigger/run Lambda functions in those regions. Today I can't see any of them in the EventBridge console. In every region, if I open the Event buses tab, an error notification appears like Signature expired: 20220611........ is now earlier than 20220611........ (20220611........ - 5 min.), and if I open the Rules tab, the rules are simply not there anymore, and the notification is Failed to get event buses with error: InvalidSignatureException: Signature expired: 20220611........ is now earlier than 20220611........ (20220611........ - 5 min.).
Note: I have hidden the second half of the "signatures" with ........ because maybe this is something that is supposed to be private. I don't actually know.
I don't understand how signatures work in AWS, what they do, or where they come from. Goggle didn't help much. I found one question about this here on stack overflow: Signature expired: is now earlier than error : InvalidSignatureException but it talks about things I don't understand and doesn't help me figure out what I need to do. But it's really important that those Lambda functions continue to get triggered and run when they need to, without interruptions. Please help me make this go away.
I figured it out. So when you open a website with a browser, some websites can apparently detect the current time set in your PC. So if you change the timezone in your PC, that can cause errors in some cases like this one. The error disappeared, when I opened the AWS website in my phone, or a different PC which had the correct time zone.

How to change failure message for Alexa?

I want to change the default failure message in Alexa, Sorry, I'm having trouble accessing your {} skill right now.
You cannot change that prompt but you can code to avoid that as much as possible. The error happens when Alexa is not able to get a valid response from your skill endpoint. There can be multiple reasons to that as mentioned here
1. Your endpoint is giving an invalid response
This can be due to the errors/exceptions happening in your endpoint code. You can make sure that error/exceptions don't occur and if they occur, thre is code to catch them and provide a valid response back to Alexa, with an error message of your choice.
2. Your endpoint availability
Make sure that your endpoints are available all the time if you have configured them as an endpoint. This is pretty much guaranteed if you are using Lambda endpoints. But if you are your own hosted web service endpoint, then you must put in all the measures to keep it available for Alexa to communicate with it.
3. Your endpoint response time
Make sure that your endpoint gives back the response within the time period that Alexa expects it to get(guess its 10 seconds). Also make sure if you are using Lambda functions, you have configured them with reasonable execution time to avoid timeout errors.
If you cover the exception/error/availability scenarios well then you can avoid the default error message as much as possible.

Amazon SNS CreatePlatformApplication returns error when reusing platform applications

I had code that was working that would create a new platform application for every message that went out. I thought that was wasteful so I tried to change the code to use list_platform_applications to get available applications and reuse the one that has the proper name (part of the PlatformApplicationArn).
This will work for several messages in a row when suddenly I'll get this error from CreatePlatformApplication:
{"Error":{"Code":"InvalidParameter","Message":"Invalid parameter: This
endpoint is already registered with a different
token.","Type":"Sender"},"RequestId":"06bd3443-598e-5c06-9f5c-7f84349ea067"}
That doesn't even make sense. I'm creating an endpoint. I didn't pass one in. Is it really complaining about the endpoint it's returning.
According to the Amazon documentation:
"The CreatePlatformEndpoint action is idempotent, so if the requester
already owns an endpoint with the same device token and attributes,
that endpoint's ARN is returned without creating a new endpoint."
So it seems to me, if there's an appropriate one it will be returned. Otherwise, create a brand new fresh one.
Am I missing something?
Oh darn. I think I found the reason for this behavior. After facing this issue, I made sure that each token was only uploaded once to AWS SNS. When testing this, I realized that nevertheless I ended up with multiple endpoints with the same token - huh???
It turned out that these duplicated tokens resulted from outdated tokens being uploaded to AWS SNS. After creating an endpoint using an outdated token, SNS would automagically revive the endpoint by updating it with the current device token (which afaik is delivered back from GCM as a canonical ID once you try to send push messages to outdated tokens).
So e.g. uploading these (made-up) tokens and custom data
APA9...YFDw, {original_token: APA9...YFDw}
APA9...XaSd, {original_token: APA9...XaSd} <-- Assume this token is outdated
APA9...sVQa, {original_token: APA9...sVQa}
might result in something like this - i.e. different endpoints with identical tokens:
APA9...YFDw, {original_token: APA9...YFDw}, arn:aws:sns:eu-west-1:4711:endpoint/GCM/myapp/daf64...5c204
APA9...YFDw, {original_token: APA9...XaSd}, arn:aws:sns:eu-west-1:4711:endpoint/GCM/myapp/a980f...e3c82 <-- Duplicate token!
APA9...sVQa, {original_token: APA9...sVQa}, arn:aws:sns:eu-west-1:4711:endpoint/GCM/myapp/14777...7d9ff
This scenario in turn seems to lead to above error on subsequent attempts to create endpoints using outdated tokens. On the hand, it seems correct that subsequent requests fail. On the other hand, intuitively I have the gut-feeling that the duplication of tokens that is taking place seems wrong, or at least difficult to handle. Maybe once SNS discovers that a token is outdated and needs to be changed, it could first check if there is already another endpoint existent with the same token...
I will research on this a bit more and see if I can find a way to handle this properly.
Cheers
Had the same issue, with the device reporting one token (outdated according to GCM) and the SNS retrieving/storing another.
We solved it by clearing the app cache on the device and reopening the app (which in our case, re-registered the device on the gcm service), generating the same token (not outdated) that SNS was attempting to push to.

CFMail Issues since Upgrading to CF10

Ever since upgrading to CF10, we've been having some odd issues with our automated ColdFusion emails. The processes always functioned properly in the past, but lately we've been getting some very out of the ordinary issues which I'll describe further below.
We discover the problem usually from contacts who usually receive these emails on a daily basis with or without attachments. We'll go to the CFMAIL directory for the corresponding server and find a slew of emails stuck in the 'Undelivr' emails. In some cases, we can just move these emails to the Spool folder and they process fine, but in most cases they result in one of the two errors below:
Error 1: In an email which normally does not contain a body and contains an attachment, the follow error is what we found in the logs:
"Error","scheduler-1","01/15/13","14:09:56",,"javax.mail.MessagingExce ption: missing body for message"
javax.mail.MessagingException: missing body for message
at coldfusion.mail.MailImpl.createMessage(MailImpl.java:696)
at coldfusion.mail.MailSpooler.deliver(MailSpooler.java:1295)
at coldfusion.mail.MailSpooler.sendMail(MailSpooler.java:1197)
at coldfusion.mail.MailSpooler.deliverFast(MailSpooler.java:1657)
at coldfusion.mail.MailSpooler.run(MailSpooler.java:1567)
at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:211)
at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
Placing these emails that have always been sent out this way in the past without an attachment in the spool directory causes it to go right back in the 'Undelivr' folder and resulting in the same error. We ended up having to modify the email file and add random content in the body message, place it back in the spool directory, and it went through. - Mind boggling.
Error 2:
"Error","scheduler-2","02/04/13","09:08:17",,"javax.mail.MessagingExce ption: Exception reading response; nested exception is: java.net.SocketException: Connection reset"
Both errors occur randomly and we have not been able to find out what causes them randomly from time to time. All other emails go through fine, but certain emails will never go out and end up in the 'Undelivr' folder.
We are running them on Windows Server 2008 64bit.
I was facing second error connection reset couple of week ago but that was in CF9 and with SSL only. Here is blog post if that help
http://www.isummation.com/blog/getting-javaxmailmessagingexception-could-not-connect-to-smtp-host-xxxxxxx-port-465-response-1-error-in-coldfusion/