sybase relay server troubleshooting guide - archive.sap.com · the sybase relay server can be...

41
SAP How-To Guide Sybase Relay Server Troubleshooting Guide Applicable Releases: Sybase Relay Server 12 Topic Area: SAP Mobile Platform (Sybase Unwired Platform and Afaria) Version 1.0 September 2012

Upload: dobao

Post on 10-May-2019

229 views

Category:

Documents


0 download

TRANSCRIPT

SAP How-To Guide

Sybase Relay Server

Troubleshooting Guide

Applicable Releases:

Sybase Relay Server 12

Topic Area:

SAP Mobile Platform (Sybase Unwired Platform and Afaria)

Version 1.0

September 2012

i

© Copyright 2012 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the United States and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and other countries.

Oracle and Java are registered trademarks of Oracle and its affiliates.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the

Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,

VideoFrame, and MultiWin are trademarks or registered trademarks

of Citrix Systems Inc.

HTML, XML, XHTML, and W3C are trademarks or registered

trademarks of W3C®, World Wide Web Consortium, Massachusetts

Institute of Technology.

Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-

Touch, Objective-C, Retina, Safari, Siri, and Xcode are trademarks or

registered trademarks of Apple Inc.

IOS is a registered trademark of Cisco Systems Inc.

RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold,

BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm, BlackBerry

Storm2, BlackBerry PlayBook, and BlackBerry App World are

trademarks or registered trademarks of Research in Motion Limited.

Google App Engine, Google Apps, Google Checkout, Google Data

API, Google Maps, Google Mobile Ads, Google Mobile Updater,

Google Mobile, Google Store, Google Sync, Google Updater, Google

Voice, Google Mail, Gmail, YouTube, Dalvik and Android are

trademarks or registered trademarks of Google Inc.

INTERMEC is a registered trademark of Intermec Technologies

Corporation.

Wi-Fi is a registered trademark of Wi-Fi Alliance.

Bluetooth is a registered trademark of Bluetooth SIG Inc.

Motorola is a registered trademark of Motorola Trademark Holdings

LLC.

Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company.

Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.

SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials.

SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages.

SAP NetWeaver “How-to” Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP NetWeaver. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting.

Any software coding and/or code lines / strings (“Code”) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

Disclaimer:

Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components.

Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.

ii

Document History

Document Version Description

1.00 First official release of this guide

iii

Typographic Conventions

Type Style Description

Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.

Cross-references to other documentation

Example text Emphasized words or phrases in body text, graphic titles, and table titles

Example text File and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

Example text User entry texts. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example

text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

EXAMPLE TEXT Keys on the keyboard, for

example, F2 or ENTER.

Icons

Icon Description

Caution

Important

Note

Recommendation or Tip

Example

iv

Table of Contents

1. Scenario ................................................................................................................................ 1

2. Background Information ..................................................................................................... 2

3. Prerequisites ........................................................................................................................ 5

4. Step-by-Step Procedure ...................................................................................................... 6

4.1 Verify ............................................................................................................................. 8 4.1.1 Relay Server : Verify required IIS Components ............................................... 8 4.1.2 Relay Server : Verify IIS Application Pool ........................................................ 9 4.1.3 Relay Server : Verify IIS Application .............................................................. 10 4.1.4 Relay Server : Verify ISAPI and CGI restrictions ........................................... 12 4.1.5 Relay Server : Update IIS Configuration ........................................................ 13

4.2 Test ............................................................................................................................. 14 4.2.1 Relay Server : Test IIS Home Page ............................................................... 14 4.2.2 Relay Server : Test URL with rs_server.dll .................................................... 14 4.2.3 Relay Server : Test URL with rs_client.dll ..................................................... 15 4.2.4 Mobile Device : Test IIS Home Page ............................................................. 15 4.2.5 Mobile Device : Test URL with rs_client.dll .................................................... 16 4.2.6 SUP Server : Test IIS Home Page ................................................................ 16 4.2.7 SUP Server : Test URL with rs_server.dll ...................................................... 17

4.3 Check Logs ................................................................................................................. 18 4.3.1 Relay Server : Check Relay Server log ......................................................... 18 4.3.2 Relay Server : Check IIS log .......................................................................... 19 4.3.3 Relay Server : Check Microsoft Event Logs .................................................. 20 4.3.4 SUP Server : Check RSOE log ...................................................................... 20 4.3.5 SUP Server : Check SUP logs ....................................................................... 22 4.3.6 SUP Server : Check Microsoft Event Logs .................................................... 23 4.3.7 Network : Check Firewall logs ....................................................................... 23 4.3.8 Mobile Device : Check Moca-log ................................................................... 24

4.4 Check Settings............................................................................................................ 25 4.4.1 Relay Server : Check Local Firewall / Antivirus ............................................. 25 4.4.2 Relay Server : Check DEP............................................................................. 26 4.4.3 Relay Server : Check Windows Account ....................................................... 27 4.4.4 Relay Server : Check ApplicationHost.config ................................................ 27 4.4.5 Relay Server : Check Relay Server version .................................................. 27 4.4.6 Relay Server : Check Multiple Network Cards ............................................... 28 4.4.7 SUP Server : Check Local Firewall / Antivirus ............................................... 28 4.4.8 SUP Server : Check RSOE version ............................................................... 29 4.4.9 Network : Check Firewall Ports and Proxies .................................................. 29

