I have Pusher integrated into my web app. It's a Java based app running on Windows server 2008. The Pusher Server library is the one available on their website.
I've been using Pusher on my development machine and staging machine with no problem. I only use public channels, and only 2 public channels (an admin channel and an "other user" channel. Everything works as expected when my application is deployed to dev or staging servers.
Errors start occurring when I push to production though. I continually get 401 errors, like Pusher isn't authenticating my credentials. This is despite the fact that the credentials between dev/staging/prod are exactly the same, and the code is unchanged.
Am I missing some setting? Firewall setting? Is Pusher caching some information I don't know about? I'm at a loss about where the problem could lie.
To prove the error is specifically on the production server only, I can log in as an "other user" against the production machine (loading the Pusher client code), then fire an event as an admin on my development machine (loading the Pusher server code) and it works. When I fire the same admin event from my production machine, that's when the 401 errors occur.
Server returned HTTP response code: 401 for URL: http://api.pusherapp.com/apps/....
Found this after digging around a while. My system time was off by an hour on the production server, which gave the error from Pusher, and explains why it worked fine on dev and staging but failed on production with exactly the same code.
Related
I am running the angular application in Microsoft Teams and deploying it on Azure.
But it's not running up as it is looking for the robots933456.txt route.
It wasn’t the case before today.
Please guide me on how to proceed further.
On running the app the logs shows:
The error was natively on my side nothing to do with the above but pretty much seen and raised by people so thought of sharing below:
After doing some research figured out I can safely ignore this message. /robots933456.txt is a dummy URL
the path that App Service uses to check if the container is capable of serving
requests. A 404 response simply indicates that the path doesn't exist, but
it lets App Service know that the container is healthy and ready to respond
to requests.
https://github.com/MicrosoftDocs/azure-docs/issues/32472
My site works fine locally. It even works fine with my backend using azure web services and front end using netlify but occasionally after several api calls (I'm not overloading the server because these api calls are done one by one) I get LOTS of errors that are all the same. 500 internal server error. I look at the logs and they give me some numbers 500 1013 109 329 2144 391
Reason for this could be
Network issue of your server
Server request time out
-Web app takes too long to respond for a request/response when connecting to any resource( database,different server) etc..
To resolve that , i would suggest you to to increase the idle timeout of your app.
in the app setting of your web app add SCM_COMMAND_IDLE_TIMEOUT = 3600
By default, Web Apps are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable ‘Always On’ to keep the app loaded all the time.
You may also check the diagnostic log stream to get more details on this issue and the blog post for Troubleshooting Azure App Service Apps Using Web Server Logs.
Hope it helps.
I've got a node js script (Express js framework). I have a problem with this server only on production - on developer machine everything is good.
On developer machine an on production this server is running in Docker container. Container if from the same image of course.
The problematic scenario:
Start server
Make a request:
2.1. upload file to server and save in on hard disc drive
2.2. send a POST request via curl to microservice. This request is send to micorservice the file from 2.1 point. It's POST request. We use node-libcurl library
2.3. After long time (few minutes) microservice returns a response.
2.4. This response is saved on server.
2.5. Print a template.
On developer machine this request works totally correctly: from point 2.1 to 2.5.
But on production machine this request works correctly do all points except 2.5. I know it works good on 2.1-2.4 because server logs this information.
Production is on https://www.linode.com/.
Have you any idea what's wrong?
EDIT:
I forgot to mention, but server on production returns "502 bad gateway" error randomly for the same file and microservice response. Sometimes this requests is ok
I dont know how you start the application within the container, but I would suggest you'll use forever (https://www.npmjs.com/package/forever) to make sure it does not go inactive.
I've had 502 errors because of that in other systems when there were no activity for a few minutes.
Hope this helps a little
I am working on a NodeJS application that uses Sails.JS, that requires a login to get to the dashboard of the application.
Originally I was receiving errors with websockets and used this solution to get past this issue.
Receiving error "connection to ws://localhost:1337/socket.io/1/websocket" was interrupted while the page was loading"
Now, I have another problem, where the application is xhr-polling and not connecting to anything, and the server timesout and never redirects to the dashboard. This behavior is not happening on some peeers computers, they are able to login successfully. I am trying to figure out why the xhr polling runs and does not redirect me to the dashboard after successful login. Why is this only happening on my machine and not theirs. Any advice would be greatly appreciated.Simply boggles my mind.
Thank You
I had an app deployed on Meteor's servers and it worked as expected.
Now, I've moved the app to a NodeJS platform, called Modulus, using their CLI tool. (App hosted at http://crazygain.com)
For some reason, the method calls - Meteor.call or Meteor.apply - are not executed. Looking at the network indicator in Chrome Dev Tools I saw that the request is never sent.
I tried sending requests directly from the console, and got the same result.
e.g. when I execute the following
Meteor.call("foo",function(){console.log("callback");});
on the new Modulus server I simply get undefined
However, when I run it on the old Meteor server I get the "callback" log as expected.
I'm quite puzzled and unsure what can cause such behaviour.
UPDATE:
meteor.status() returns
Object {status: "connected", connected: true, retryCount: 0}
This might be because the web socket connection isn't established. Meteor calls & subscriptions depend on the DDP protocol which have a separate connection to the server.
Have a look at Meteor.status() to see if you are connected & if not investigate your connection's web socket/long polling connection.
It might just be a connection issue. Your meteor call works for me with the site you have provided.
Have you followed the Meteor deployment guide on Modulus' website? You need to convert the app using demeteorizer.