Ember Fastboot is not working with the post request - ember.js

while Accessing website in browser , i am seeing the below error..
Api is working in the browser as well as in postman but Ember fastboot is not working ... Any help should be really helpful.
FetchError: request to https://test.news.bor.doi.test/api/?format=json&type=footer&type=footer-menu failed, reason: getaddrinfo ENOTFOUND test.news.bor.doi.test
at ClientRequest. (/data/webs/newsdev/frontend/node_modules/node-fetch/lib/index.js:1491:11)
at ClientRequest.emit (node:events:527:28)
at TLSSocket.socketErrorListener (node:_http_client:454:9)
at TLSSocket.emit (node:events:527:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Once i had the same problem , what causing it for me was the dns server is set to localhost , so my server was not resolving any domain name.
check /etc/resolv.conf if it is nameserver localhost change it to nameserver 8.8.8.8

Related

Browser error during django + SSL connection with local server

I have a problem during adding facebook login button to my website at localhost.
I've already add mysite.com to hosts file and installed django-extensions, werkzeug, pyOpenSSL. By running command python manage.py runserver_plus --cert-file cert.crt my own-made sertificate was created. I imported this certificate to Trusted Chrome sertificates but safe connection doesn't establish. When i pass https://example.com:8000/account/login/ I hit an error NET::ERR_CERT_COMMON_NAME_INVALID,
Failed to confirm that this is the server example.com. Its safety certificate refers to *. The server may be configured incorrectly or someone is trying to intercept your data.
Please help me to solve this.

This site can't provide a secure connection ERR_SLL_PROTOCOL ERROR

I have a google appengine project running in localhost. Everything works fine until i go to the 'login' page. When i go there i get the following error:
This site can’t provide a secure connection 127.0.0.1 sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
the appengine command i use to run the project is dev_appserver.py" --host 127.0.0.1 . This is run pycharm. This only occurs in the 'login' endpoint and no other endpoint.
The console error i get is:
default: "GET /signin HTTP/1.1" 301 -
to connect over HTTPS you need a valid SSL certificate on your server here is you local server as I understand from the message. you can get a certificate for your local server but I don't think it's worth the trouble while working locally. On the other hand when you deploy to Google App Engine, you get SSL certificate automatically and it's managed by Google, that's why your code works without any problem in the deployment.

Can't connect to Flask-Socketio via wss but works via ws

I have built a Flask-Socketio server application which works as expected when I connect to it using a javascript client via ws, but fails to connect via wss, both on localhost and when running on my Digital Ocean server. With wss, I get this error in the console (client running on Heroku):
index.js:14 WebSocket connection to 'wss://[IP_ADDRESS]/socket.io/?
EIO=3&transport=websocket' failed: Error in connection establishment:
net::ERR_CONNECTION_REFUSED
When the client is running on localhost, it causes this error:
polling-xhr.js:265 GET https://localhost:5000/socket.io/?
EIO=3&transport=polling&t=MW6p0Aj net::ERR_SSL_PROTOCOL_ERROR
The flask server is running with
socketio.run(app, host='0.0.0.0', port=443) # production
or
socketio.run(app, host="localhost", port=5000) # localhost
At first I thought it could have been an issue with the Nginx configuration or server ports not being open, however the same issue occurs with the server running on Localhost, so now I'm suspecting an issue with my Flask-Socketio application
Turns out I didn't have SSL certificates configured. I followed the instructions in this guide to create a self-signed SSL certificate and configure Nginx to use it. Now works as expected.
There are lot of issues with Flask-Socketio. With Apache server it almost doesn't works.But you are using Nginx. Refer following link on github.
https://github.com/miguelgrinberg/Flask-SocketIO/issues/298#issuecomment-408682588

*10 upstream timed out (110: Connection timed out) while reading response header from upstream with uwsgi

I currently have a server setup with nginx and uwsgi with django
This error doesn't happen until I try to change my rds instance
my fully error message is
*10 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxx.xxx.xxx.xxx, request: "GET /load/ HTTP/1.1", upstream: "uwsgi://unix:/tmp/load.sock", host: "example.com", referrer: "https://example.com/"
I was using aws rds (postgres) which works perfectly fine. The only change I made is changing from regular postgres service to aurora postgres I didn't upgrade the db, from regular to aurora. I created a new aurora postgres. I got everything setup...changed host and everything in my django db setting. runserver locally works fine. It does connect to db with read and write. Works perfectly. But when I deploy to server, open up my domain. Anything ui related looks fine but db related, NO. Took awhile then of course the 504 gateway timeout. I went to checkout the nginx error log. That's the error message I found. Googled, tried a few settings other stackoverflow posts suggested such as addingsingle-interpreter = true into uwsgi.ini file. No luck.
Can someone please give me an idea where I should look into for this problem?
Thanks in advance.
try going to your rds instance, check its' security group setting. Happened to me once, too me a while to find out that the security group setting is the problem. I didn't recall setting up the security group but it restricted with local IP

Cloudfoundry's cf login yields a "connection refused" error message

I am experiencing issues with the latest bosh-lite virtual box machine. See here.
I have just downloaded the Vagrantfile and done a
vagrant up
Then a:
cf login -u admin -a 192.168.50.4 -p admin
But it give me a:
API endpoint: 192.168.50.4
FAILED
connection refused
Can anyone please help?
Get address of haproxy by logging to it (bosh ssh, then ifconfig). Use address of haproxy as api endpoint.