Could not get any response from server - amazon-web-services

I can´t connect to my server which I built at the AWS instance using the client code I wrote in Postman. My server is running. I can send messages from my postman app to my friend´s server in another instance. Also they can send me messages from their client code to my server.It´s just I can´t connect to my instance. Where could be the problem? Again, my server is running fine and answers to other requests.
This is the client side code in Postman. What could be the problem here? Thank you!

Related

Flask - websocket doesn't work correctly in a real server

I've developed a WebApp with Flask, where different threads check a status and, if something changes they send a new json to the client. Then the client, with the javascript, can update the html page.
Running the app in my LAN, different clients connect and everything work correctly.
If I run the app on a real server (such as AWS, by using "flask run --host=0.0.0.0" ), the clients can connect and show the web page, but they don't receive the json sent by the socket of the webapp.
In the WebApp, a thread sends the new json by calling a function that uses:
socketio.emit('update', {'number': new_json_FE}, namespace='/test')
While the javascript receives this message (and does something) in this way:
socket.on('update', function(msg) { ....}
It is very strange that the clients connected in the LAN receive correctly all the json sent by the socket, while in the web not: they only receive the json when they connect to, and I have to upload the page (they don't receive the socket messages).
Can you help me?
Thank you very much!
I would advise against the use of threads like you have described for this situation.
Instead I would probably create a new program, StatusUpdater, that is always running and which is connected via socket to your Flask-SocketIO backend. When it finds a change in status it sends w/e signal or payload it needs to, through a socket, to the Flask-Socketio server. The SocketIO server upon receipt of this StatusUpdater payload can then send a broadcast to all connected clients notifying the client of the update.

Unable to link dialogflow webhook to ngrok tunnel

Have created a chatbot and I am trying to connect it to my local host using ngrok....the localjost is running via my computer and is showing active...however dialogflow webhook is not able to send any request to the ngrok portal...
I have tried multiple time to host a server via ngrok and pasted the link in webhook section in Dialogflow..but dialogflow diagnostic shows
Webhook call failed. Error: PERMISSION_DENIED.
fulfillment status ngrok cmd prompt ngrok server
Any help would be appreciated...not sure what I am missing....
Without seeing the actual configuration, there are a few things I would look at:
Make sure you're actually using the right ngrok URL from your console. Many times I was using an older URL in the Dialogflow configuration.
Make sure you're using the HTTPS URL.
Make sure your server is actually running on your computer, and that it is listening at the same port that ngrok is using on your computer.
Check the ngrok console to see if it is getting the request at all and what the response might be.
Go to http://localhost:4040/ which will give you details of each connection through ngrok.

Why after deploying django docker container, emails getting sending failed?

I was working on django and everthing was working fine on my local machine as well as on heroku.
But than i deodorize my django project and it was working fine locally till now. now i have depolyed this container on my dedicated server and than i came to know that my emails was failing after deployment.
Can anybody have idea why my dedicated server is not sending mails?
I am sending mails using smtp protocol.
Any help or suggestion will be highly appreciated.
Thanks.
I'm assuming you're connecting to your local SMTP server to send out those emails.
The problem is that your Django is trying to use localhost:25 to send out the emails and in your docker there's no SMTP server. Docker has it's own network, and you can see what are the interfaces available by executing
ifconfig
To solve your issue, you should tell django to use your host SMTP server (and not localhost). Moreover you should tell your local SMTP server to accept emails coming from the docker network.

Not able to connect Node.js/Socket.io Server from a Client using Websocket from a Unix System in a LAN

I have written a client application in C++ using websockets in Unix Environment trying to connect a Node.js/Socket.IO server running in a LAN connectivity. I found the server application is not responding at all. I tried a couple of other options from client side eventually getting no response from the server. Basically, i am trying to send a JSON object to the system running SocketIO server, but the client is not getting connected even if the server listens on to a Port.
Help, is really appreciated. Thank you.
Make sure following has been checked-
Server running and port is open (firewall) - Client is unable to connect the server
Url is correct - Client is unable to connect or url not exist
Listener code or receiving task is running - Client connected but when server send data to client, client didnot receive data
JSON format is correct and json data does not contain invalid character - client send data server but server did not received
Follow -
remove date if exists into msg for test purpose, use " to prepare JSON data, donot put / end of the url if not required. example-
1. Write url as ws://abc.com:8080/wsserver
2. JSON data as {"name":"myname","yourname":"indo","msg":"birthday"}

WWS server not responding over a network

I have been testing WCF and WWS services, both my own and the SortService by Mykolad Dudar.
First the WCF version is created, and then wsutil is used for the WWS version.
Both the WCF and WWS services are working fine if the server and client run on the same machine. However, the WWS server is not responding if the server and client are on different machines. The WCF version works fine.
The binding is wshttp and security is set to ’None’. No firewalls or anti virus programs running.
This is the error message I get on the client calling the WWS:
Error: There was no endpoint listening at http://10.100.81.218:8080/SortService
that could accept the message. This is often caused by an incorrect address or S
OAP action. See InnerException, if present, for more details.
System.Net.WebException: The remote server returned an error: (400) Bad Request.
The InnerException is empty.
I’m sure I’m missing something, can anyone please help me out?
Got it working. In case anyone else encounters the same problem, here is how:
Turns out that using ‘localhost’ in the web service url was the problem (on the server). Using the machine IP address instead, solved the problem.
Using ‘localhost’ for the WCF service worked fine, so there is a difference between WCF and WWS on this point.