How to access the Solace CLI

Options
sulfred
sulfred Member Posts: 20
edited March 2022 in PubSub+ Event Broker #1

I am using docker image to run the solace broker. The image is solace/solace-pubsub-standard:latest . I would like to access the CLI and for example check the current version or log checking.

I followed the steps but it seems that there is not enough access right for me. I would like to ask what is the correct way to access the CLI in a docker container.


Thanks,


I am referencing to these doc:

# I think I can access as anonymous mode
docker exec -it solace /usr/sw/loads/currentload/bin/cli -A


Solace PubSub+ Standard Version 9.12.1.17


The Solace PubSub+ Standard is proprietary software of
Solace Corporation. By accessing the Solace PubSub+ Standard
you are agreeing to the license terms and conditions located at
http://www.solace.com/license-software


Copyright 2004-2021 Solace Corporation. All rights reserved.


To purchase product support, please contact Solace at:
https://solace.com/contact-us/


Operating Mode: Message Routing Node


0f723cecbb20> solacectl version


 Invalid command input
        solacectl version
        ^
         -> unknown command, or command not available in current mode
Tagged:

Best Answer

Answers

  • uherbst
    uherbst Member, Employee Posts: 123 Solace Employee
    #3 Answer ✓
    Options

    Hi @sulfred ,


    your way of access cli is absolutely fine.

    If you access cli this way, you have global admin permission.

    Only with your command in cli, you're not correct.

    Just type

    show version
    

    This gives you all the version information.

    The complete reference for cli commands can be found here:


    Have a nice day.

    Uli

  • sulfred
    sulfred Member Posts: 20
    Options

    Thanks for the reply, that works.

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 499 admin
    Options

    A quick tip on this that @Aaron pointed out to me a while back, you can access to Solace CLI in shorter form like this

    docker exec -it solace cli
    


  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 541 admin
    Options

    Yup! You can also ssh into the Docker container, if it was running on a different host (or just use localhost):

    ssh -p 2222 admin@<brokerIP>
    

    @sulfred the "solacectl" commands are for when you're using a machine image (like VirtualBox or VMWare), not Docker.

    p.s. I love CLI, and still use it more than the PubSub+Manager GUI..! 🤓

  • sulfred
    sulfred Member Posts: 20
    Options

    Thanks @Aaron for your information. As a beginner, I will stick into the GUI first but I cam imagine how fast if one is familiar with the CLI. lol