Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cann't run container successfully #1

Open
tsq opened this issue May 6, 2017 · 1 comment
Open

cann't run container successfully #1

tsq opened this issue May 6, 2017 · 1 comment

Comments

@tsq
Copy link

tsq commented May 6, 2017

Hi, cjus. You article about Deploying Node.js Microservices to AWS using Docker is so nice.
But, I cann't run hello-service container in my mac. I find the docker log. It's

> hello-service@0.0.1 start /usr/src/app
> node hello-service.js

Redis reconnection attempt 2 of 5...
Redis reconnection attempt 3 of 5...
Redis reconnection attempt 4 of 5...
Redis reconnection attempt 5 of 5...
ERROR
{ event: 'error', message: undefined }
ERROR
{ event: 'error',
  message: 'Error: Max reconnection attempts reached. Check connection to Redis.' }

Actually, I have a redis server in my local.

Here is my run command:

docker run -d -p 8080:8080 \
   --add-host redis:192.168.0.104 \
   --name hello-service \
   tsq/hello-service:0.0.1

And here is my config.json in hello-service/config

{
  "environment": "development",
  "hydra": {
    "serviceName": "hello-service",
    "serviceIP": "",
    "servicePort": 8080,
    "serviceType": "",
    "serviceDescription": "Says hello",
    "plugins": {
      "logger": {
        "logRequests": true,
        "elasticsearch": {
          "host": "localhost",
          "port": 9200,
          "index": "hydra"
        }

      }
    },
    "redis": {
      "url": "redis",
      "port": 6379,
      "db": 15
    }
  }
}

Can you help me? Thank you !

@peterlavey
Copy link

peterlavey commented Dec 7, 2018

First you need to install redis and then start the service:

(OSX)

brew install redis
brew services start redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants