Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

What is a difference between Restarting the AEM from OSGi console and restarting it with remote server access SSH tool like Putty or Gitbash

Avatar

Level 1

One question is larking in my mind what actually happens at the background when we restart the AEM server from remote server access SSH tool like Putty or Gitbash and from OSGi console.

 

To restart AEM from OSGi console we use following path.

OSGi Console -------> Web Console Tab -----> System Information ------> We get options to restart and stop the server.

or 

we can use following path to directly reach the page

Path ------> http://localhost:4502/system/console/vmstat

 

To restart from remote server access SSH tool, we can use following command.

 

sudo /bin/systemctl restart httpd 

 

Can anyone please let me know what is the significance of each type of restart and what are the Ideal use cases for these types of operations.

Thank You.

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Nitesh-Chavan 

Restarting AEM from OSGi Console vs Remote Server Access SSH Tool

Restarting AEM from the OSGi Console and from a remote server access SSH tool like Putty or Gitbash are two different approaches with distinct implications. Let's dive into the details:

Restarting from OSGi Console

When you restart AEM from the OSGi Console, you are essentially restarting the AEM instance itself. This restart is specific to the AEM application and only affects the AEM process.

Here's what happens in the background:

  • The OSGi Console sends a signal to the AEM instance to shut down.
  • AEM performs a graceful shutdown, which includes:
    • Stopping all OSGi bundles and services.
    • Closing all open connections to the repository.
    • Flushing any pending writes to the disk.
  • Once the shutdown is complete, the AEM instance is restarted, and all OSGi bundles and services are reinitialized.

Restarting from Remote Server Access SSH Tool

When you restart AEM using a remote server access SSH tool like Putty or Gitbash, you are restarting the underlying HTTP server process (e.g., Apache HTTP Server) that hosts the AEM instance.

Here's what happens in the background:

  • The SSH command sudo /bin/systemctl restart httpd sends a signal to the operating system to restart the HTTP server process.
  • The HTTP server process is stopped, and all associated child processes, including the AEM instance, are terminated.
  • The HTTP server process is restarted, and the AEM instance is reinitialized as a child process of the HTTP server.

Key differences and ideal use cases

Here are the key differences and ideal use cases for each type of restart:

OSGi Console Restart

  • Ideal for: Development environments, testing, or when you need to restart AEM quickly without affecting the underlying HTTP server.
  • Advantages:
    • Faster restart time.
    • Only affects the AEM instance, leaving the HTTP server and other system processes unaffected.
  • Disadvantages:
    • May not restart the HTTP server, which could lead to issues if the server is not properly configured.

Remote Server Access SSH Tool Restart

  • Ideal for: Production environments, when you need to restart the entire HTTP server, or when you want to ensure a complete restart of all associated processes.
  • Advantages:
    • Ensures a complete restart of the HTTP server and all associated processes, including AEM.
    • Can be used to restart other system services or processes as needed.
  • Disadvantages:
    • Slower restart time.
    • May affect other system processes or services that rely on the HTTP server.

In summary, restarting AEM from the OSGi Console is a more targeted approach that only affects the AEM instance, while restarting from a remote server access SSH tool is a more comprehensive approach that restarts the entire HTTP server and associated processes. Choose the approach that best fits your use case and environment.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi @Nitesh-Chavan 

Restarting AEM from OSGi Console vs Remote Server Access SSH Tool

Restarting AEM from the OSGi Console and from a remote server access SSH tool like Putty or Gitbash are two different approaches with distinct implications. Let's dive into the details:

Restarting from OSGi Console

When you restart AEM from the OSGi Console, you are essentially restarting the AEM instance itself. This restart is specific to the AEM application and only affects the AEM process.

Here's what happens in the background:

  • The OSGi Console sends a signal to the AEM instance to shut down.
  • AEM performs a graceful shutdown, which includes:
    • Stopping all OSGi bundles and services.
    • Closing all open connections to the repository.
    • Flushing any pending writes to the disk.
  • Once the shutdown is complete, the AEM instance is restarted, and all OSGi bundles and services are reinitialized.

Restarting from Remote Server Access SSH Tool

When you restart AEM using a remote server access SSH tool like Putty or Gitbash, you are restarting the underlying HTTP server process (e.g., Apache HTTP Server) that hosts the AEM instance.

Here's what happens in the background:

  • The SSH command sudo /bin/systemctl restart httpd sends a signal to the operating system to restart the HTTP server process.
  • The HTTP server process is stopped, and all associated child processes, including the AEM instance, are terminated.
  • The HTTP server process is restarted, and the AEM instance is reinitialized as a child process of the HTTP server.

Key differences and ideal use cases

Here are the key differences and ideal use cases for each type of restart:

OSGi Console Restart

  • Ideal for: Development environments, testing, or when you need to restart AEM quickly without affecting the underlying HTTP server.
  • Advantages:
    • Faster restart time.
    • Only affects the AEM instance, leaving the HTTP server and other system processes unaffected.
  • Disadvantages:
    • May not restart the HTTP server, which could lead to issues if the server is not properly configured.

Remote Server Access SSH Tool Restart

  • Ideal for: Production environments, when you need to restart the entire HTTP server, or when you want to ensure a complete restart of all associated processes.
  • Advantages:
    • Ensures a complete restart of the HTTP server and all associated processes, including AEM.
    • Can be used to restart other system services or processes as needed.
  • Disadvantages:
    • Slower restart time.
    • May affect other system processes or services that rely on the HTTP server.

In summary, restarting AEM from the OSGi Console is a more targeted approach that only affects the AEM instance, while restarting from a remote server access SSH tool is a more comprehensive approach that restarts the entire HTTP server and associated processes. Choose the approach that best fits your use case and environment.