Failed to open process

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed to open process

L3 Networker

Hi,

 

I want to open slqdeveloper.exe file from PSM with autoit. But when i try to open after some mins, i see failed to open process:

Field_Content_versions_oct20__068Vy00000q9eQ6IAI.png 

 

here is code - > Just open application.

 

#AutoIt3Wrapper_UseX64=n

Opt("MustDeclareVars", 1)

AutoItSetOption("WinTitleMatchMode", 3) ; EXACT_MATCH!

 

;============================================================

;       PSM AutoIt Dispatcher Skeleton

;       ------------------------------

;

; Use this skeleton to create your own 

; connection components integrated with the PSM.

; Areas you may want to modify are marked

; with the string "CHANGE_ME".

;

; Created : April 2013

; Cyber-Ark Software Ltd.

;============================================================

#include "PSMGenericClientWrapper.au3"

 

;=======================================

; Consts & Globals

;=======================================

Global Const $DISPATCHER_NAME   = "Oracle SQL Developer" ; CHANGE_ME

Global Const $CLIENT_EXECUTABLE = "C:\sqldeveloper\sqldeveloper.exe" ; CHANGE_ME

Global Const $ERROR_MESSAGE_TITLE  = "PSM " & $DISPATCHER_NAME & " Dispatcher error message"

Global Const $LOG_MESSAGE_PREFIX = $DISPATCHER_NAME & " Dispatcher - "

 

Global $TargetUsername

Global $TargetPassword

Global $TargetAddress

;Global $TargetDatabase

Global $ConnectionClientPID = 0

 

;=======================================

; Code

;=======================================

Exit Main()

 

;=======================================

; Main

;=======================================

Func Main()

 

; Init PSM Dispatcher utils wrapper

ToolTip ("Initializing...")

if (PSMGenericClient_Init() <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

LogWrite("successfully initialized Dispatcher Utils Wrapper")

 

; Get the dispatcher parameters

FetchSessionProperties()

 

LogWrite("mapping local drives")

if (PSMGenericClient_MapTSDrives() <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

LogWrite("starting client application")

ToolTip ("Starting " & $DISPATCHER_NAME & "...")

$ConnectionClientPID = Run($CLIENT_EXECUTABLE)

if ($ConnectionClientPID == 0) Then

Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error))

EndIf

 

; ------------------

; Handle login here! ; CHANGE_ME

; ------------------

Sleep(25000)

 

; Send PID to PSM so recording/monitoring can begin

; Notice that until we send the PID, PSM blocks all user input.

LogWrite("sending PID to PSM")

