Tuesday 30 August 2016

Gathering Logs from "Nutanix NCC Health Check"

To gather the logs from Nutanix NCC, you can follow the below simple steps. In Version 4.5, the NCC is built into the Nutanix controller VM and hence no additional steps are required.

1) Login to the Nutanix Cluster using the admin username and password.

2) Go to Home => Hardware => Table. You can get the list of controller VMs IPs here. In case you don't remember them that nano second. :-)
3) Next, you will need to ssh to one of the controller VMs using Putty,using the username : nutanix/nutanix/4u (default) in case the password has not been changed.

4) Run the command : ncc health_checks run_all

5) Take a break, come back and hopefully the health_check should have completed.Now we need to move the logs to our local computer in case you need to share them.

6) I use WINSCP to download the logs from the controller VM to my local computer.Install Winscp and when prompted for the IP,enter the Controller VM Ip address and don't forget to select SCP and enter the same username and password. 

 7) Browse to the below directory where the logs are stroed, and you can copy them by just dragging and dropping to your computer location on the left : 
/home/nutanix/data/logs/ncc-output-latest.log

Hope this information helps.



XX

Sunday 14 August 2016

" Cannot truncate SQL logs for database: model " Veeam Backup

Was setting up Veeam for one of our clients and found the below Warning message in a SQL Server backup. The below steps helped me resolve the issue. Hope it helps you too..

Issue:
 You will see the below warning message in a Veeam backup Job with SQL VMs. " Failed to truncate Microsoft SQL Server transaction logs. Details:  Error code: 0x80004005 " .

The complete error message is a below:

Failed to truncate Microsoft SQL Server transaction logs. Details:  Error code: 0x80004005
Failed to invoke func [TruncateSqlLogs]: Unspecified error. Failed to process 'TruncateSQLLog' command.
Failed to truncate SQL server transaction logs for instances:  . See guest helper log. .
 Error code: 0x80004005
Failed to invoke func [TruncateSqlLogs]: Unspecified error. Failed to process 'TruncateSQLLog' command.
Failed to truncate SQL server transaction logs for instances:  See guest helper log.


Verification:
1) You can open the Guest Agent log file located in the below location " C:\ProgramData\Veeam\Backup\VeeamGuestHelper***.log " in the SQL VM and verify if you are seeing the  below message :

 5604                                  Major version: 12
 5604                                  Database tempdb has not been backed up yet.
 5604                                  Database found: master. Recovery model: 3. Is readonly: false. State: 0.
 5604                                  Database found: tempdb. Recovery model: 3. Is readonly: false. State: 0.
 5604                                  Database found: model. Recovery model: 1. Is readonly: false. State: 0.
 5604  WARN                    Cannot truncate SQL logs for database: model. Code = 0x80040e14
 5604  WARN                    Code meaning = IDispatch error #3092
 5604  WARN                    Source = Microsoft OLE DB Provider for SQL Server
 5604  WARN                    Description = BACKUP LOG cannot be performed because there is no current database backup.
 5604  WARN                    No OLE DB Error Information found: hr = 0x80004005
 5604                                  Database found: msdb. Recovery model: 3. Is readonly: false. State: 0.
 5604                                  Database found: TEST. Recovery model: 1. Is readonly: false. State: 0.
 5604                                  Database found: omar. Recovery model: 1. Is readonly: false. State: 0.
 5604                              Truncating database logs (SQL instance: ). User: XXXXX.. Ok.
 5604                              Truncating database logs (SQL instance: ). User: NT AUTHORITY\SYSTEM.
5604  INFO                            Connecting to mssql, connection string: Provider='sqloledb';Data Source='(local)';Integrated Security='SSPI';Persist Security Info=False, timeout: 15


Solution :
 The resolution to the issue was pretty simple:
1) Login to SQL DB using SQL Management Studio.
2) GO to system database => Right-click the Model Database => Tasks => Backup = > Provide a name for the backup and initiate a backup.
3) Once a initial backup was taken the Warning message disappears.


XX