4.5 Run Traces ................................................................................................................. 30 4.5.1 Relay Server : Run netstat ............................................................................. 30 4.5.2 Relay Server : Run Wireshark ....................................................................... 30 4.5.3 SUP Server : Run netstat............................................................................... 33 4.5.4 SUP Server : Run Wireshark ......................................................................... 33 4.5.5 Network : Run tracert ..................................................................................... 33

5. Appendix ............................................................................................................................ 35

Sybase Relay Server Troubleshooting Guide

September 2012 1

1. Scenario

The Sybase Relay Server is a component in the Sybase mobile landscape;

As such, the Sybase Relay Server serves two purposes;

1. Reverse proxy; the Sybase Relay Server “hides” the SUP and Afaria servers from direct access by malicious attackers

2. Load Balancer; the Sybase Relay Server distributes the load of the incoming traffic over multiple SUP and/or Afaria nodes

In case the Sybase Relay Server does not work correctly after installation and configuration, some troubleshooting is in order.

The different components that need to be investigated when troubleshooting a Sybase Relay Server installation are as follows;

Sybase Relay Server itself

SUP and/or Afaria server

The network, including firewalls, forward proxies,…

The mobile device

This document is intended as a guide for this troubleshooting process.

CAUTION

This guide is not intended as an installation guide for the Sybase Relay Server.

I would like to acknowledge and thank Andreas Kuhn for his significant contribution to this guide.

More information can be found on http://r2d2.sybase.com/relayserver_

Sybase Relay Server Troubleshooting Guide

September 2012 2

2. Background Information

Before starting with the troubleshooting process, it’s a good idea to become familiar with the inner workings of the Sybase Relay Server.

This section offers a deeper look into the files, dll’s, ports, settings,… that will be investigated during the troubleshooting process.

For readers already familiar with these concepts, please skip to section 4 Step-by-Step Procedure.

The Sybase Relay Server can be installed as a plug-in on either Windows Internet Information Services (IIS) or Apache HTTP Server.

Note

This document will focus on the troubleshooting the Relay Server on Windows IIS.

The installation files of the Sybase Relay Server consist of the following;

an executable – rshost.exe

a configuration file – rs.config

some dll’s – the most important ones are rs_client.dll and rs_server.dll.

They are copied onto a Windows Server host where the IIS is also located.

The main solution components on the host of the Sybase Relay Server are as follows;

A Windows IIS will be used to host the Sybase Relay Server solution. The executable and dll’s that make up the Sybase Relay Server solution are served up by this IIS.

rs_client.dll : this is the dll that mobile devices will connect to when communicating with the Relay Server

rs_server.dll : this is the dll that SUP and/or Afaria nodes will connect to when communicating with the Relay Server

rshost.exe : the executable that runs the Sybase Relay Server functionality

a Relay Server Windows Service : the aforementioned rshost.exe will be run as a Windows Service that can be configured to start up manually or automatically when the Windows host server starts.

Sybase Relay Server Troubleshooting Guide

September 2012 3

Here’s the same picture of the Sybase Relay Server but this time with the other components (SUP, network,…) added;

Now let’s concentrate on the SUP/Afaria side of the solution.

Note

This document will focus on a Relay Server installation connecting to one SUP node using HTTP

On the SUP node we find following services;

The SUP services hosting RBS, MBS or DCN mobile communication traffic.

Each type of mobile traffic listens on a dedicated (default) port; RBS listens on port 2480, MBS listens on port 5001 and DCN listens on port 8000.

Relay Server Outbound Enablers (RSOE’s) ; these are processes that connect to the Relay Server on the one hand and to the SUP Services on the other hand.

The RSOE’s function as an intermediate link in the communication between the Sybase Relay Server and the SUP node.

Note

The picture on the left shows one RSOE for each

communication type.

However, it’s advised to have multiple RSOE’s for

each communication type; for example 3 RSOE’s

for RBS, 3 RSOE’s for MBS and 3 RSOE’s for

DCN.

Sybase Relay Server Troubleshooting Guide

September 2012 4

Here’s the same picture of the SUP server but this time with the other components (Relay Server, network,…) added again;

Finally, here’s the full picture;

Sybase Relay Server Troubleshooting Guide

September 2012 5

3. Prerequisites

This guide focuses on the following setup;

One Sybase Relay Server on Windows IIS 7.5 (no Relay Server farm)

Connection to one SUP node (of version SUP 2.1.3)

Using HTTP communication

Mobile device connection over the (outside) internet

However, most of the troubleshooting steps can also be executed for other setups.

Before starting the troubleshooting, make sure that the Relay Server is installed correctly.

Installation instructions can be found here;

http://r2d2.sybase.com/relayserver_/index.htm#page=1.1_Windows.htm

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01698.0210/doc/html/dre1317059457812.html

Note

The installation of the Relay Server itself does not differ for SUP or Afaria

After the installation, make sure the configuration of the Relay Server on the SUP is executed correctly;

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01092.0213/doc/html/aba1297710335137.html

Afterwards, configure the RSOE’s on the SUP server;

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01092.0213/doc/html/aba1297700144168.html

Before running any tests, always make sure that all the required solution components are running;

On the Sybase Relay Server host, in the IIS Manager, check if the IIS is running

On the Sybase Relay Server host, check if the Relay Server Windows Service is running

On the SUP back end, check if the RSOE’s are running

Sybase Relay Server Troubleshooting Guide

September 2012 6

4. Step-by-Step Procedure

The troubleshooting process consists of a sequence of steps;