if (PSMGenericClient_SendPID($ConnectionClientPID) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

; Terminate PSM Dispatcher utils wrapper

LogWrite("Terminating Dispatcher Utils Wrapper")

PSMGenericClient_Term()

 

Return $PSM_ERROR_SUCCESS

EndFunc

 

;==================================

; Functions

;==================================

; #FUNCTION# ====================================================================================================================

; Name...........: Error

; Description ...: An exception handler - displays an error message and terminates the dispatcher

; Parameters ....: $ErrorMessage - Error message to display

;   $Code - [Optional] Exit error code

; ===============================================================================================================================

Func Error($ErrorMessage, $Code = -1)

 

; If the dispatcher utils DLL was already initialized, write an error log message and terminate the wrapper

if (PSMGenericClient_IsInitialized()) Then

LogWrite($ErrorMessage, True)

PSMGenericClient_Term()

EndIf

 

Local $MessageFlags = BitOr(0, 16, 262144) ; 0=OK button, 16=Stop-sign icon, 262144=MsgBox has top-most attribute set

 

MsgBox($MessageFlags, $ERROR_MESSAGE_TITLE, $ErrorMessage)

 

; If the connection component was already invoked, terminate it

if ($ConnectionClientPID <> 0) Then

ProcessClose($ConnectionClientPID)

$ConnectionClientPID = 0

EndIf

 

Exit $Code

EndFunc

 

; #FUNCTION# ====================================================================================================================

; Name...........: LogWrite

; Description ...: Write a PSMWinSCPDispatcher log message to standard PSM log file

; Parameters ....: $sMessage - [IN] The message to write

;         $LogLevel - [Optional] [IN] Defined if the message should be handled as an error message or as a trace messge

; Return values .: $PSM_ERROR_SUCCESS - Success, otherwise error - Use PSMGenericClient_PSMGetLastErrorString for details.

; ===============================================================================================================================

Func LogWrite($sMessage, $LogLevel = $LOG_LEVEL_TRACE)

Return PSMGenericClient_LogWrite($LOG_MESSAGE_PREFIX & $sMessage, $LogLevel)

EndFunc

 

; #FUNCTION# ====================================================================================================================

; Name...........: PSMGenericClient_GetSessionProperty

; Description ...: Fetches properties required for the session 

; Parameters ....: None

; Return values .: None

; ===============================================================================================================================

Func FetchSessionProperties() ; CHANGE_ME

if (PSMGenericClient_GetSessionProperty("Username", $TargetUsername) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

if (PSMGenericClient_GetSessionProperty("Password", $TargetPassword) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

if (PSMGenericClient_GetSessionProperty("Address", $TargetAddress) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

;if (PSMGenericClient_GetSessionProperty("Database", $TargetDatabase) <> $PSM_ERROR_SUCCESS) Then

;Error(PSMGenericClient_PSMGetLastErrorString())

;EndIf

EndFunc

 

1 accepted solution

Accepted Solutions

L1 Bithead

Hi,

 

You can use Oracle SQL Developer PSM from the marketplace, try it, and configure the AppLocker with the exceptions:

https://community.cyberark.com/marketplace/s/#a35Ht0000018rzEIAQ-a39Ht000004GLHBIA4

 

https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/psm_oracle_sql.htm?tocpath=Administrator%7CComponents%7CPrivileged%20Session%20Manager%7CPSM%20Connectors%7CDatabases%7C_____5#ConfiguretheAppLockerforOracleSQLDeveloper

 

This works for me.

 

View solution in original post

6 REPLIES 6

L1 Bithead

Hi,

 

You can use Oracle SQL Developer PSM from the marketplace, try it, and configure the AppLocker with the exceptions:

https://community.cyberark.com/marketplace/s/#a35Ht0000018rzEIAQ-a39Ht000004GLHBIA4

 

https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/psm_oracle_sql.htm?tocpath=Administrator%7CComponents%7CPrivileged%20Session%20Manager%7CPSM%20Connectors%7CDatabases%7C_____5#ConfiguretheAppLockerforOracleSQLDeveloper

 

This works for me.

 

L7 Applicator

Hi @Maharram Najafov​ 

 

Please check that the necessary JRE or JDK version is installed on the PSM server in the location is accessible using PSMShadowUser.

 

Also log in to the PSM server and manually try to launch sqldeveloper.exe using one of the PSMShadowsUser. If it fails to launch there, it will fail in the AutoIt script.

 

Verify the permission on C:\sqldeveloper folder.

 

Please put all the AppLocker rules in Audit mode and then try to run AutoIT script as a connector.

 

Hope it helps !

SQL Developer 24.3.1 is supported by this connection component ?

L4 Transporter

@Maharram Najafov​ 

 

Please use SQL developer CC available from marketplace which is straight forwrd to work with,

I am sharing the link for question which was resolved earilier for similiar issue

 

https://community.cyberark.com/s/question/0D7Vy00000B6iODKAZ/detail?fromEmail=1&s1oid=00D300000000HNg&s1nid=0DB50000000TRHA&s1uid=005Ht00000AignN&s1ext=0&emkind=chatterBestAnswerNotification&emtm=1753347618327

 

  • Just make sure SQLdeveloper execulatble is whitelisted in applocker
  • PSMShadowUsers are having permission to execute , list & read on the folder

 

L4 Transporter

@Maharram Najafov​ 

 

Please use SQL developer CC available from marketplace which is straight forwrd to work with,

I am sharing the link for question which was resolved earilier for similiar issue

 

https://community.cyberark.com/s/question/0D7Vy00000B6iODKAZ/detail?fromEmail=1&s1oid=00D300000000HNg&s1nid=0DB50000000TRHA&s1uid=005Ht00000AignN&s1ext=0&emkind=chatterBestAnswerNotification&emtm=1753347618327

 

  • Just make sure SQLdeveloper execulatble is whitelisted in applocker
  • PSMShadowUsers are having permission to execute , list & read on the folder

 

Yes is supported: https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/psm_oracle_sql.htm?tocpath=Administrator%7CComponents%7CPrivileged%20Session%20Manager%7CPSM%20Connectors%7CDatabases%7C_____5#ConnectionComponentsettingsinPVWA

  • 1 accepted solution
  • 105 Views
  • 6 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!