I believe I can help you.
127.0.0.1 is only equal to LOCALHOST on your machine or a machine setup that way. On Amazon EC2 you have a public, or possibly elastic ip, and then you have the PRIVATE IP. You need to use this private ip for setting things up under the hood, and when people hit your public address amazon maps it in the background.
//Example for SERVER:
I opened port 8080 in my EC2 security group, and then i connected to the console, via TERMINAL (I am on mac today).
navigate to where your chatscript BINARIES are and:
// TO START THE SERVER CORRECTLY
./LinuxChatScript64 interface=172.31.27.153 port=8080
Please note, 172.31.27.153 is a PRIVATE IP ADDRESS assigned to the same EC2 instance. You will see it at the top of your shell when connecting, and you can see it when viewing the EC2 instance properties on amazon.
//Example for CLIENT:
//A little more help:
If you wish to use the example front end files such as the /BETTER/ html setup, you must edit the files to use the above mentioned private ip of your own EC2 and the corresponding port if you deviated.
//To automate starting and keeping it running with CRONJOBS
//The following will try every minute to start.
//TO ADD THE FOLLOWING LINE execute: crontab -e (If it asks which editor I personall choose nano)
*/1 * * * * cd /var/www/html/ChatScript/BINARIES && ./LinuxChatScript64 interface=172.31.27.153 port=8080
Hope this helps,
Brian Hodge - Technical Director - Kadho Inc. / Kadho Sports