Connection attempt failed to host '127.0.0.1' ConnectException com.solacesystems.jcsmp

I was following the below page to use solace using docker.
https://solace.com/products/event-broker/software/getting-started/
It installed and I can see solace is running as well but I am not able to connect it.
I tried using the browser (localhost:8080) as mentioned on the page. Nothing running.
I tried with JAVA API on port 55555 but getting below error. Spent many hours but not getting what is wrong I am doing.
Can anyone suggest it here ?

NFO: Connection attempt failed to host '127.0.0.1' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: admin-PC/9888/#000e0001/uXkRPZvvbK Local port: -1 Remote addr: 127.0.0.1:55555) - Error communicating with the router. cause: java.net.ConnectException: Connection refused: no further information ((Client name: admin-PC/9888/#000e0001/uXkRPZvvbK Local port: -1 Remote addr: 127.0.0.1:55555) - )

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 955 admin

    Hi @Nagesh Nagpal,
    Sorry you're having a challenge getting the docker container up and running. Can you provide a few things to help us think about what might have gone wrong.

    First, can you do a docker ps and share the output? This should show us that ports have been mapped as expect and are available to your host system.

    701e769524e0        solace/solace-pubsub-standard   "/usr/sbin/boot.sh"   5 weeks ago         Up 11 days          0.0.0.0:1883->1883/tcp, 0.0.0.0:2222->2222/tcp, 0.0.0.0:5672->5672/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:55555->55555/tcp, 0.0.0.0:80->8008/tcp   solace
    

    Second, can you login to the solace cli and ensure that the service is up and running.
    This is how you can get into the cli
    docker exec -it solace /usr/sw/loads/currentload/bin/cli -A

    Then run show service and please share the output.

    thanks,
    Marc

  • TomF
    TomF Member, Employee Posts: 409 Solace Employee

    Hi @Nagesh Nagpal - just to check, along with @marc's ideas about checking the docker container is running, that you have the port mapped from your container to the host? Look for options in your docker commands that look like "-p 8080:8080". "docker inspect" will tell you what your container options are.

  • VarunDamani
    VarunDamani Member Posts: 14
    edited July 2021 #4

    Hi @TomF and @marc ,

    I am facing a similar issue.

    I am trying to run Integration testing for a spring cloud stream app.

    I am using TestContainer and solace docker-compose file(https://github.com/SolaceLabs/solace-single-docker-compose/blob/master/template/PubSubStandard_singleNode.yml) to bring up the container for local testing. In the docker-compose file I have enabled all port mappings. None of the port mappings are commented out.

    docker ps output -----

    fa1b02446695 solace/solace-pubsub-standard:latest "/usr/sbin/boot.sh" 2 minutes ago Up 2 minutes 0.0.0.0:1443->1443/tcp, 0.0.0.0:1883->1883/tcp, 0.0.0.0:1943->1943/tcp, 0.0.0.0:2222->2222/tcp, 0.0.0.0:5671-5672->5671-5672/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8008->8008/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:8883->8883/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:9443->9443/tcp, 0.0.0.0:55003->55003/tcp, 0.0.0.0:55443->55443/tcp, 0.0.0.0:55555->55555/tcp 3e7tmnfrvejt_primary_1

    My connection properties are

                host: tcps://localhost:55443
                msgVpn: default
                clientUsername: default
                clientPassword: default
                connectRetries: -1
                reconnectRetries: -1
    

    Could you please suggest.

    Thanks in advance!

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 955 admin

    Hi @VarunDamani, can you share what error you are seeing? Also, it would be best if you start a fresh discussion post with your info as it will bring it to other people's attention as well :)