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

Oders are not processed #2

Closed
tobiasheine opened this issue Aug 27, 2017 · 5 comments
Closed

Oders are not processed #2

tobiasheine opened this issue Aug 27, 2017 · 5 comments

Comments

@tobiasheine
Copy link

When I create an order it takes quite some time before I get the success message, but it seems the messaging is broken since I don't see any invoice or shipment being created.

If there are any logs I could provide I'd need some help to locate them since I am a newby when it comes to web/backend development.

screen shot 2017-08-27 at 13 16 41

screen shot 2017-08-27 at 13 16 49

screen shot 2017-08-27 at 13 16 54

@ewolff
Copy link
Owner

ewolff commented Aug 27, 2017

Thanks. You can get a list of all running docker containers with docker ps:

CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                                NAMES
857aadf7c40e        mskafka_apache                 "/bin/sh -c 'apach..."   9 seconds ago       Up 7 seconds        0.0.0.0:8080->80/tcp                                 mskafka_apache_1
9220cef4f9c0        mskafka_invoicing              "/bin/sh -c '/usr/..."   11 seconds ago      Up 8 seconds        8080/tcp                                             mskafka_invoicing_1
989c84b240a2        mskafka_shipping               "/bin/sh -c '/usr/..."   11 seconds ago      Up 8 seconds        8080/tcp                                             mskafka_shipping_1
aff85f17793f        mskafka_order                  "/bin/sh -c '/usr/..."   11 seconds ago      Up 8 seconds        8080/tcp                                             mskafka_order_1
b1ea3311f031        wurstmeister/kafka:0.10.2.1    "start-kafka.sh"         13 seconds ago      Up 11 seconds                                                            mskafka_kafka_1
c83247820e4d        mskafka_postgres               "docker-entrypoint..."   14 seconds ago      Up 12 seconds       5432/tcp                                             mskafka_postgres_1
a397c26c1947        wurstmeister/zookeeper:3.4.6   "/bin/sh -c '/usr/..."   14 seconds ago      Up 12 seconds       22/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp   mskafka_zookeeper_1

You can see the logs with docker logs <docker-container-name> e.g. docker logs mskafka_zookeeper_1

@tobiasheine
Copy link
Author

Great, so apparently the order message cannot be sent to the topic due to a timeout.

Exception thrown when sending a message with key='7created' and payload='com.ewolff.microservice.order.logic.Order@48f9766a[id=7,customer=com.ewolff.microservice.order.custo...' to topic order:

org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.

@ewolff
Copy link
Owner

ewolff commented Aug 27, 2017 via email

@ewolff
Copy link
Owner

ewolff commented Aug 28, 2017

I suspect that Docker does not have enough RAM. If you are running a local Docker installation on Windows or macOS, go to Preferences -> Advanced and make sure memory is set to 4 GB. If you are using Docker Machine use docker-machine create --virtualbox-memory "4096" --driver virtualbox dev.

@ewolff
Copy link
Owner

ewolff commented Sep 8, 2017

This is actually really a bug. The problem is that the configuration was messed up and therefore the Kafka server was not really accessed. Thanks for pointing this out!

@ewolff ewolff closed this as completed in 536d92c Sep 8, 2017
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