Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

bpbkar32 holds exe from executing

Updated: 21 May 2010 | 6 comments
GuruPrasadNS's picture
0 0 Votes
Login to vote

hi,

i am trying to use bpstart_notify batch file to launch, say, regedit or notepad program, before a backup starts - note this I am doing a test and found backup doesn't start and fails with "client timed out waiting for bpstart_notify to complete(74)". At the client-side, found that bpbkar32 process still running during this waiting period along with the program i am trying to call (notepad / regedit). Also tried using dir/p in the bpstart_notify batch file. Why is this happening?

I am doing this because, I am trying to integrate EV backup and NetBackup (6.5) Enterprise. Here EV will be put into readonly and readwrite mode using evopmode.bat file before and after backup starts and ends. bpstart_notify would contains evopmode.bat readonly and bpend_notify would contains evopmode.bat readwrite. evopmode.bat file contains putting storage service to offline and change few registry dwords values using reg add command.

I am failing to execute evopmode.bat file using bpstart_notify.bat. Can anybody help, please?

 

Guru.

Comments

J.Hinchcliffe's picture
12
Mar
2009
0 Votes 0
Login to vote

just how are you going to use notepad in a script

If you invoke notepad in your script, then notepad is going to open, and require someone to do something then CLOSE notepad before the script can continue.  I can see this as causing the time out because note might get opened but nobody is there is close it.

you need to use awk, or 'here' files or something that makes a file for you to read but I don't see how you could open notepad and expect anything else to happen.

Can you explain more what you are really trying to do?

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

GuruPrasadNS's picture
12
Mar
2009
0 Votes 0
Login to vote

actually what i need is

i want to execute evopmode.bat from bpstart_notify.bat.

as evopmode.bat is not being executed i tried putting notepad, dir/p, mkdir test, like this to test and see whether bpstart_notify.bat is really working. but what i found is notepad, dir/p did not execute but "mkdir test" did work. what found while executing notepad is that bpbkar32 as well as notepad process were found in the running process list in background but notepad application not launched.

bpstart_notify.bat will contain only;

cd\
cd "Program Files\Enterprise Vault"
evopmode.bat readonly
 
 

In evopmode.bat i have only;

@echo off
REM ================================================================================================================
REM  EVOPMODE.BAT
REM ================================================================================================================

SETLOCAL
REM ================================================================================================================
REM  The lists of tasks and services that will be stopped and started when changing Enterprise Vault operation modes
REM  are set in the following variables:
REM
REM    TASKS_LIST     - Tasks that will be stopped and started when entering read-only or read-write mode
REM    SERVICES_LIST  - Services that will be stopped and started when entering read-only or read-write mode
REM
REM  THESE LISTS WILL NEED EDITING TO MATCH THE REQUIREMENTS OF THE PARTICULAR ENTERPRISE VAULT INSTALLATION.
REM
REM  If you wish to eliminate the need to control individual tasks then TASKS_LIST can be empty and the
REM  "Enterprise Vault Task Controller Service" can be added to SERVICES_LIST.
REM  In this case make sure that all the Enterprise Vault tasks are set to Automatic startup.
REM
REM ================================================================================================================

REM ================================================================================================================
REM  Set CLUSTER_TYPE to one of 'NONE', 'MSCS' or 'VCS'
REM ================================================================================================================
SET CLUSTER_TYPE=MSCS
REM ================================================================================================================
REM  Set the appropriate name for the Enterprise Vault SERVERNAME.
REM  If in a cluster, set SERVERNAME to the appropriate virtual server name
REM ================================================================================================================
SET SERVERNAME=EVCLUSTER

REM ================================================================================================================
REM  The following setting is only needed for clustered Enterprise Vault installations.
REM  Take extra care with VCS cluster names as they are case sensitive.
REM ================================================================================================================
SET CLUSTERNAME=EVCLUSTER
REM ================================================================================================================
REM  The following setting is only needed for clustered Enterprise Vault installations.
REM  For MSCS this should be the resource group for the virtual server.
REM  For VCS this should be the service group for the virtual server. Take extra care as this is case sensitive.
REM ================================================================================================================
SET CLUSTERGROUP=EVSERVER

