Logon with ECTR fails with error "Connect to SAP gateway failed"
Analyze the issue
This sequence diagram shows how a SAP GUI is opened from ECTR:
Possible Reason 1
Firewall issue on server side
Possible Reason 2
As of SAP GUI 7.20, 7.30 and 7.40, there is a security check before starting the SAP GUI. If the you click on 'Deny' or if in the SAP GUI security settings the option is set to 'Deny', you will get the same dump
Possible Reason 3
When the sapgui.exe delegates, it always starts SAP Logon, no matter whether SAP Logon Pad is already running or not.
Possible Reason 4
RFC connection fails in NAT environment.
Possible Reason 5
An registry setting at the frontend blocks the SAP GUI.
Possible Reason 6
No SAP GUI installed at all on frontend PC.
Possible Reason 7
No SAP GUI resources available any more on frontend PC.
Lot of parallel threads in ECTR can call SAPGui transactions e.g. when opening the structure tab of a document.
Generate JCO Log Files
Change these settings in …\customize\config\SAPlogon.txt of ECTR:
Generate Backend Log Files
- ABAP-Server: SM50 (Work Process) - Activate the WP-Trace for all DIA Processes (Component M, A, Y, D) and set the Dispatcher-Trace to 2
- SMGW (Gateway Monitor) --> Goto --> Trace --> Gateway --> Increase Level
Switch on SAP GUI Log Files
- In SAP Logon open the dialog "Optionen" -> "Modus Trace" -> "RFC (rfc*.trc)"
Solution 1: Search for firewall issues in Gateway Trace files
Check for Traces in SM21 Dumps in ST22 or Traces in transaction SMGW. This can give you hints how to change the firewall settings.
Solution 2: Fix local SAP GUI issues
- Check the SAP GUI security setting using "Options" - "Settings" - "Security Settings". Ensure all Actions are ALLOWED or Disable the Security Settings
- Apply the latest SAP GUI patch
- Run a workstation Front End check. Start Menu -> Run NwCheckWorkstation.exe. If any errors are reported at the end of the installation check, reinstall the GUI with the Addons.
Solution 3: Fix sapgui.exe delegate issues
Please check this SAP note 844095 and the other occurrences of the registry key "StartSaplogon". Maybe you have to change the value for that key "StartSaplogon".
Note that on 64bit operating systems keys under HKEY_LOCAL_MACHINE have to be created in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP\SAPGUI.
Solution 4: Fix NAT issues
Check own network address in SMGW:
Read note 211365 - RfcAttach Fehler beim DNS oder muliple hostnames
- abap/hostname_for_sapgui = <full qualified hostname dns>
- gw/alternative_hostnames = <full qualified hostname dns>
If this not helps, read note 1760329:
- Maintain the NAT IP as an alternative IP address for the servers in the transaction SMLG within the corresponding logon group as per the recommendation of note: 364552 Loadbalancing does not find application server
- and additionally maintain the NAT IP within the instance profile of the corresponding instance with the parameter gw/alternative_hostnames. See note: 148832 IP address conversion with a firewall
- To solve problems related to RFC load balancing in a NAT environment please follow the recommendations of the notes:
- 1418278 RFC load distribution does not work via NAT
- 593058 New RFC load balancing procedure
Solution 5: Fix local registry issues
Check this registry key on frontend computer: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP\SAPGUI. Set it to StartSaplogon DWord Value 0.
Solution 6: Install the latest SAP GUI
Load latest SAP GUI from https://launchpad.support.sap.com/#/softwarecenter and install it.
Solution 7: Use RFC calls instead of GUI calls
Use "sap.logon.SapGui* = 0" in saplogon.txt. ( 0- NoGUI, 2-GUI) for all systems.