Showing posts with label Access Gogo Shell. Show all posts
Showing posts with label Access Gogo Shell. Show all posts

Monday, February 24, 2020

Access Felix Gogo Shell in Liferay 7.2/DXP Portal Environment


Apache Felix Gogo shell is command line interface (CLI) to interact with Liferay Module Framework or OSGi container.

It will provide set of predefined commands to access bundle or modules information like list bundles installed in OSGi container, Services Registry Information and Dependency Management related details.

We have many ways to access the Apache Felix Gogo shell
  • Command Prompt in Windows
  • Putty Terminal
  • Liferay Blade CLI
  • From Liferay Portal Control Panel

Command Prompt in Windows

Make sure portal server should be started before start using Apache Gogo shell.

Open command prompt in windows and use following telenet command.

telnet localhost 11311

Use simple command lb it will list the bundles installed in the OSGi container.


Gogo shell using 11311 is default port number configured by Liferay Portal and we can change the port number as well.

Use disconnect to end the session.


Note:

Should not use shutdown, close, and exit commands in the Gogo shell and it will lead to showdown OSGi framework.

If you see “Telnet is not recognized as an internal or external command” enable Telenet in windows. Follow below link


Putty Terminal

We can also use putty terminal to connect to Gogo shell. If you don’t have putty, download portable putty from following link for windows and extract in local machine.


Click on putty executable and it will launch putty new session window.


Provide following details and open session and it will launch Gogo shell terminal.

Host Name: localhost
Port: 11311
Connection Type: telenet





Use help command to know about available commands.


Note:

We can also connect to remote host and need to provide valid remote host name or ip address.

Liferay Blade CLI

If Liferay Blade CLI already install simple use following command.

blade sh <gogo-shell-command>

Example


blade sh lb
blade sh help



If BLADE not installed follow below link.


From Liferay Control Panel

We can use Liferay Portal Control Panel to access Gogo shell. Login as Portal Admin and portal configuration, we can find Gogo shell app

Login As Portal Admin à Control Panel à Configuration à Click on Gogo Shell


Enter valid Gogo shell command as input and click on execute.


Author

Monday, November 14, 2016

Access Felix Gogo Shell in Liferay 7

Felix Gogo shell is command line interface to manage bundles in the OSGi container. We have defined commands are available for Felix Gogo shell, form these we can interact with OSGi container and manage the bundles which are deployed in the OSGi container.

We can manage bundles lifecycle like install, start, stop and uninstall bundles from OSGi container.


Liferay 7 also have used Apache Felix Gogo shell to interact with Liferay Portal Module framework. We can deploy Liferay Application bundles and activate and deactivate bundles.
To access Felix Gogo shell in Liferay 7 Portal we need telnet client from that we can access Felix Gogo shell.

Windows 7 and 8 Telnet client not enabled in the machine so first we need to enable telnet in our windows machine.

Telnet session on Windows

Click Start > Control Panel.


Click on Programs


Click Programs and Features.



Click Turn Windows features on or off.


In the Windows Features dialog box, check the Telnet Client check box.



Click OK. The system installs the appropriate files. This will take a few seconds to a minute.

Once telnet successfully installed in the machine then we can open the telnet session by using windows command prompt.

Open a Telnet session

Open windows command prompt and Type “telnet” and press ENTER.



The Telnet> prompt is displayed


Access Felix Gogo shell

To access Felix Gogo shell in Liferay portal we need to start Liferay portal. Based on your operating system go to tomcat bin directory and use server start-up command.


Windows

startup.bat

Linux

/startup.sh


Open Windows command prompt go to Liferay Tomcat bin directory then use above commands to start Liferay 7 portal server. When Liferay Portal Started then OSGi container also started and required bundles are installed and started in the OSGi container. Liferay 7 have used Equinox OSGi implementation container.



Apache Felix Gogo shell implemented as there bundles


org.apache.felix.gogo.command_0.12.0
org.apache.felix.gogo.runtime_0.10.0
org.apache.felix.gogo.shell_0.10.0


When Liferay 7 Portal started then three bundles are installed in the Equinox OSGi container and it will be started automatically.

All the information we can find in the Liferay Logs as info messages



Liferay 7 Portal have portal configuration in the “portal.properties” from these properties Portal Module frame work will start, required bundles will install and started automatically. Apart from Felix Gogo shell there are many bundles are installed and started while starting Liferay portal server.

The following are the important Liferay 7 portal properties related to Felix Gogo shell.

               
module.framework.enabled=true

module.framework.initial.bundles=\
    felix-fileinstall.jar@start,\
    ${extra.bundles}/org.apache.felix.gogo.command-0.12.0.jar@start,\
    ${extra.bundles}/org.apache.felix.gogo.runtime-0.10.0.jar@start,\
    ${extra.bundles}/org.apache.felix.gogo.shell-0.10.0.jar@start,\
    ${extra.bundles}/org.eclipse.equinox.console_1.0.0.v20120522-1841.jar@start

module.framework.properties.osgi.console=localhost:11311


Access Felix Gogo shell

Open windows command prompt and use following command to access Felix Gogo shell. Gogo shell running on 11311 port.


telnet localhost 11311




Issue the above command and press the enter then Felix Gogo shell session will open



Now we can use all Felix Gogo shell defied commands to manage bundles in the OSGi container.

Use lb command to see list of bundles available in the OSGi container


Author

                             

Recent Posts

Recent Posts Widget

Popular Posts