Why I get 404 error for some files when running the nodejs app on http server? - node.js

I get 404 error for some files when running the nodejs app on http server error message is like below
Error: Request failed with status code 405
at createError (createError.js:16)
at settle (settle.js:18)
And there was no error when running on localhost.

The error message reports an error 405, which means the web server refused your action. http://www.checkupdown.com/status/E405.html
ie: you sent a POST method but your server doesn't allow it.
Check your web server's configuration and fix it accordingly.

Related

Get error 503 on node js server on shared host

Get error 503 from post ajax request on node js express on shared host but work fine on local server
i try checking the url call on the ajax request

I can't execute a website using blazor webassembly published on IIS

I created a project with Blazor Webassembly using SignalR (VS 2019 - .Net Core 3.1).
When I run it from the development environment it works correctly, but when I publish it to IIS (the server project) and I try to run it, it shows me the following message:
Loading...
An unhandled error has occurred. Reload 🗙
The messages in the console are:
Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.css:1
Failed to load resource: the server responded with a status of 404 (Not Found)
blazor.webassembly.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
app.css:1
Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.css:1
Failed to load resource: the server responded with a status of 404 (Not Found)
app.css:1
I was having the same issue and the same resolution resolved it for me!
What I did was browse to the website where I hosted it, went into developer mode of the browser (F12), hovered over the error and looked at the path!
In my index.html file I had in the and just needed to remove the forward slash and it started working just fine!

Error during WebSocket handshake: Unexpected response code: 400 on https

I am getting below error when I installed the ssl certificate for my domain. So I have changed websocket URL begin with ws:// to wss:// but I am getting this error.
I am using Amazon Linux, docker with jenkins. Backend is in Node JS. Front is Angular JS (1).
Anyone can help us on that?

Unable to redirect the URL to another page in docker app

Summarize of my problem:
I have create a website using MERN stack and deployed to AWS using docker.
when I refresh the domain page i.e http://discussion.sramanujan.com/ ,it works fine.
When I directly try to access the discussion url http://discussion.sramanujan.com/discussion , I get "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"
Steps to repro the issue:
lauch the website http://discussion.sramanujan.com/
Refresh the browser [website should reload successfully]
Click on discussion button. [website url will change to http://discussion.sramanujan.com/discussion ]
Refresh the page.
Expected:
Page should load discussion page on refresh
Actual:
Got an error message as "Failed to load resource: the server responded with a status of 500 (Internal Server Error)".
Any idea as how to handle this issue?
More information:
1.host server port 80 is mapped to docker container port 3000.
2.Navigation through website is working fine.
/usr/src/api is my WORKDIR
Logs from server:(on refresh I get error 500)
you are also getting a 304 (Not modified) error on your website, try to enable javaScript, after that it should work

Angular 2 Routing with Amazon EC2 404 error

I am trying to get a deployment of a MEAN stack app using angular2 v1.0.0 beta.3 up and running. Everything is going well so far except this annoying routing issue that did NOT occur when I deployed to Heroku. However; this is my first experience deploying to ec2 using elastic beanstalk.
When I open up the route at the base route / the page loads as normal and I can use the app as if nothing is wrong. However, if I navigate to a subroute, in my case /client/issue/:id , the state loads, but if I reload the page I will get a 404 ERROR. In my server.js I have what I thought was a 404 catch app.get('*', loadIndex'), but this does not seem to be the case. I assume it is an issue with the way ec2 handles routing, but I am not sure.
EDIT
It might also be worth noting that I am only getting an error in my /var/log/nginx/error.log file and not the /var/log/nodejs/nodejs.log file.
From the error.log file:
2016/04/06 15:14:00 [error] 18952#0: *16 open() "/var/app/current/client/Issue/yes/57044092fe1924e77d9049ab" failed (2: No such file or directory), client: 172.31.4.202, server: , request: "GET /client/Issue/yes/57044092fe1924e77d9049ab HTTP/1.1",

Resources