couchbaselabs / try-cb-java

Java-Based Couchbase 7.0 travel-sample application
https://docs.couchbase.com/java-sdk/current/hello-world/sample-application.html
Other
56 stars 38 forks source link

Wait-for-couchbase failure #19

Closed willy23martin closed 3 years ago

willy23martin commented 3 years ago

Good afternoon:

I had an issue with this project (also with the python one) when I was deploying it. The following were the last container logs I got once it run:

wait-for-couchbase: checking http://:8091/pools/default/buckets/travel wait-for-couchbase: polling for '.scopes | map(.name) | contains(["inventory", " wait-for-couchbase: checking http://:8094/api/cfg wait-for-couchbase: polling for '.status == "ok"' wait-for-couchbase: checking http://:8094/api/index/hotels-index wait-for-couchbase: polling for '.status == "ok"' wait-for-couchbase: index already exists wait-for-couchbase: checking http://:9102/api/v1/stats wait-for-couchbase: polling for '.indexer.indexer_state == "Active"' wait-for-couchbase: polling for '. | keys | contains(["travel-sample:def_airportname", "travel-sample:def_city", "travel-sample:def_faa", "travel-sample:def_icao", "travel-sample:def_name_type", "travel-sample:def_primary", "travel-samplewait-for-couchbase: polling for '. | del(.indexer) | del(.["travel-sample:def_name_type"]) | map(.items_count > 0) | all' wait-for-couchbase: value is currently: false wait-for-couchbase: ... wait-for-couchbase: ... wait-for-couchbase: ... wait-for-couchbase: ... wait-for-couchbase: ... wait-for-couchbase: ... wait-for-couchbase: ... wait-for-couchbase: Failure

Then the application stopped. Would you please guide me how I can solve that issue? I had already deployed both couchbase server and sync-gateway in separated docker containers, same docker network. sync-gateway was successfully deployed and its communication with couchbase was successfully established.

osfameron commented 3 years ago

Thanks for the report @willy23martin! I'll test that now (Java and Python) and see if I can replicate the error on the "happy path" of docker-compose up first.

But it sounds like you are doing something slightly different with server setup - could you confirm how you deployed the server? Also as you mention you deployed sync-gateway, I'm wondering if you're running the Mobile travel sample? I believe this uses an earlier branch of the travel-sample code, that doesn't use our wait-for-couchbase initialiser.

osfameron commented 3 years ago

OK, so for Java, docker-compose up works for me. I'm running MacOS 11.6 on 2019 16" MBP. The only config change I've made in my Docker was to Resources I think: Memory 4.50 GB

I'll confirm on Python next, but can you:

a) shut down exissting containers and try the happy path docker-compose up and confirm if that works b) let me know your system and Docker details in case we can identify a problem there c) OR (if the Happy Path works), then please confirm more details about what your failing use-case is!

osfameron commented 3 years ago

Just to confirm, Python also works fine for me.

As you've tried both, I'm sure you also came across errors like ERROR: for db Cannot create container for service db: Conflict. The container name "/couchbase-sandbox-7.0.0" is already in use by container which can be resolved by deleting the old containers, but thought I'd mention in case that's worth checking. But it looks like you've got past that point.

So I think the steps above are the first thing to try! Look forward to hearing back from you with more information.

willy23martin commented 3 years ago

Good morning @osfameron Thank you for replying :) I clean all my workspace's related containers. Then I follow the happy path by executing the docker-compose up command and it is up and running. Thank you so much.

Yes, I am following this guide (https://docs.couchbase.com/tutorials/mobile-travel-sample/java/installation/docker.html), so I did separately installed the components and also I need to continue with the mobile one I hope it will work with this configuration as well.

Thank you so much again.

osfameron commented 3 years ago

OK!

This will definitely get you started with Couchbase 7.0 featuring Scopes and Collections! Do let us know if you have any other issues.

You may find that the Mobile travel sample app doesn't interact well with that though. (I believe Mobile didn't yet support scopes and collections. So you may need to follow the instructions from the Mobile app's README, which should point you at the right method! I'm not an expert in that area though, but will try to help point you in the right direction if needed.)

I'll close the ticket for now, hope you enjoy working with Couchbase.

willy23martin commented 3 years ago

Thank you @osfameron . I will let you know.