I have a Django application running on an embedded device that runs a Linux image. Forgive me for not having the specifics of versions and builds, I am not at work. Gunicorn is used as a web server. My web page is available at a static IP of https://192.168.1.40:81
As part of the backend for an Ajax Post submission,
My python connects to a loclahost (127.0.0.1) tcp listener that was coded in C and runs on the Linux. It listens on localhost port 5456. My connection to it is on the same localhost ip and port.
When I use python to open a shell and import my Django env, sockets, my “client” code, etc, I can execute my scrips manually and successfully connect to the listener and send packets of data to it. Works great.
However, when I have the http response python execute the same tcp code I used in manual testing, when a user submits data from the web page, I get a connection refused error back from my connection attempt.
Anyone have any ideas on what I could check? I tested my python manually in a shell and it’s happy as can be.
Is this a permission issue or a Django limitation or setting?