Connection refused by GRA docker container on Amazon

I installed and got GRA working on a virtual machine running Ubuntu 18.04 on my laptop using the Docker image. I am now trying to repeat the success on an Amazon server running Ubuntu 18.04. I have installed the SQL Server Express on the server and built the SRP database just as I did on my laptop using the script supplied on the GRA site. I set an identical directory structure for /gra/share, owned by root with the same access rights as my laptop. I ran the docker command found on the website to start up mcld/gra:

docker run -d -p 80:80 --name gra --restart unless-stopped -v /gra/shared:/app/shared mcld/gra -

This created the additional directories in my /gra/shared directory.

I then tried to access the setup by running the text-based browser called links via
links http://localhost

I get “Connect refused”. It succeeds on my laptop’s installation.
I get the same response when trying to connect via a browser on my laptop to the Amazon sever. If I run Apache on the server I can connect.

This looks to me like a refusal by the web server in the GRA container rather than indicating an inability to login to SQL server, which works manually via sqlcmd. Here is my appsettings.json file, just in case I’m wrong:
"ConnectionStrings": { "SqlServer": "Server=localhost/SQLEXPRESS;Database=SRP;Trusted_Connection=True; user id=srp_owner;password=*********; MultipleActiveResultSets=true" }, "GraInitialAuthCode": "********" }
which is the same file I have on my laptop.

There is no indication of an error in the log file found in /gra/shared/logs.

Perhaps the issue is related to the output I am receiving running docker ps.
For the gra my status never changes to UP, it remains at

`Restarting (139)  N seconds ago`  

where N changes each time the command is run.

Perhaps that means it is not completing a restart after I stop it. That might explain a refused connection?

It may be the case that my server from Amazon has too little memory (2GB). Does anyone know if that is too little? It runs on my laptop in 4GB and it looks like GRA fits in less than 300MB. Bumping up to a 4GB Amazon server costs $120 more per year and I would like to save the library that money if possible.

Any suggestions on where to look would be most appreciated.

Thanks in advance

+I solved the problem mentioned in the post above and am describing the cause, effect and solution here in case anyone else encounters the same situation.

It turns out that my appsetting.json file was missing an opening brace This caused the following loop:

  1. The docker for GRA was run with the option of restarting if it failed (but was not explicitly stopped)
  2. It tried to read the appsetting.json file.
  3. A parser error was encountered
  4. The container died
  5. The configuration I used caused it to restart because it was not explicitly stopped
    … = Infinite loop

What I did not know was that there is a `docker logs’ command which informed me that there was a parse error in the appsettings.json file. That showed me where to look.

Thanks to those who read this post!

Larry Morell