on 07-18-2016 12:34 PM
Hello,
On a daily basis we restore the Training System to a VM Check Point backup, taken some days ago.
This script runs on Windows Server 2012, and SQL Server 2012.
The script consists of the following:
----------------------------------------------------------
sc config "SAPEQ1_00" start=Auto
sc config "SAPEQ1_01" start=Auto
timeout /t 15 /nobreak
net start "SAPEQ1_00"
net start "SAPEQ1_01"
startsap name=EQ1 nr=01 SAPDIAHOST=<Hostname>
startsap name=EQ1 nr=00 SAPDIAHOST=<Hostname>
startsap name=DAA nr=98 SAPDIAHOST=<Hostname>
-------------------------------------------------------------
the “sc config*” and “net start*” work perfectly, but unless eq1adm has been used to logon the SAP system does not start. Using the Windows Task Scheduler.
Has anyone seen this behavior before?
The task to run the script is run from the Task Scheduler and is configured to "Run wether user is logged on" and "Run with Highest privileges"
with <sid>adm
Hello David,
Are the Windows Services SAPEQ1_00 and 01 being started as "SAPServiceEQ1"?
Do you see any error when the issue is simulated? Where? What is the error?
Instead of "startsap", have you tried to use "sapcontrol -nr <instance> -function Start" at your script?
Regards,
Isaías
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Isaias,
I had a similar situation. Using the power-shell script for MS Security Patches and subsequent restart and was getting the same "HTTP error, HTTP/1.1 401 Unauthorized" which was fixed by adding the service* parameters following Note 2010805 - SAP MMC common issues .
Since the script was calling the sapcontrol from one SAP system and taking care of all the other systems in the landscape I had to add the sidadm of the central system in the profile for all the other managed system.
The script is working fine ever since then. In case there is something which I need to re-check please do let me know.
Thanks,
Manas
Hello Manas,
If one script would start different systems, then it makes sense to set "service/admin_users".
Setting "service/protectedwebmethods = OSExecute" is basically disabling the authentication requirement to any method except "OSExecute".
This means that any user would be able to call the method "Stop", for example, which could lead to a production down situation (if the involved system is a productive system ).
Setting "service/protectedwebmethods" can be used as emergency workarounds (e.g., during upgrades). But it should usually not be set.
Cheers!
Isaías
Thanks Isaias, We thought of this while setting up the script but the access to Production system is restricted and they are all behind a security software. When you say any user will be able to call the method "Stop" does that mean for those who are access to the VM on which the instance is running.
Thanks again for providing your inputs, I will check these scenarios ASAP.
Thanks,
Manas
Hello Manas,
Anyone who can reach the server through the TCP/IP port "5XX13" or "5XX14" would be able to call the "Stop" method (or any method other than "OSExecute", actually).
* "XX" stands for the instance number
By "reach" I mean not only locally (while logged on to the SAP server itself), but remotely as well.
Regards,
Isaías
Hi David,
Can you check if the below parameters are maintained in your SAP system Default/Instance profile:
Thanks,
Manas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check Point 4 of Note 2010805 - SAP MMC common issues and maintain parameter service/protectedwebmethods = OSExecute in start profile as well.
I believe currently you must be prompted for password even if you try to stop/start from MMC.
Thanks,
Manas
Hi Guys,
Thank you for your advice.
I am logging in as eq1adm and the user ID is a domain account but also exists in the Local Admins Group.
I set the Service parameters in the DEFAULT profile and also in the host_profile in the hostctrl\exe folder. I stopped and Started SAP and also the hostctrl services, bit was still getting the error:
FAIL: HTTP error. HTTP/1.1 401 Unauthorized.
However this morning I ran the following:
"C:\Program Files\SAP\hostctrl\exe\sapcontrol.exe" -nr 00 - host <host> -function Start
"C:\Program Files\SAP\hostctrl\exe\sapcontrol.exe" -nr 01 -host <Host> -function Start
And then this time the system started
Hi David
Though you have solved the error, kindly look at the SAP note 1565645 - SAP composite note: sapcontrol
Regards
Prithviraj
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.