Tip

It’s advised to follow this sequence of steps during the first troubleshooting cycle; if the problem is not resolved after this, separate steps can be re-executed where necessary.

1. Verify

First verify if the Relay Server was installed correctly as a plug-in to the IIS.

2. Test

Next, perform some basic tests which should give already an idea if there is a problem with the Relay Server installation, the communication between the device and the Relay Server or the communication between the SUP server and the Relay Server

3. Check Logs

Logs will provide the most useful information when troubleshooting the Relay Server. Check the logs before and after tests.

4. Check Settings

Some settings can be checked in addition to the installation settings checked in the first phase.

5. Run Traces

As a final resort, trace the mobile data as it travels from the device to the Relay Server to the SUP server over the company’s network.

Sybase Relay Server Troubleshooting Guide

September 2012 7

This image provides an overview of all the troubleshooting steps for each phase;

Sybase Relay Server Troubleshooting Guide

September 2012 8

4.1 Verify

Before starting the troubleshooting process, double check the configuration of the Sybase Relay Server on the IIS.

The steps in this section are based on the installation instructions for the Sybase Relay Server that are referred to in section 3. Prerequisites of this guide.

For an up to date version of the guidelines below, please refer to the URL mentioned in section 3. Prerequisites.

4.1.1 Relay Server : Verify required IIS Components

On the host of the Sybase Relay Server, open the Server Manager and open the Features Dialog.

You don't need any Features installed for the native Sybase Relay Server function, but if features are selected here, make sure they follow the guideline below:

Net Framework 3.5.1

Non-HTTP Activation

Important

Make sure HTTP Activation is not installed

Windows Process Activation Service

Process Model

NET Environment

Configuration APIs

Open the Server Manager and verify that both the Web Server (IIS) IIS Role and the following IIS Role Features are at least installed:

Common HTTP Features

Static Content

Default Document

HTTP Errors

Important

Make sure WebDAV Publishing is not installed

Application Development

ISAPI Extensions

Health and Diagnostics

HTTP Logging

Request Monitor

Security

Sybase Relay Server Troubleshooting Guide

September 2012 9

Request Filtering

Performance

Static Content Compression

Management Tools

IIS Management Console

IIS Management Scripts and Tool

IIS 6 Management Compatibility

IIS 6 Metabase Compatibility

IIS 6 WMI Compatibility

IIS 6 Scripting Tools

IIS 6 Management Console

4.1.2 Relay Server : Verify IIS Application Pool

Open the Internet Information Services (IIS) Manager Check that an Application Pool is present with the following attributes:

Name: RelayServer

.NET Framework Version: .NET Framework v2.0.50727

Managed pipeline mode: Integrated

Open the Advanced Settings of this Application Pool and check the following attributes:

(General).Queue Length 65535

(CPU).Limit Interval (minutes) 0

(Process Model).Identity: ApplicationPoolIdentity

(Process Model).Idle Time-out (minutes): 0

(Process Model).Maximum Worker Processes: 20

(Process Model).Ping Enabled: false

(Process Model).Ping Maximum Response Time (seconds):

90

(Process Model).Ping Period (seconds): 30

(Rapid-Fail Protection).Enabled: false

(Recycling).Disable Overlapped Recycle: true

(Recycling).Regular Time Interval (minutes): 0

Sybase Relay Server Troubleshooting Guide

September 2012 10

4.1.3 Relay Server : Verify IIS Application

Note

When installing the Sybase Relay Server, you can choose to install it as part of the Default Web Site (of IIS) or you can create a new web site for the Sybase Relay Server. This guide covers the first option (use the Default Web Site).

In the IIS Manager, select the Relay Server application, called ias_relay_server (under the node Default Web Site) and check the properties;

Note

The Physical path could be different in your installation.

Now, with the ias_relay_server application still selected, open the Request Filtering settings and go to Edit Feature Settings.

Check the following attributes:

Maximum allowed content length (Bytes): 2147483647

Maximum query string (Bytes): 65536

Sybase Relay Server Troubleshooting Guide

September 2012 11

Now, with the ias_relay_server application still selected, open the Handler Mappings and go to Edit Feature Permissions.

Check the following attributes and verify that only Script and Execute are checked.

Sybase Relay Server Troubleshooting Guide

September 2012 12

Now, with the ias_relay_server application still selected, open the SSL Settings and make sure , if applicable, Require SSL is not checked and Ignore Client certificates is selected.

4.1.4 Relay Server : Verify ISAPI and CGI restrictions

In the IIS Manager, highlight the Server Entry and open the ISAPI and CGI Restrictions.

Check if following 2 entries are available;

RS Server dll

Path: C:\Program Files\RelayServer\ias_relay_server\server\rs_server.dll

Description: RS Server DLL

Check “Allow extension path to execute”

RS Client dll

Path: C:\Program Files\RelayServer\ias_relay_server\client\rs_client.dll

Description: RS Client DLL

Check “Allow extension path to execute”

Note

The Physical path could be different in your installation.

Tip

If the installation files of your Relay Server also include the Relay Server monitor (in folder Monitor), you can also enable the Relay Server monitor here by exposing the Relay Server monitoring DLL. This monitor can be used for testing purposes; it’s better to disable it for productive use.

Sybase Relay Server Troubleshooting Guide

September 2012 13

4.1.5 Relay Server : Update IIS Configuration

During the installation, some application pool changes were made on the IIS.

To update the IIS server configuration, the adsutil.vbs must be run.

