For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Accessing containers using SSH
We can get the syslogs and Liberty logs by using Secure Shell (SSH) to access your MobileFirst Server and MobileFirst Analytics containers.
Before you begin
- SSH must be enabled for the container.
Tip: The SSH public key must be copied to the mfp-server\server\ssh folder before you run the startserver.sh script.
- Volume has been enabled so that the log files are persisted.
- We need the public IP address of the container.
If you are running a container group, we can bind a public IP address to each instance and view the logs securely using SSH. To enable SSH, make sure to copy the SSH public key to the mfp-server\server\ssh folder before you run the startservergroup.sh script.
Procedure
- Make an SSH request to the container. Example: mylocal-workstation# ssh -i ~/ssh_key_directory/id_rsa root@public_ip
- Archive the log file location. Example:
- container_instance@root# cd /opt/ibm/wlp/usr/servers/mfp
- container_instance@root# tar czf logs_archived.tar.gz logs/
- Download the log archive to our local workstation. Example: mylocal-workstation# scp -i ~/ssh_key_directory/id_rsa root@public_ip:/opt/ibm/wlp/usr/servers/mfp/logs_archived.tar.gz /local_workstation_dir/target_location/
Parent topic: Accessing log files