REM ================================================================================================================
REM  List all services here that are to be restarted when setting Enterprise Vault into read-only or read-write
REM  mode. The storage service is the only service that has to be restarted but other EV services can be added if
REM  desired.
REM  Take extra care with VCS because the generic service resource names are case sensitive.
REM ================================================================================================================
SET SERVICES_LIST=
SET SERVICES_LIST=%SERVICES_LIST% "Enterprise Vault Storage Service"

GOTO :MAIN

REM ==========================
:READONLY_MODE
REM ==========================
CALL :%SERVICE_STOP_FN% %SERVICES_LIST%
CALL :SETEVREG %SERVERNAME% 0
IF "%NOEXECUTE%" NEQ "TRUE" echo Updated registry for Enterprise Vault read-only mode
CALL :%SERVICE_START_FN% %SERVICES_LIST%
GOTO :END
REM ==========================
:READWRITE_MODE
REM ==========================
CALL :%SERVICE_STOP_FN% %SERVICES_LIST%
CALL :SETEVREG %SERVERNAME% 1
IF "%NOEXECUTE%" NEQ "TRUE" echo Updated registry for Enterprise Vault read-write mode
CALL :%SERVICE_START_FN% %SERVICES_LIST%
GOTO :END

REM ==========================
:SETEVREG
REM ==========================
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnableArchive /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnableCrawler /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnableExpiry /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnableFileWatch /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnablePSTMigrations /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnableReplayIndex /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnableRestore /t REG_DWORD /d %2
CALL :DOCMD_NUL reg add "
\\%1\HKLM\Software\KVS\Enterprise Vault\Storage" /f /v EnablePSTMigrations /t REG_DWORD /d %2 GOTO :END
REM ==========================
:EVSERVICE_START
REM ==========================
IF x%1 EQU x GOTO :END
CALL :DOCMD EVService start %SERVERNAME% %1
SHIFT
GOTO :EVSERVICE_START

REM ==========================
:EVSERVICE_STOP
REM ==========================
IF x%1 EQU x GOTO :END
CALL :DOCMD EVService stop %SERVERNAME% %1
SHIFT
GOTO :EVSERVICE_STOP
REM ==========================
:MSCS_ONLINE
REM ==========================
IF x%1 EQU x GOTO :END
REM Remove spaces and quotes from the service name and form the resource name
SET RESNAME=%1
SET RESNAME=%RESNAME: =%
SET RESNAME=%CLUSTERGROUP%-%RESNAME:~1,-1%
CALL :DOCMD cluster /cluster:%CLUSTERNAME% resource "%RESNAME%" /online
SHIFT
GOTO :MSCS_ONLINE

REM ==========================
:MSCS_OFFLINE
REM ==========================
IF x%1 EQU x GOTO :END
REM Remove spaces and quotes from the service name and form the resource name
SET RESNAME=%1
SET RESNAME=%RESNAME: =%
SET RESNAME=%CLUSTERGROUP%-%RESNAME:~1,-1%
CALL :DOCMD cluster /cluster:%CLUSTERNAME% resource "%RESNAME%" /offline
SHIFT
GOTO :MSCS_OFFLINE
REM ==========================
:VCS_ONLINE
REM ==========================
IF x%1 EQU x GOTO :END
REM Remove spaces and quotes from the service name and form the resource name
SET RESNAME=%1
SET RESNAME=%RESNAME: =%
SET RESNAME=%CLUSTERGROUP%-%RESNAME:~1,-1%
CALL :GET_VCS_LASTONLINE %CLUSTERNAME% %RESNAME%
IF x%VCS_LASTONLINE% EQU x ECHO %RESNAME% not onlined - cannot get VCS LastOnline attribute && SHIFT && GOTO :VCS_ONLINE
CALL :DOCMD hares -online "%RESNAME%" -sys %VCS_LASTONLINE%
CALL :DOCMD hares -wait "%RESNAME%" State ONLINE -sys %VCS_LASTONLINE%
SHIFT
GOTO :VCS_ONLINE