To be sure that the script is run, you can run this script again here.

First, in the IIS Manager, verify the web site ID of the Site that runs the Sybase Relay Server;

For example, the web site ID of this installation is 1.

Now, on the Sybase Relay Server host, open a command prompt as an Administrator. Look for the adsutil.vbs and execute this script.

Script location example: C:\Inetpub\AdminScripts

Script command: cscript adsutil.vbs set w3svc/1/uploadreadaheadsize 0

The command returns the current value of the uploadreadaheadsize variable.

Sybase Relay Server Troubleshooting Guide

September 2012 14

4.2 Test

In order to focus the troubleshooting process, start with some basic tests.

The tests that are included in this section should give you an idea if the problem is on the Relay Server itself or in the communication between the mobile device and the Relay Server or in the communication between the SUP server and the Relay Server. ...

4.2.1 Relay Server : Test IIS Home Page

On the Relay Server, check if the default homepage of the IIS can be reached in the browser.

In the browser, navigate to http://localhost/ and see if following image is displayed;

If this image does not show, there’s a problem with the IIS. Continue with concentrating troubleshooting on the IIS.

4.2.2 Relay Server : Test URL with rs_server.dll

On the Relay Server, navigate to the following URL;

http://<Relay Server IIS host>/ias_relay_server/server/rs_server.dll

You should see a screen like this;

Sybase Relay Server Troubleshooting Guide

September 2012 15

Note

The Overall Availability can also be “Partial” or “None”; in that case, check if all the RSOE’s are properly running and connected to the Relay Server

If this page does not show but instead an error page is shown, there’s a problem with the setup of the Sybase Relay Server on the IIS.

Continue with concentrating troubleshooting on the IIS or check the Relay Server Windows Service.

Tip

To get more information on the cause of the error, turn off “Show friendly HTTP Error Messages” in the settings of Internet Explorer, for example.

One possible problem could be the authorizations of the Windows account that is used to run the IIS-service. Make sure this account has proper authorizations to read the folders where the Sybase Relay Server executable and dll’s are located.

4.2.3 Relay Server : Test URL with rs_client.dll

On the Relay Server, navigate to the following URL;

http://<Relay Server IIS host>/ias_relay_server/client/rs_client.dll

You should see a screen like this;

If this screen does not show, proceed as described in the previous step (= step 4.2.2).

4.2.4 Mobile Device : Test IIS Home Page

Now, let’s turn to testing on the mobile device.

In the browser of the mobile device, check if the default homepage of the IIS can be reached.

Navigate to http://<Relay Server IIS host>/ and see if the IIS home page image is shown.

Sybase Relay Server Troubleshooting Guide

September 2012 16

Important

In this step we assume that the test of step 4.2.1 Relay Server : Test IIS Home Page was successful. If not, please go back to step 4.2.1 Relay Server : Test IIS Home Page.

If this image does not show, there is a problem.

Possible causes could be;

Some network setting on the mobile device is blocking access to the homepage of the IIS

The 80-port on the outside firewall in front of the Relay Server is blocked (the port 80 is the default one)

Some rule on the outside firewall is not granting access to the mobile device that is trying to connect over port 80 on the firewall

4.2.5 Mobile Device : Test URL with rs_client.dll

In the browser of the mobile device, navigate to the following URL;

http://<Relay Server IIS host>/ias_relay_server/client/rs_client.dll

You should see a screen like the one shown in step 4.2.3 Relay Server : Test URL with rs_client.dll

Note

In this step we assume that the test of step 4.2.3 Relay Server : Test URL with rs_client.dll was successful. If not, please go back to step 4.2.3 Relay Server : Test URL with rs_client.dll.

If this page does not show, please refer to the possible causes mentioned in step 4.2.4 Mobile Device : Test IIS Home Page.

4.2.6 SUP Server : Test IIS Home Page

On the SUP server, check if the default homepage of the IIS can be reached.

In a browser, navigate to http://<Relay Server IIS host>/ and see if the IIS home page image is shown.

Important

In this step we assume that the test of step 4.2.1 Relay Server : Test IIS Home Page was successful. If not, please go back to step 4.2.1 Relay Server : Test IIS Home Page.

If this image does not show, there is a problem.

Possible causes could be;

The DNS host name of the Relay Server can not be resolved when communicating from the SUP to the Relay Server

The 80-port on the firewall between the SUP and the Relay Server is blocked (the port 80 is the default one)

Sybase Relay Server Troubleshooting Guide

September 2012 17

4.2.7 SUP Server : Test URL with rs_server.dll

On the SUP server, navigate to the following URL in a browser;

http://<Relay Server IIS host>/ias_relay_server/server/rs_server.dll

You should see a screen like the one shown in step 4.2.2 Relay Server : Test URL with rs_server.dll.

Note

In this step we assume that the test of step 4.2.2 Relay Server : Test URL with rs_server.dll was successful. If not, please go back to step 4.2.2 Relay Server : Test URL with rs_server.dll.

If this page does not show, please refer to the possible causes mentioned in step 4.2.6 SUP Server : Test IIS Home Page.

Sybase Relay Server Troubleshooting Guide

September 2012 18

4.3 Check Logs

Before and after each test, it’s a good idea to look into the log files for some explanation of the malfunctioning communication with the Sybase Relay Server.

This section provides an overview of logs that can be checked.

4.3.1 Relay Server : Check Relay Server log

The Sybase Relay Server logs events in a log file called the rs.log.

