An Unusual api calls every 5 mins - node.js

`2022-07-27T14:44:04.939800+00:00 heroku[router]: at=info method=POST path="/sales/test/_vti_bin/publishedlinksservice.asmx" host=......herokuapp.com request_id=f3b1c597-25bc-469b-af21-94222743728f fwd="154.160.25.213" dyno=web.1 connect=0ms service=1ms status=404 bytes=462 protocol=https`
I have hosted a node js application on heroku, if I check the logs, there is always a request every 5 to 30 mins to /sales/test/_vti_bin/publishedlinksservice.asmx Does anyone have an idea of what is going on publishedlinksservice.asmx ?

By seeing the log, it actually looks more like an error code.
Analyzing it further, it may be an internal Heroku error as a file on the sales/test/_vti_bin directory was not found as it returns a status=404 on the log.
I do not recognize where this file comes from, but it is a good idea to contact support if you do not recognize this file as well and the issue persists.

Related

Heroku double '/' problem - node js backend, 404 error

I have deployed my backend on heroku and I have a test get request's response on /
app.get('/', (req, res) => {
res.send("Hello, World. The app is running!");
});
On hitting the / end point that is https://ayush-portfolio-backend.herokuapp.com/, I get the expected GET output.
But, when from the frontend react app, I hit any POST endpoint, e.g.:-
// index.js
app.use('api/portfolios/', (require('./routes/portfolio')));
// portfolio route
router.post('/getportfolios', async (req, res) => {...});
I am unable to get any response on the frontend.
As suggested by heroku docs, when I do heroku logs
I get the following error:-
2022-09-21T07:57:41.743176+00:00 heroku[router]: at=info method=OPTIONS path="//api/portfolios/getportfolios" host=ayush-portfolio-backend.herokuapp.com request_id=0aff16a8-8aee-499e-a69e-4bdf8d583e6d fwd="103.164.24.154" dyno=web.1 connect=0ms service=5ms status=204 bytes=312 protocol=https2022-09-21T07:57:41.808753+00:00 heroku[router]: at=info method=OPTIONS path="//api/portfolios/getportfolios" host=ayush-portfolio-backend.herokuapp.com request_id=3c1974f2-522c-47b8-92d8-2f201bd0e2ab fwd="103.164.24.154" dyno=web.1 connect=0ms service=1ms status=204 bytes=312 protocol=https2022-09-21T07:57:42.054955+00:00 heroku[router]: at=info method=POST path="//api/portfolios/getportfolios" host=ayush-portfolio-backend.herokuapp.com request_id=6092ee53-d98d-4fa0-9fff-abd46554de56 fwd="103.164.24.154" dyno=web.1 connect=0ms service=10ms status=404 bytes=445 protocol=https
2022-09-21T07:57:42.172808+00:00 heroku[router]: at=info method=POST path="//api/portfolios/getportfolios" host=ayush-portfolio-backend.herokuapp.com request_id=cbe7b873-b4f5-4eb6-a80f-12fd1018029a fwd="103.164.24.154" dyno=web.1 connect=0ms service=2ms status=404 bytes=445 protocol=https
I don't know what is causing the following error. The app works perfectly fine on the local environment, but don't know why the problem has occured.
I am a beginner for heroku and I don't know much about it, also i searched the google and stackoverflow for the error but did not find any relevant solution to the problem.
I just assume that the error can be because of some double / // creating in the path as in the error it is shown e.g. path='//api/portfolios/getportfolios'. So, I also tried removing the / from frontend and everywhere else trying to make it sinbgle / but this didn't solve the problem.
Can someone please guide me to find the solution of the above problem.
Thank you!
////////////////EDIT////////////////
portfolio route file: github
try
// index.js
const portfolioRoutes = require('./routes/portfolio');
app.use('/api/portfolios', portfolioRoutes);
// portfolio route
router.post('/getportfolios', async (req, res) => {...});

How to fix not found error with heroku deployment / no such file or directory

First, sorry for my poor English.
The problem is this.
Whenever I try to open heroku I get this screen:
Not Found
Whenever I try to heroku logs I get this screen:
2022-05-20T09:26:03.000000+00:00 app[api]: Build succeeded
...
2022-05-20T09:26:08.430002+00:00 app[web.1]: MongoDB database connection established successfully
...
2022-05-20T09:32:21.525922+00:00 heroku[router]: at=info method=GET path="/" host=protected-wildwood-11173.herokuapp.com request_id=f33e9e00-7573-4fa5-9ebf-7e9c54d04532 fwd="121.134.103.64" dyno=web.1 connect=0ms service=2ms status=404 bytes=412 protocol=https
2022-05-20T09:32:21.526199+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html'
And this is my codes
package.json
folder path
server.js
In my expectation
Heroku cannot cognize 'build'
wrong path ( server.js - deployment )
I haven't been able to do it for 7 days.
Please help me
crycrycry...

