crizstian / cinema-microservice

Example of a cinema microservice
1.75k stars 656 forks source link

Docker errors #10

Open jbonnett92 opened 6 years ago

jbonnett92 commented 6 years ago

Hi, When I run kraken.sh I get the following errors: docker: Error response from daemon: error while creating mount source path '/Users/Cramirez/.docker/machine/machines/manager1': mkdir /Users/Cramirez: protocol error.

docker: Error response from daemon: error while creating mount source path '/Users/Cramirez/.docker/machine/machines/worker1': mkdir /Users/Cramirez: protocol error.

docker: Error response from daemon: error while creating mount source path '/Users/Cramirez/.docker/machine/machines/worker2': mkdir /Users/Cramirez: protocol error.

Error: No such container: api-gateway-service

Error: No such image: api-gateway-service

I can open Rancher although I can't see any workers. Any ideas? Sorry is this is really simple I am new to Microservices and Docker.

Thanks, Jamie

mmestani commented 6 years ago

@jbonnett92 - You should change the user folder path to match your username in api-gateway/start-service.sh in line number 19..

jbonnett92 commented 6 years ago

@mmestani That fixed the protocol error although none of the others.

jbonnett92 commented 6 years ago

Please help, I posted this just over 2 months ago. I have a feeling it's due to a depreciated dependency.

jbonnett92 commented 6 years ago

Ok so far I have noticed that the API-Gateway wasn't running due to not having a certificate. So I generated one and started the services again. Some services are still failing so I will continue to try and get it up and running.

An error has occured fetching schedules by movie, err: MongoError: The 'cursor' option is required, except for aggregate with the explain argument

alpz13 commented 6 years ago

Hello Jamie,

Sorry for the late response, please check the configuration of your servers, different services have different ip addresses, to simulate different endpoints or computers to have a decentralized application. For example if you run an application trough 192.168.99.100 make notice to check that configuration. I haven’t check it but, most likely its because it cannot communicate to the different endpoints due configuration. Basically the addresses aren’t the right ones. I would suggest to check the addresses of the different services you have so far. And provide yours according to your preference. If you are testing it like a local project in a home computer or something like that just make sure the ips are pingable between your network.

Sorry I don’t have a better example, I am almost 100% sure this might be your issue.

From: Jamie Bonnett notifications@github.com Sent: sábado, 28 de abril de 2018 01:17 a.m. To: Crizstian/cinema-microservice cinema-microservice@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [Crizstian/cinema-microservice] Docker errors (#10)

Ok so far I have notices that the API-Gateway wasn't running due to not having a certificate. So I generated one and started the services again. Some services are still failing so I will continue to try and get it up and running.

[https://camo.githubusercontent.com/2c498297531c50581152db0fa9da8d22fe0ef081/68747470733a2f2f692e696d6775722e636f6d2f33556e475333692e706e67]https://camo.githubusercontent.com/2c498297531c50581152db0fa9da8d22fe0ef081/68747470733a2f2f692e696d6775722e636f6d2f33556e475333692e706e67

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Crizstian/cinema-microservice/issues/10#issuecomment-385144524, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHM8Dz-gvNlg7vtdhqDvDwl1op4z-6mrks5ttAlVgaJpZM4SGVP3.

jbonnett92 commented 6 years ago

Thank you for the reply. I'm sure that this is not the problem, as you can see in the test screenshot I get an error 500 which means there is a connection. Not just that I have checked the logs and have an error in the repository.js saying that the cursor is missing in one of the database calls.

Unfortunately every time I edit code I can't see anything reflected on runtime.

Although I will double check this.

Update: As you can see manager1 can talk to worker1 and worker2

Also I can access the service no matter the IP and get the same result

Same goes for the movies service seen as it is running on manager1 e.g. the services connect both ways manger1 to worker1 and worker1 to manager1

jbonnett92 commented 6 years ago

I also found that one of the tests in api-gateway was incorrect for server.js as server.start() expects the container object rather than a options object, the container object using a function to retrieve values instead.

So I fixed api-gateway/server/server.spec.js like so:

/* eslint-env mocha */
const server = require('./server')

describe('Server', () => {
  it('should require a port to start', () => {
    return server.start({
      resolve: (key) => {
        return key == 'routes' ? {} : null
      }
    }).should.be.rejectedWith(/port/)
  })

  it('should require a repository to start', () => {
    return server.start({
      resolve: (key) => {
        return key == 'serverSettings' ? {} : null
      }
    }).should.be.rejectedWith(/routes/)
  })
})

I know it's the same case with the booking-service, notification-service and payment-service, but not the movies-service, cinema-catalog-service.

KrGyan commented 4 years ago

Ok so far I have noticed that the API-Gateway wasn't running due to not having a certificate

Did you generate the certificates in manager1 or under api-service ? Please help me to fix this issue.