The location of the rs.log is defined during installation of the Sybase Relay Server.

(if you don’t know where the rs.log is located, just perform a search for “rs.log” on the IIS host).

For the troubleshooting process it’s a good idea to elevate the log level of the Sybase Relay Server.

This can be done by changing a setting in the rs.config file; this is the configuration file of the Sybase Relay Server.

(if you don’t know where the rs.config is located, just perform a search for “rs.config” on the IIS host).

In the rs.config, make sure the verbosity is set to 5.

Important

If you had to change the verbosity in rs.config, restart the Sybase Relay Windows Service.

You can find it in the Windows Services screen and it’s called “Relay Server” or “SQLAnywhere_RelayServer” or similar.

In the rs.log file, look for following information;

Error lines, starting with an E.

Please bear in mind that the information lines (starting with I.) also contain important information sometimes.

Sybase Relay Server Troubleshooting Guide

September 2012 19

Also look for chunks of incoming communication in the rs.log-file; when a device sends a message to the Sybase Relay Server, this message will be logged in the rs.log (with verbosity set to 5).

Look for entries like the following;

When testing the Sybase Relay Server with a mobile device, check if this kind of communication chunks appear in the rs.log-file. If not, there could be problem with the outside firewall or the (external) network card of the IIS host.

4.3.2 Relay Server : Check IIS log

If the rs.log does not offer enough useful information, check the logs of the IIS itself.

Two log files are of interest;

The W3SVC log; for IIS 7 this file is located in the C:\inetpub\logs\LogFiles\W3SVC-

folder

This file will give an overview of HTTP requests that came in, the IP of the sender and the HTTP response code to the request.

The HTTPErr log; for IIS 7 this file is located in the

C:\Windows\System32\LogFiles\HTTPERR-folder

This file will give an overview of errors that occurred in the HTTP communication with the IIS.

Note

When the mobile device connects with the Sybase Relay Server it will connect to following URL, hosted on the Sybase Relay Server;

http://<Relay Server host>/ias_relay_server/client/rs_client.dll

However, when first connecting to the Sybase Relay Server, the SUP mobile application will try other URL suffixes first (/tm/?cid= and /cli/iarelayserver/).

So, the order of suffixes that a SUP mobile application will call on first connection to the Relay Server is

1. /tm/?cid=

2. /cli/iarelayserver/

3. /ias_relay_server/client/rs_client.dll

Sybase Relay Server Troubleshooting Guide

September 2012 20

In the logs, if you notice HTTP requests from the mobile device to the Sybase Relay Server to any of the first two suffixes, resulting in a 404 HTTP response code, don’t worry; this is normal and is no indication of anything wrong.

4.3.3 Relay Server : Check Microsoft Event Logs

Other log files of interest on the Windows host of the Sybase Relay Server are the Microsoft Event logs.

Following logs are of interest;

Application

Security

System

Verify if these logs show useful information about errors that occurred at the time of testing the Sybase Relay Server with a mobile device.

4.3.4 SUP Server : Check RSOE log

First of all, make sure the RSOE is running in the SCC;

The status should be “running”.

Sybase Relay Server Troubleshooting Guide

September 2012 21

Note

In the previous screenshot, you see only one RSOE; this is one RSOE for MBS traffic.

In a regular SUP setup, you would see one to three RSOE’s for each communication type; 1 to 3 RSOE’s for RBS, 1 to 3 RSOE’s for MBS and 1 to 3 RSOE’s for DCN.

For the troubleshooting process it’s a good idea to elevate the log level of the RSOE.

In the SCC, navigate to the RSOE (as shown above), select an RSOE and click “Properties”.

A popup will appear; click Next two times and this screen will be shown;

In this screen you see the verbosity level is set to 5.

If this is not the case on your installation, change the verbosity level to 5 and click Finish.

This should update the RSOE configuration.

(if it doesn’t, please restart the RSOE).

After the verbosity level of the RSOE has been increased to 5, you can retest the Sybase Relay Server using a mobile device.

To get the log file of the RSOE, navigate to the RSOE screen in the SCC (as shown above), select an RSOE of interest and click Retrieve Log…;

Tip

The RSOE log files can also be found in the SUP logs folder on the SUP host.

Please refer to the following step (4.3.5 SUP Server : Check SUP logs) for that.

Sybase Relay Server Troubleshooting Guide

September 2012 22

In the RSOE log file, look for following information;

Error lines, starting with an E.

Please bear in mind that the information lines (starting with I.) also contain important information sometimes.

Also look for chunks of communication in the RSOE.log-file; when a device sends a message to the Sybase Relay Server, the Sybase Relay Server will communicate this message to the SUP server. This message will be logged in the RSOE log (with verbosity set to 5).

Look for entries like the following;

When testing the Sybase Relay Server with a mobile device, check if this kind of communication chunks appear in the RSOE log file.

If not, then there is no communication between the Sybase Relay Server and the SUP

Possible causes could be;

The configuration of the RSOE and Relay Server is wrong; for example, mismatches in server node names, farm names, tokens,…

The firewall between the Sybase Relay Server and the SUP blocks traffic on port 80

There’s HTTP packet filtering on the port 80 of the firewall which drops the Sybase mobile traffic

The DNS host name of the Relay Server can not be resolved when communicating from the SUP to the Relay Server

4.3.5 SUP Server : Check SUP logs

Other logs of interest on the SUP server are the Sybase logs.