Heroku application stopped serving db2 connection

I have my app hosted on heroku for nearly 1 year, and in the past 24 hours, it stopped working. I get this in my logs:
2021-11-08T18:15:06.475815+00:00 app[web.1]: [Error: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "selectForConnectTimeout". Protocol specific error code(s): "115", "*", "*". SQLSTATE=08001
2021-11-08T18:15:06.475827+00:00 app[web.1]: ] {
2021-11-08T18:15:06.475828+00:00 app[web.1]: error: '[node-ibm_db] SQL_ERROR',
2021-11-08T18:15:06.475829+00:00 app[web.1]: sqlcode: -30081,
2021-11-08T18:15:06.475829+00:00 app[web.1]: state: '08001'
2021-11-08T18:15:06.475830+00:00 app[web.1]: }
2021-11-08T18:15:33.386490+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/login" host=www.mysite.ca request_id=3d627300-28d2-48af-a86e-60bdb950298a fwd="99.249.30.56" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
It seems to not like whatever is going on with db2. I can access my database no problem through my local machine, and see everything with in my db tables. I also have this directly from my heroku dashboard.
i am not able to figure out what the issue is. does anyone have any ideas?
Thanks to everyone for their answers. I did some more digging around, and turns out what solved it was reinstalling the db2 driver locally, and pushing it to heroku. Something must have changed that required an update to the db2 driver to connect with the heroku sevrer.

Getting Error when refreshing my react app

My app is working fine until i try to referesh the page. I made the build version of the frontend and then pasted all the contents in the public folder of node js backend. Everything is working just fine until i do a refresh.
I find a similar problem : Heroku Deployed App, Page Refresh error or Redirecting error
The only difference is i am getting this error: Failed to load resource: the server responded with a status of 404 (Not Found).
I did heroku logs and found this:
2021-01-29T20:31:35.136038+00:00 app[web.1]: GET /posts/myNewsFeed 304
377.308 ms - - 2021-01-29T20:31:35.137763+00:00 heroku[router]: at=info method=GET path="/posts/myNewsFeed"
host=insta-clone-01.herokuapp.com
request_id=d0dfee79-74f4-43c2-9ce5-7df121136872 fwd="1.38.45.193"
dyno=web.1 connect=0ms service=383ms status=304 bytes=181
protocol=https
2021-01-29T20:31:37.519726+00:00 heroku[router]: at=info method=GET
path="/home" host=insta-clone-01.herokuapp.com
request_id=d0a7784f-bcbe-41ed-88de-43e71cd364c7 fwd="1.38.45.193"
dyno=web.1 connect=0ms service=3ms status=404 bytes=400 protocol=https
2021-01-29T20:31:37.520005+00:00 app[web.1]: GET /home 404 1.326 ms -
160
These are the logs for the same page but the first is when i normally get to the page and the second one is when i refresh the page.
what i can say from this is when i am normally trying to get to a page the request is happening to the /posts/myNewsFeed which is my node api endpoint but when i am refreshing the same page the request is happening to /home which is my route for the page ,not the node api endpoint and that's why i am getting the error.
You can see the project here https://github.com/Aditya-shrivastav/InstagramClone
Anyone who can give a solution for this?

Heroku nodejs can not post data

I have a simple nodejs api, which connected to mongodb on mlab.
On local I can use GET, POST methods. But after I deployed to Heroku:
I only GET data.
POST method returns 400 bad request. And if I use heroku logs -t I can't see log about post method.
I searched related keywords: heroku -nodejs- post method 400 bad request, they don't work with my case.
This is my log after I use postman send GET and POST requests.
2020-04-01T16:58:02.831314+00:00 app[web.1]: tiny wiz running // my console.log
2020-04-01T16:58:03.131550+00:00 heroku[web.1]: State changed from starting to up
2020-04-01T16:58:03.259355+00:00 app[web.1]: (node:23) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
2020-04-01T16:58:27.099916+00:00 heroku[router]: at=info method=GET path="/" host=MYAPP_URL request_id=a5f384ad-b857-4356-a4de-f8148cfd2e16 fwd="publicIP" dyno=web.1 connect=1ms service=100ms status=200 bytes=1016 protocol=https
2020-04-01T16:58:27.094337+00:00 app[web.1]: GET METHOD HERE!!! // my console.log
▸ Log stream timed out. Please try again.
As you can see, It has no log about POST method.
Pls let's me know if you has any infomation about my environment.
Thank in advance!

Resources