REM ==========================
:VCS_OFFLINE
REM ==========================
IF x%1 EQU x GOTO :END
REM Remove spaces and quotes from the service name and form the resource name
SET RESNAME=%1
SET RESNAME=%RESNAME: =%
SET RESNAME=%CLUSTERGROUP%-%RESNAME:~1,-1%
CALL :GET_VCS_LASTONLINE %CLUSTERNAME% %RESNAME%
IF x%VCS_LASTONLINE% EQU x ECHO %RESNAME% not offlined - cannot get VCS LastOnline attribute && SHIFT && GOTO :VCS_OFFLINE
CALL :DOCMD hares -offline "%RESNAME%" -sys %VCS_LASTONLINE%
CALL :DOCMD hares -wait "%RESNAME%" State OFFLINE -sys %VCS_LASTONLINE%
SHIFT
GOTO :VCS_OFFLINE
REM ==========================
:GET_VCS_LASTONLINE
REM ==========================
SET VCS_CLUSTER=%1
SET VCS_RES=%2
SET VCS_LASTONLINE=
for /F "tokens=1,2,3* delims= " %%A IN ('hares -display "%VCS_RES%" -clus "%VCS_CLUSTER%"') DO CALL :FIND_VCS_LASTONLINE_ATTRIBUTE %VCS_RES% %VCS_CLUSTER% %%A %%B %%C %%D
GOTO :END

REM ==========================
:FIND_VCS_LASTONLINE_ATTRIBUTE
REM ==========================
IF "%1" NEQ "%3" GOTO :END
IF "%2" NEQ "%5" GOTO :END
IF "%4" NEQ "LastOnline" GOTO :END
SET VCS_LASTONLINE=%6
GOTO :END
REM ==========================
:DOCMD
REM ==========================
set EXCMD=%*
IF "%NOEXECUTE%" EQU "TRUE" echo %EXCMD%
IF "%NOEXECUTE%" NEQ "TRUE" %EXCMD%
GOTO :END

REM ==========================
:DOCMD_NUL
REM ==========================
set EXCMD=%*
IF "%NOEXECUTE%" EQU "TRUE" echo %EXCMD%
IF "%NOEXECUTE%" NEQ "TRUE" %EXCMD% > nul
GOTO :END
REM ==========================
:MAIN
REM ==========================
IF "%CLUSTER_TYPE%" EQU "MSCS" GOTO :MSCS
IF "%CLUSTER_TYPE%" EQU "VCS" GOTO :VCS

REM Non cluster
SET SERVICE_START_FN=EVSERVICE_START
SET SERVICE_STOP_FN=EVSERVICE_STOP
GOTO :MAIN_CONTINUE
:MSCS
SET SERVICE_START_FN=MSCS_ONLINE
SET SERVICE_STOP_FN=MSCS_OFFLINE
GOTO :MAIN_CONTINUE

:VCS
SET SERVICE_START_FN=VCS_ONLINE
SET SERVICE_STOP_FN=VCS_OFFLINE
GOTO :MAIN_CONTINUE
:MAIN_CONTINUE
SET NOEXECUTE=FALSE
IF /I "%2" EQU "noexecute" SET NOEXECUTE=TRUE

IF /I "%1" EQU "readonly" GOTO :READONLY_MODE
IF /I "%1" EQU "readwrite" GOTO :READWRITE_MODE
ECHO "Usage: EVOPMODE readwrite|readonly [noexecute]"

:END
CRZ's picture
13
Mar
2009
0 Votes 0
Login to vote

How long does it take this

How long does it take this script to complete when you call it on its own from the command line?  Maybe it's just a matter of increasing the bpstart timeout.

 

DISCLAIMER: I'm totally guessing here.  Your script is way above my head.  :)

 

J.Hinchcliffe's picture
13
Mar
2009
0 Votes 0
Login to vote

more standard way of evoking a script

you said your notify file contains

cd\
cd "Program Files\Enterprise Vault"
evopmode.bat readonly
 
the more standndard way of running a script is to use full path
you might have better luck with
 
C:\Program Files\Enterpris Vault\evopmode.bat readonly
 
but with the 'readonly' option it looks like the bat file is only read and NOT executed.
 

I don't have to know how to spell....I work on Unix.
NetBackup 7.0.1 - AIX & Windows

TimBurlowski's picture
13
Mar
2009
1 Vote +1
Login to vote

Question

I wonder if the problem isn't that the script is getting run as "local system" and that account doesn't have enough permission to do what you want. In that case it might work as you and not work as "local system".

 

 

Technical Product Manger Symantec

GuruPrasadNS's picture
31
Jul
2009
0 Votes 0
Login to vote

now using windows schedule

hi,

now i am using windows schedules to take care of running the scripts. bpstart has not come to my help anywhere. still if anybody has any help in this regard and help me out of depending on windows schedules would be appreciated. increasing the timeout and checking the permissions are all done and even symantec support finally gave it up. : (