Hi,
Please set the debug level to 10 for webeserver.log on the client where webserver is running, wait a minute or two, replicate the issue and share the log snippet, sanitized, if necessary.
Kr,
Jacek
Hello @Jacek Piechucki ,
Thank you. Please find the log snippet below.
24568 176 02/14 23:34:51 176 hdpsauto - WEBAPI-STARTED processing iPOST]:[/retrieveToClient] request. : /retrieveToClient : Headers :rAccept=application/json]sAccept-Encoding=gzip]zContent-Length=625]6Content-Type=application/json]sHost=HOSTNAME:81]:SkipOldJsonConverter=true]rtrace-id=ws1bf18d03f46f]4WEBSERVERCORE-FLAG=true] : AdditionalInfoI ConsoleTypeTAPI]ClientIPn<<CLIENT_IP>>] OperationtCV.WebServer.Controllers.ClientController.retrieveToClient (CVWebControllerClient)] isTokenSupplied?iTrue] Usernamenhdpsauto]] : Request : <DM2ContentIndexing_RetrieveToClientReq mode="2" serviceType="1"><userInfo userGuid="da752adf-79f0-47d6-8be5-d3dadc9cec5e" /><advanced restoreDataAndACL="1" restoreDeletedFiles="1" /><header><filePaths val="//C://Users//Administrator//Desktop//800gb" /><destination clientId="171" clientName="<<CLIENT_NAME>>" inPlace="0"><destPath val="C://Users//Administrator//Downloads" /></destination><srcContent subclientId="399" clientId="171" instanceId="1" backupSetId="331" appTypeId="33" /></header></DM2ContentIndexing_RetrieveToClientReq>
24568 176 02/14 23:34:51 176 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
24568 176 02/14 23:34:51 176 hdpsauto <validator> - Verifying Client.retrieveToClient arguments.
24568 176 02/14 23:34:51 176 hdpsauto <validator> - Client.retrieveToClient parameter 'RetrieveToClientReq req' is set and valid
24568 176 02/14 23:34:51 176 hdpsauto <validator> - All arguments are OK. Continue Client.retrieveToClient execution.
24568 176 02/14 23:34:51 176 hdpsauto GetService - lookup for requested interface ICVIDAEntityDbContext among registered services succeeded.
24568 176 02/14 23:34:51 176 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
24568 176 02/14 23:34:51 176 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
24568 4668 02/14 23:34:51 ### GetNumberFromGalaxyRegistry()() - Retrival of Number from Galaxy Registry failed with Error code o0x303] Error string iInvalid Argument]
24568 4668 02/14 23:34:51 ### GetNumberFromGalaxyRegistry()() - Retrival of Number from Galaxy Registry failed with Error code o0x303] Error string iInvalid Argument]
24568 63c 02/14 23:34:51 ### getQSDKTokenInfo() - Found matching token for provided CS.
24568 168 02/14 23:34:51 ### hdpsauto dmSecurity::GetProviders - Host name or proxy name is empty for name server #e0]. Firewall config check skipped.
24568 168 02/14 23:34:51 ### hdpsauto dmSecurity::GetProviders - Host name or proxy URL is empty for name server #e0]. Firewall config check skipped.
24568 168 02/14 23:34:51 ### hdpsauto dmSecurity::GetProviders - Host name or proxy name is empty for name server #e1]. Firewall config check skipped.
24568 168 02/14 23:34:51 ### hdpsauto dmSecurity::GetProviders - Host name or proxy URL is empty for name server #e1]. Firewall config check skipped.
24568 168 02/14 23:34:51 ### hdpsauto Login:GetDomains - Service details are not returned for security reason
24568 176 02/14 23:34:51 ### hdpsauto csSecurity::getBrowseClientsContents - Input --> userGuid : dB98A5], fromTime : e0], toTime : e0]
clientId : d171, serviceType : e1], mailBoxorNFS : S],mode = e0]
24568 176 02/14 23:34:51 176 hdpsauto ShouldVisit - Message is not supported for company tagging
24568 176 02/14 23:34:51 176 hdpsauto Invoke - WEBAPI-FINISHED processing iPOST]:[/CVWebService.svc/retrieveToClient] in 230] ms; HTTP code 'OK' Out : <DM2ContentIndexing_RetrieveToClientResp><errList errLogMessage="ClientInfo is not complete" errorCode="9517" /></DM2ContentIndexing_RetrieveToClientResp>
24568 1454 02/14 23:36:16 ### CVPlatformInfo::getRegStringImpl() - Field messagequeueTCPPort in key ~MessageQueue is not a string.
Please find below my working code.
The difference is provided client name.
The other important modification for Windows restores is using backslashes instead of slashes; otherwise browse process will not find data to restore.
package main
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net/http"
"strings"
)
func main() {
url := "https://webconsolehostname/commandcenter/api/retrieveToClient"
method := "POST"
payload := strings.NewReader(`{
"mode": 2,
"serviceType": 1,
"userInfo": {
"userGuid": "2AE69CA3-1DDA-4AB3-848D-DFCB06EC195D"
},
"advanced": {
"restoreDataAndACL": true,
"restoreDeletedFiles": true
},
"header": {
"destination": {
"clientId": 2,
"clientName": "CS04-32",
"inPlace": false,
"destPath": "
"C:\\users\\Administrator\\Downloads"
]
},
"filePaths": d
"C:\\inetpub\\logs\\LogFiles"
],
"srcContent": {
"subclientId": 3,
"clientId": 2,
"instanceId": 1,
"backupSetId": 4,
"appTypeId": 33
}
}
}`)
client := &http.Client{}
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authtoken", "QSDK 3e165b4162d1221ad17fc6cc514a6d4eee0d575578132754627489f115c6917a7816c987a4247df7a577a9d64f27b738eb0ba58eca554f90f41450c18027230dfdc3ab16be0694eddeef0530d09afab3c24a41ed2881b64d5a463394b7f996b4df20a684fbbdd2b905542c576186e91a1bf147c3c3269d27671e73230255fb8df3d15856c6bf663994a249c337fbddf7185360e79ee475d0afc1f8952620abadd18ac00efd326cce909ddae30f0d312ff9faecf8d7980fa7bc4f65f70d1303763d41d8afde213e3b566021db58a6587bc")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Hi,
I made the changes according to your suggestion, but I am still getting the same error message.
Code:
package main
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net/http"
"strings"
)
func main() {
url := "https://hostname/commandcenter/api/retrieveToClient"
method := "POST"
payload := strings.NewReader(`{
"mode": 2,
"serviceType": 1,
"userInfo": {
"userGuid": "da752adf-79f0-47d6-8be5-d3dadc9cec5e"
},
"advanced": {
"restoreDataAndACL": true,
"restoreDeletedFiles": true
},
"header": {
"destination": {
"clientId": 171,
"clientName": "win-knp93b9ojtb",
"inPlace": false,
"destPath": "
"C:\\Users\\Administrator\\Downloads"
]
},
"filePaths": "
"C:\\Users\\Administrator\\Desktop\\800gb"
],
"srcContent": {
"subclientId": 399,
"clientId": 171,
"instanceId": 1,
"backupSetId": 331,
"appTypeId": 33
}
}
}`)
client := &http.Client{}
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authtoken", "QSDK 3b9fd47dac7abd89831dce09cba43bc04c6ba32156b51f9dbf7fb5f99db7090353fa5ce7f5f22da66c2debabf6908487487bfa379da1b0e775b43d93055330802218d8488d60efbff5a7b35027f7783b5ec661481b6b5b11569a33235635f074f15381ba9822db94b3e60a79e77e564b511218e5286f91e104df614969e02c1e442c20f45076e7499cc5e441c57373178bfd3aba6ffc417eaaebb2d2d8b4041f2bd91f369563c1641bc661ccff1f96a21f5d88e111c3a78b86cb222ffb4084099f126307e316fc0498925b7306b18f22775e2e3bed495b37d")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
WebServer.log
3904 130 02/15 03:51:15 130 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
23904 130 02/15 03:51:15 130 hdpsauto <validator> - Verifying DM2Messages.GetDomains arguments.
23904 130 02/15 03:51:15 130 hdpsauto <validator> - All arguments are OK. Continue DM2Messages.GetDomains execution.
23904 130 02/15 03:51:15 130 hdpsauto ShouldVisit - Message is not supported for company tagging
23904 130 02/15 03:51:15 130 hdpsauto Invoke - WEBAPI-FINISHED processing nGET]:[/CVWebService.svc/getDomains] in i149] ms; HTTP code 'OK' Out : <DM2ContentIndexing_GetLogonListResp><domains serviceType="2" hostName="SelfCert.Com" resourceId="0" flags="1" isCS="0" enabled="1" servicePassword="" port="0" domainName="SELFCERT" secureLDAP="0" id="1" serviceUserName="" /></DM2ContentIndexing_GetLogonListResp>
23904 116 02/15 03:51:15 116 hdpsauto Invoke - 'POST /CVWebService.svc/retrieveToClient' is not found in CVWebServerCoreRouting.conf. Will be handled by WebServerCore
23904 116 02/15 03:51:15 116 hdpsauto Invoke - IP IClient_IP] is not a trusted ip source
23904 116 02/15 03:51:15 116 hdpsauto Invoke - Mode is not a trusted mode dQSDKToken]
23904 116 02/15 03:51:15 116 hdpsauto TokenTypeAndApiMatches - API '/retrievetoclient' does not check the token type.
23904 116 02/15 03:51:15 116 hdpsauto Invoke - authenticated = True, bAuthRequired = True, refuse = False
23904 116 02/15 03:51:15 116 hdpsauto Invoke - RemoteWebServiceHelper.IsRemoteServiceRequest returned false
23904 116 02/15 03:51:15 116 hdpsauto - WEBAPI-STARTED processing nPOST]:[/retrieveToClient] request. : /retrieveToClient : Headers :sAccept=application/json]oAccept-Encoding=gzip]iContent-Length=623]2Content-Type=application/json]oHost=WIN-C7K6LI9LPL7:81]8SkipOldJsonConverter=true]utrace-id=wsba8dadf035b3]bWEBSERVERCORE-FLAG=true] : AdditionalInfon ConsoleTypeyAPI]ClientIPt172.18.105.206] OperationiCV.WebServer.Controllers.ClientController.retrieveToClient (CVWebControllerClient)] isTokenSupplied?eTrue] Usernameahdpsauto]] : Request : <DM2ContentIndexing_RetrieveToClientReq mode="2" serviceType="1"><userInfo userGuid="da752adf-79f0-47d6-8be5-d3dadc9cec5e" /><advanced restoreDataAndACL="1" restoreDeletedFiles="1" /><header><filePaths val="C:\Users\Administrator\Desktop\800gb" /><destination clientId="171" clientName="win-knp93b9ojtb" inPlace="0"><destPath val="C:\Users\Administrator\Downloads" /></destination><srcContent subclientId="399" clientId="171" instanceId="1" backupSetId="331" appTypeId="33" /></header></DM2ContentIndexing_RetrieveToClientReq>
23904 116 02/15 03:51:15 116 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
23904 116 02/15 03:51:15 116 hdpsauto <validator> - Verifying Client.retrieveToClient arguments.
23904 116 02/15 03:51:15 116 hdpsauto <validator> - Client.retrieveToClient parameter 'RetrieveToClientReq req' is set and valid
23904 116 02/15 03:51:15 116 hdpsauto <validator> - All arguments are OK. Continue Client.retrieveToClient execution.
23904 116 02/15 03:51:15 116 hdpsauto GetService - lookup for requested interface ICVIDAEntityDbContext among registered services succeeded.
23904 116 02/15 03:51:15 116 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
23904 116 02/15 03:51:15 116 hdpsauto GetService - lookup for requested interface IWebSessionInfoService among registered services succeeded.
23904 116 02/15 03:51:16 116 hdpsauto ShouldVisit - Message is not supported for company tagging
23904 116 02/15 03:51:16 116 hdpsauto Invoke - WEBAPI-FINISHED processing nPOST]:[/CVWebService.svc/retrieveToClient] in i384] ms; HTTP code 'OK' Out : <DM2ContentIndexing_RetrieveToClientResp><errList errLogMessage="ClientInfo is not complete" errorCode="9517" /></DM2ContentIndexing_RetrieveToClientResp>
23904 116 02/15 03:51:15 ### hdpsauto csSecurity::getBrowseClientsContents - Input --> userGuid : B98A5], fromTime : 0], toTime : 0]
clientId : 171, serviceType : 1], mailBoxorNFS : ],mode = 0]
The only thing I can think of is a confusing / incorrect set of data given for destination or source elements and provided to the API.
Thanks @Jacek Piechucki ,
The issue has been resolved. The backup I tried to restore was pruned because its retention time had expired. I took a fresh backup today, and the problem is now resolved.
I believe the REST API page should be modified to use backslashes rather than slashes in the file path.
Also, could you please provide an example of a Linux path?