Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


question

chandrasekar.b03_190734 avatar image
chandrasekar.b03_190734 asked ·

How to solve "Unable to listen on port 5000: Listeners failed to create" error?

I'm using cloud instance provided by the workshop for week 6. This time i'm able to run the week 6 exercise easily until i encountered an error. I have already executed this command also,

docker run -e USE_ASTRA='true' -p 5000:5000 astra-backend:my-image 
docker run -e USE_ASTRA='true' -e BASE_ADDRESS='http://localhost:5000/api' -p 3000:3000 astra-ui:my-image

Now when i execute this command i get an error,

kubectl -n my-app port-forward pods/astra-backend 5000:5000 &
kubectl -n my-app  port-forward pods/astra-ui 3000:3000 &

Error Displayed on my cloud terminal. I even tried to run the localhost on 5000 & 3000 but the site can't be reached.

Unable to listen on port 5000: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.0.0.1:5000: bind: address already in use unable to create listener: Error listen tcp6 [::1]:5000: bind: address already in use]                                                 error: unable to listen on any of the requested ports: [{5000 5000}]

Unable to listen on port 3000: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.0.0.1:3000: bind: address already in use unable to create listener: Error listen tcp6 [::1]:3000: bind: address already in use]                                   error: unable to listen on any of the requested ports: [{3000 3000}]   

// Even localhost:5000 and localhost:3000 sites are not able to be reached !                                                                                

How could i solve the error. Do i have to start from the first? If so, can i do it once again with the same instance or do i have to get another one ? (considering the 24 hours time, clock is ticking...).

Kindly acknowledge ASAP.

Any help would be very much appreciable. :)

workshop
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Cedrick Lunven avatar image
Cedrick Lunven answered ·

Hi,

Thank you for the question.

We currently see a limitation of the cloud instances and kubernetes port mapping/exposing/opening. We are currently working on this, for now we did not find any solution - thank you for your patience. Any help is welcomed if you have any idea on your side.

app=>docker=>kubernetes=>aws

On a side note, regarding address already in use mean the bind has already been made and port is already in use not sure what blocking those ports.

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi Cedrick,

Thank you ! Kindly verify & solve the issues ASAP as the cloud instance validity is limited and now I have to try to extend it for another 24 hours. Also I dont have enough resources on my laptop(8GB RAM) so I'm depend on cloud instance only.


0 Likes 0 · ·
Cedrick Lunven avatar image Cedrick Lunven ♦ chandrasekar.b03_190734 ·

Issue is now resolved (Details : https://community.datastax.com/questions/7478/index.html)

you can delete your cluster and restart. You need to update the read me. Also you should not use 5000 anywhere as stated in the doc


0 Likes 0 · ·