You can find them here;

<SUP install dir>\UnwiredPlatform\Servers\UnwiredServer\logs

For troubleshooting the Sybase Relay Server communication, the following logs are interesting;

The server log, called <SUP name>-server.log

The error log called errorlog.txt

Other log files can be checked as well of course.

Note

In this folder, you can also find the RSOE log files described in the previous step

Sybase Relay Server Troubleshooting Guide

September 2012 23

For troubleshooting an initial device registration, the following logs are interesting;

Logs in subfolder TM

Logs in subfolder OBServiceManager

Logs in subfolder DeviceManagement

Important

It’s a good idea to raise the log level of the SUP server during the troubleshooting process.

The log level can be raised in the SCC;

4.3.6 SUP Server : Check Microsoft Event Logs

Also on the SUP server, the Microsoft Event logs can contain useful information.

To retrieve these logs, proceed as explained in step 4.3.3 Relay Server : Check Microsoft Event Logs.

(only this time execute these steps on the SUP server)

4.3.7 Network : Check Firewall logs

When having trouble with communication using the Sybase Relay Server, it’s sometimes the network that blocks or truncates the traffic from the device to the Sybase Relay Server to the SUP.

Therefore, it’s a good idea to check firewall logs or dumps after testing the connection with a mobile device.

Different network nodes can cause problems;

Sybase Relay Server Troubleshooting Guide

September 2012 24

The outside firewall ; between device and Sybase Relay Server The inner firewall(s) : between the Sybase Relay Server and the SUP Proxies in the network zone(s) between the device, the Sybase Relay Server and the SUP

Remember to check logs for each of these network nodes.

4.3.8 Mobile Device : Check Moca-log

The (mobile application specific) log on the device can also show interesting troubleshooting information.

For SUP applications, this log is called the Moca-log.

If the device has already been connected to the SUP server at least once and the device shows an online status, the MOCA log can be retrieved from the SCC;

If the device has never been able to connect to the SUP or if it can’t successfully connected again to the SUP, the Moca-log must be retrieved from the device itself.

Connect the device to a PC using a USB cable and use Windows Explorer or a third party tool to retrieve the Moca log;

(screenshot taken with iExplorer)

Once the Moca-log is retrieved, check if you find any useful information about the problem in this log.

...

Sybase Relay Server Troubleshooting Guide

September 2012 25

4.4 Check Settings

This section outlines some settings to be verified/changed in order to troubleshoot problems with Sybase Relay Server communication.

CAUTION

Before changing any settings, check your company IT policy to see if it’s allowed to do so.

The settings proposed in this section are for troubleshooting purpose only and are not to be interpreted as official recommendations from SAP.

4.4.1 Relay Server : Check Local Firewall / Antivirus

Firewalls and Antivirus software running on the Sybase Relay Server can interfere with the proper communication between the SUP services, the RSOE’s and the Relay Server.

Firewall

When having problems with Relay Server communication, check if the Windows Firewall is running on the Sybase Relay Server host.

Try to disable the Windows Firewall and repeat the testing with the Sybase Relay Server.

Make sure the Windows Firewall is switched off;

Tip

It’s been observed that disabling the Windows Firewall Windows Service is not necessary.

On the contrary, when disabling the Windows Firewall Windows Service, the Windows Filtering Platform (WFP) could block connections on the Sybase Relay Server host.

Please keep in mind that some Antivirus software also installs a basic Firewall.

Check if the Antivirus software also runs a Firewall on the Sybase Relay Server host and if so, disable it for testing.

Sybase Relay Server Troubleshooting Guide

September 2012 26

Antivirus

Most antivirus software allow to exclude certain folders/applications from the antivirus activity.

Try to exclude the folders with the Sybase Relay Server executable and dll’s from the antivirus activity and repeat the testing with the Sybase Relay Server.

If this does not help, try to test with the antivirus software (temporarily) removed from the Sybase Relay Server.

...

4.4.2 Relay Server : Check DEP

In some cases Windows Data Execution Prevention (DEP) can interfere with the proper functioning of the Sybase Relay Server.

To check if DEP is enabled on your system, proceed as follows on the Sybase Relay Server host;

Display the System properties > Advanced Settings > Performance Options > Data Execution Prevention

Make sure that DEP is only enabled for essential Windows programs and services.

If this is not allowed by your company’s IT policy, exclude the folders holding the Sybase Relay Server executable and dll’s from DEP using the second option.

Sybase Relay Server Troubleshooting Guide

September 2012 27

4.4.3 Relay Server : Check Windows Account

The Sybase Relay Server executable (rshost.exe) will be run as a Windows Service on the Sybase Relay Server host.

This Windows service has an account that is used to run this executable.

Sometimes this account has permission issues which prevents the Relay Server Windows Service from running correctly.

Ideally the account that is used to run the Relay Server Windows service is as follows;

A domain user account that is a member of the local admin group that has never been used to log on to the Relay Server host before to avoid permission issues

If you are experiencing problems with the account that is used to run the Relay Server Windows service, check if you get better results with an account as described above.

If this does not work, try with an account that is just a local admin instead.

4.4.4 Relay Server : Check ApplicationHost.config

The Sybase Relay Server is installed as a plug-in on Windows IIS.

It’s important to carefully follow the installation instructions that explain how to install this plug-in and incorporate it into the Windows IIS.

All configuration settings of a Windows IIS 7.x are captured in a file called applicationHost.config.

This file is located here;

