ranajit (13) [Avatar] Offline
#1
I have taken code via git clone from https://github.com/microservice-patterns/ftgo-application


Version of docker is Docker version 18.06.0-ce, build 0ffa825
Version of docker-compose is docker-compose version 1.18.0, build 8dd22a9
java version - openjdk version "1.8.0_171"
AWS cli version - aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-1061-aws botocore/1.4.70


DOCKER_HOST_IP set to the public ip of the EC2 instance ( Ubuntu 16.04)

following is set in set-env.sh
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=




running build-and-run.sh went fine and started waiting
Status: Downloaded newer image for mysql:5.7.13
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '35.173.228.124' (111)
sleeping for mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '35.173.228.124' (111)
sleeping for mysql

mysql: [Warning] Using a password on the command line interface can be insecure.
preparing dynamodblocal table data




Everything ran fine till i hit

preparing dynamodblocal table data


I have run this multiple times now. I have also started the new instance to make sure things are not due to one machine.
Did this code ran for anybody ? What is different in your environment ?
ranajit (13) [Avatar] Offline
#2
ranajit wrote:I have taken code via git clone from https://github.com/microservice-patterns/ftgo-application


Version of docker is Docker version 18.06.0-ce, build 0ffa825
Version of docker-compose is docker-compose version 1.18.0, build 8dd22a9
java version - openjdk version "1.8.0_171"
AWS cli version - aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-1061-aws botocore/1.4.70


DOCKER_HOST_IP set to the public ip of the EC2 instance ( Ubuntu 16.04)

following is set in set-env.sh
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=




running build-and-run.sh went fine and started waiting at the point as below

Status: Downloaded newer image for mysql:5.7.13
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '35.173.228.124' (111)
sleeping for mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '35.173.228.124' (111)
sleeping for mysql

mysql: [Warning] Using a password on the command line interface can be insecure.
preparing dynamodblocal table data




Everything ran fine till i hit

preparing dynamodblocal table data


I have run this multiple times now. I have also started the new instance to make sure things are not due to one machine.
Did this code ran for anybody ? What is different in your environment ?
ceracm (96) [Avatar] Offline
#3
Hi,

Sorry that you encountered a problem.

You didn't show the error message but I am guessing that is the problem.
But it looks like you changed the values of

export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

Since you are running DynamoDB locally, set-env.sh sets them to dummy values. They cannot be blank.
ranajit (13) [Avatar] Offline
#4
actually aws credentials are not blank but set with my values which i cannot share in public forum
ceracm (96) [Avatar] Offline
#5
Ok.
As mentioned previously, just use dummy values rather than real credentials.

What is the actual error that you get from "preparing dynamodblocal table data"?
ranajit (13) [Avatar] Offline
#6
It just keeps waiting in the location and does not move forward . I have waited 20-30 mins multiple times and lost interest after that. It is easy to replicate as I am consistently getting error. I am little curious why did we need DynamoDB for sample application when we have small sample application. may be Derby DB or H2 will be better choice.
ranajit (13) [Avatar] Offline
#7
Give me the environment which this code ran.

Which OS , Docker , docker compose , java , pip and awscli version .
In case i miss any of the component please add those versions .

I will use EC2 so I think any setup should be fine.

Thanks
ceracm (96) [Avatar] Offline
#8
ranajit wrote:I am little curious why did we need DynamoDB for sample application when we have small sample application. may be Derby DB or H2 will be better choice.


DynamoDB is used in chapter 7 as an example of a NoSQL DB to implement a CQRS view.

ceracm (96) [Avatar] Offline
#9
ranajit wrote:Give me the environment which this code ran.

Which OS , Docker , docker compose , java , pip and awscli version .
In case i miss any of the component please add those versions .

I will use EC2 so I think any setup should be fine.

Thanks


I run it on Mac OSX and on the Linux-based CI server.

Not sure why it would hang. At that stage, it is running ./dynamodblocal-init/create-dynamodb-tables.sh with invokes the AWS CLI.

I'd do two things.
First, add "echo Initializing DynamoDB at endpoint ${AWS_DYNAMODB_ENDPOINT_URL}" to the above script just to do a sanity check.

Second, verify that the dynamodblocal container is running:

docker ps

View the logs

docker logs ftgo-application_dynamodblocal_1