C:\Windows\System32\inetserv\config

If you have a successfully installed Sybase Relay Server and another one that is not functioning correctly, compare the applicationHost.config-files of both Relay Servers using a diff-tool.

This will highlight different settings on both IIS’s, maybe uncovering some incorrect settings in the IIS of the malfunctioning Sybase Relay Server.

4.4.5 Relay Server : Check Relay Server version

The Sybase Relay Server communication relies on two distributed solution components;

The Sybase Relay server executables and dll’s on the Sybase Relay Server host.

(more specifically the rshost.exe on the Sybase Relay Server host)

The RSOE’s located on the SUP host.

(more specifically the rsoe.exe on the SUP host)

Both the rshost.exe and the rsoe.exe have a specific version.

Ideally, these components are of the same version.

Note

In some cases the versions of the Sybase Relay Server and the RSOE executables could differ.

For example, if the RSOE executable version is higher than the Relay Server executable version (and if protocol changes have been made in the higher version) the communication between RSOE and Relay Server version will use the protocol of the lowest version.

Sybase Relay Server Troubleshooting Guide

September 2012 28

To verify the version of the rshost.exe and the rsoe.exe, proceed as follows;

Rshost.exe : check the very first lines of the rs.log; there the version number is mentioned (for example 12.0.1.3457).

If you don’t know how to check the rs.log, please refer to step 4.3.1 Relay Server : Check Relay Server log.

Rsoe.exe : check the rsoe log; look for the last time the rsoe was restarted. You will typically see lines like this;

Here the version number is mentioned (for example 12.0.1.3423).

If you don’t know how to check the rsoe log, please refer to step 4.3.4 SUP Server : Check RSOE log.

As mentioned, in an ideal situation these versions should be the same.

If the version is not the same, try looking for installation software for the Sybase Relay Server and/or RSOE’s to bring all solution components to the same version.

4.4.6 Relay Server : Check Multiple Network Cards

Some organizations will install the Sybase Relay Server on a machine with two network cards;

One network card for external traffic (coming from the internet)

One network card for internal traffic (coming from the back ends)

When experiencing problems with Sybase Relay Server communication, double check the setup of these network cards;

Is external traffic ending up on the external network card and internal traffic on the internal network card?

Is the priority of network cards set correctly?

When using a common DNS host name for both IP addresses (each associated with one card), is the external traffic routed to the external IP and the internal traffic routed to the internal IP?

4.4.7 SUP Server : Check Local Firewall / Antivirus

Firewalls and Antivirus software running on the SUP server can interfere with the proper communication between the SUP services, the RSOE’s and the Relay Server.

Step 4.4.1 Relay Server : Check Local Firewall / Antivirus has some recommendations for the local firewall and antivirus.

Apply these recommendations on the SUP server as well.

Sybase Relay Server Troubleshooting Guide

September 2012 29

4.4.8 SUP Server : Check RSOE version

Please refer to step 4.4.5 Relay Server : Check Relay Server version.

4.4.9 Network : Check Firewall Ports and Proxies

As mentioned in step 4.3.7 Network : Check Firewall logs, different network nodes (firewalls and proxies) can block or modify the mobile traffic.

Check all the network nodes that the mobile traffic passes to see if any interfere with the mobile data traffic. You can execute a tracert for example (see step 4.5.5 Network : Run tracert)

More specifically, sometimes the port 80 on the firewall will do some HTTP packet filtering. It’s possible that some HTTP packets are dropped because the firewall does not trust them. This will cause communication problems.

In order to avoid this;

turn off HTTP packet filtering on port 80 of the firewall

check the firewall logs

open the port 80 on TCP-level; this way the firewall will allow all HTTP traffic through the port as well, without modifying the traffic.

Sybase Relay Server Troubleshooting Guide

September 2012 30

4.5 Run Traces

If all of the above did not help in identifying the problem with the Sybase Relay Server communication, you can trace the mobile data traffic as it arrives on the Sybase Relay Server and then further to the SUP server.

Some useful guidelines are explained in this section. ...

4.5.1 Relay Server : Run netstat

In order to see if the correct processes are listening on the right ports, you can run the netstat-command on the Sybase Relay Server.

Just start a Windows command prompt and enter the netstat command.

You should see a process listening on port 80 at least.

You can further refine your search by entering

netstat –ano | findstr :80

This will give you an overview of all processes listening on port 80.

The last column in the output shows you the process id (= PID).

In the Windows Task Manager (in tab “Processes”) you can then map the PID to the process that’s listening on this port.

Tip

If the process id (PID) is not visible in the Task Manager, select View and Select Columns.. from the menu of the Task Manager to add the PID column to the view

In this step verify if there is a process listening on port 80 and if this process is the right one.

Tip

An alternative for netstat is the Sysinternal’s tool TCPView.

It will show you the process listening on the ports, the status of the ports and the amount of network traffic passed through the ports.

4.5.2 Relay Server : Run Wireshark

Wireshark is a free tool that can be used to monitor network traffic.

Tip

You can download Wireshark from www.wireshark.org.

An alternative for Wireshark is Microsoft Network Monitor

Tip

You can download Microsoft Network Monitor for free from http://www.microsoft.com/en-us/download/details.aspx?id=4865

This guide will focus on the use of Wireshark.

Sybase Relay Server Troubleshooting Guide

September 2012 31

This kind of tools can be used to trace following types of HTTP requests and responses;

HTTP requests that are sent from the mobile device to the Sybase Relay Server host

HTTP requests that are sent from the Sybase Relay Server host to the SUP server

HTTP responses that are sent from the SUP server to the Sybase Relay Server host

HTTP responses that are sent from the Sybase Relay Server host to the mobile device

(monitoring of other network protocols is also possible but not relevant in the context of this guide)

The way to use Wireshark is as follows;

Install Wireshark on the Sybase Relay Server

Install Wireshark on the SUP Server

Start Wireshark on the Sybase Relay Server.

In the menu select Capture and then Interfaces

In the popup that appears, select the IP addresses that you want to monitor;

(The ones that show an increasing number of packets are usually the ones you want to monitor)

In case the machine has multiple network cards, you will have to monitor more than one IP address.

Don’t press Start yet.

Start Wireshark on the SUP Server.

In the menu select Capture and then Interfaces

In the popup that appears, select the IP address that you want to monitor;

Don’t press Start yet.

Now go back to the Wireshark popup on the Relay Server and press Start.

Now go back to the Wireshark popup on the SUP Server and press Start.

The Wireshark monitoring is now in progress.

Execute a test with the mobile device, trying to connect to the Sybase Relay Server and the SUP Server.

After the test, go to the Wireshark application on the Sybase Relay Server and select Capture in the top menu. Then select Stop.

Now go to the Wireshark application on the SUP Server and select Capture in the top menu. Then select Stop.

Now, let’s examine the Wireshark captures that were made during this test run.

First of all you need to get the IP address of the mobile device that was used to execute the testing.

Do this by entering what’s my ip in a Google search bar on the device.

The resulting search page will show you the external IP address of this mobile device.

Sybase Relay Server Troubleshooting Guide

September 2012 32

Now you have a look at the Wireshark capture that was taken on the Sybase Relay Server.

First you can apply a filter to this capture in order to make it more clear.

Example

Following filter will retain only the communication to and from the mobile device that was used for testing;

(ip.src==<mobile device IP> or ip.dst==<mobile device IP>) and http

Registering a device for the first time to an SUP with a Sybase Relay Server in front, will show you a similar Wireshark capture like this (after applying the above filter);

You see that the mobile device launched a couple of HTTP requests to the Sybase Relay Server.

The 3rd

one, the one targeting the /ias_relay_server/client/rs_client.dll/ suffix, was successful;

The Sybase Relay Server forwarded this request to the SUP, the SUP processed this request and responded with a HTTP 200 response which was forwarded to the mobile device by the Sybase Relay Server.

You can also follow the communication between the Sybase Relay Server and the SUP server.

First you can apply a filter to this capture in order to make it more clear.

Example

Following filter will retain only the communication between the Relay Server and the SUP Server;

(ip.src==<SUP Host IP> and ip.dst==<Relay Server IP>) or (ip.src==<Relay

Server IP> and ip.dst==<SUP Host IP>) and http

Result;

This time the communication is less easy to follow; you will see a lot of Continuation or non-HTTP traffic, but by inspecting the individual messages more clearly, you should be able to piece together the original requests.

Note

It’s not unusual to see 1 HTTP request coming into the Sybase Relay Server from the Mobile device resulting in multiple HTTP Wireshark trace lines of type Continuation or non-HTTP traffic, when looking at the Wireshark trace between the Sybase Relay Server and the SUP server.

So far, we have only been looking at the Wireshark log for the Sybase Relay Server host.

Sybase Relay Server Troubleshooting Guide

September 2012 33

Finally, you can also check the Wireshark log on the SUP server to see if the traffic that left the Sybase Relay Server (to the SUP server) also arrives on the SUP server and to check if the packets got modified along the way.

You can also follow an HTTP conversation by right clicking on an HTTP line in the trace and selecting Follow TCP Stream.

This will give you a screen like this;

4.5.3 SUP Server : Run netstat

You can also run netstat on the SUP server.

For an explanation, please refer to step 4.5.1 Relay Server : Run netstat.

Ports to monitor here are;

2480 for RBS

5001 for MBS

8000 for DCN

These ports should be listening and associated with Sybase related processes.

4.5.4 SUP Server : Run Wireshark

Please refer to step 4.5.2 Relay Server : Run Wireshark.

4.5.5 Network : Run tracert

It’s not always straightforward to find out the different network nodes that the mobile data traffic passes between the SUP server and the Relay Server.

Therefore, you can open a Windows command prompt on the SUP server and perform a tracert command like this;

tracert <Relay Server host>

Sybase Relay Server Troubleshooting Guide

September 2012 34

Also, you can open a Windows command prompt on the Sybase Relay Server host and perform a tracert command like this;

tracert <SUP server host>

Note

It’s not unusual that both tracert routes (from the Sybase Relay Server to the SUP server and from the SUP server to the Sybase Relay Server) are different.

The nodes that are reported back should be investigated;

are they firewalls, proxies or other network nodes that could block or truncate the mobile data traffic?

Sybase Relay Server Troubleshooting Guide

September 2012 35

5. Appendix

Appendix A – Sybase Relay Server Troubleshooting resources

You can find more troubleshooting information here;

Sybase METS;

http://frontline.sybase.com/support/

Here you can look for specific errors that you find in Relay Server logs

Sybase Infocenter;

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01206.0213/doc/html/mqu1257978045601.html

This is a basic list of frequent problems that are encountered when setting up a Sybase Relay Server.

www.sdn.sap.com/irj/sdn/howtoguides