cancel
Showing results for 
Search instead for 
Did you mean: 

problem in config Nginx with SMP 3

vivek_gaurav
Participant
0 Kudos

Hi All,

          I had configured Nginx with SMP 3 but getting error while doing sync from agentry server..

     Steps given below:

1) Installed Nginx in DMZ and have configured the configuration file as described in the document

    2) Have created a self signed certificate for Nginx server and installed it in smp keystore.

    3) In Nginx config file the upstream backend we have put the url of the agentry application i.e (<smp server ip>:8081)

    4) After all the configurations we are able get hit the https port of the smp server via Ngix server (<nginx server>) and able to get the message  "i am here" from the browser .

but getting blank result on URL (<nginx server>:<configured port>/SAPWM)

     5)while doing sync on agentry client using URL (<nginx server>) getting error:

Logging user into server

   Logged in

Sending client info

Unexpected disconnection from server (11)

Connection failed

Ending transmission

Kindly advise..

Thanks

Vivek

Accepted Solutions (1)

Accepted Solutions (1)

vivek_gaurav
Participant
0 Kudos

Hi all ,

I am getting error in SMP log file : SMPWM workerThread5180.log

2015/03/10 13:12:07.879: Server definition and overrides last updated 2:00:36 PM 3/6/2015

2015/03/10 13:12:07.879: Module Update: client needs update for module PM

2015/03/10 13:12:07.894: Objects: 38 Fetches: 7 Transactions: 262

2015/03/10 13:12:07.910: Screens: 243 Rules: 1722 Actions: 586

2015/03/10 13:12:07.910: Reports: 0

2015/03/10 13:12:07.925: Config updated: 2:00:36 PM 3/6/2015

2015/03/10 13:12:07.941: + User=SAPWM-G1018991

2015/03/10 13:12:07.941: + ANGEL Vine=3245805711

2015/03/10 13:12:07.941: Sending response, type 26

2015/03/10 13:12:07.957: *** Exception 'XFailedToSendResponse' caught, see events.log

i had increased timeout in Nginx config file

   keepalive_timeout  36000;

   ssl_session_timeout  30m;

Also in SMP Admin->SAPWM

I increased Timeout to 1000

But still getting same error..

I need to increase timeout some other place...?

kindly advise..

Thanks

Vivek

Former Member
0 Kudos

The reason why when you just use the IP address you get the "I am here" is because the proxy_pass has the "\SAPWM" part of the link.  So when the user adds it to the server line it ends up getting "ipaddress\SAPWM\SAPWM".

On the second issue about sending, does the client say "Sending Client Info" for a while until the point the server gets that error?

- If yes, can you try the following, in the "com.sap.mobile.platform.server.agentry.application" folder there is a "AgentryLogging.ini" file.  Can you rename this file to "_AgentryLogging.ini" and restart the full SMP Server and retest?

vivek_gaurav
Participant
0 Kudos

Thanks stephen,

First issue got resolved by changing Config file...

But after doing rename of "_AgentryLogging.ini" ,also . it is giving same error.

One thing , i identified that when i am doing sync directly to SMP agentry(without Nginx) it takes almost 10-15 minutes for first time sync from "sending client info" . and successfully sync happens.

But when i do it from public network through Nginx Server URL within 2-3 minutes it gives error.

Is it getting timeout at Nginx or some other issue.

Also,I am not getting any error message in Nginx Log...

Kindly suggest...

Thanks

vivek

Former Member
0 Kudos

After renaming the file did you restart the SMP Server?


Sending Client info should only take a few seconds at most.  We had the issues on my current project and it was resolved after renaming the file.  But I have talked to SAP and they are looking into the issue.

Is it possible the firewall is ending the connection early?

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The issue with AgentryLogging.ini and the sending client info appear to be related to the use of periods in the Agentry application id when created in the Cockpit.  Deleting the file (or renaming) appears to temporarily fix the problem.  When using periods in the name it will put single quotes around the id in the AgentryLogging.ini which is what caused the problem for me.   Removing the quotes worked for a me but for others deleting the file was needed.   When I hit this on my server it caused my machine to blue screen rather than ever successfully completing the sending client info.

I know others have had this issue in the past without having periods in the name but it is still related to the AgentryLogging.ini.

In the case of the NGINX connection I suspect it is timing out the connection.   The right answer is to fix the issue causing the delay in sending client info since as Steve mentioned it normally is very quick.

--Bill

vivek_gaurav
Participant
0 Kudos

Hi Bill/Stephen,

                     I had renamed this file to AgentryLogging.ini  to _AgentryLogging.ini.

                    But still it is giving same error...

                    I am givinging content of _AgentryLogging.ini file below

[Log Settings]

tcp=4.Y

user.*=4.Y

server=4.Y

angel front end=4.Y

server.backend.sql-1=4.Y

server.backend.java-2=4.Y

angel front end.connection.*=4.Y

Also i am sending my Nginx Config file

**************************************************************************

#user  nobody;

worker_processes  1;

error_log  logs/error.log;

#error_log  logs/error.log  notice;

#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {

    worker_connections  1024;

}

http {

    include       mime.types;

    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '

                      '$status $body_bytes_sent "$http_referer" '

                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  logs/access.log  main;

    sendfile        on;

    #tcp_nopush     on;

    #keepalive_timeout  0;

    keepalive_timeout  36000;

    #gzip  on;

   

    server {

        listen       443 ssl;

        server_name  <Nginx Server Hostname>;

        ssl_certificate C:/nginx-1.7.10/nginx-1.7.10/conf/nginxagentry.crt;

        ssl_certificate_key  C:/nginx-1.7.10/nginx-1.7.10/conf/nginxagentry.key;

  ssl_ciphers  HIGH:!aNULL:!MD5;

  ssl_prefer_server_ciphers  on;

    #    ssl_session_cache    shared:SSL:1m;

        ssl_session_timeout  300m;

        access_log  logs/access.log  main;

        root   html;

        index  index.html index.htm;

        location /

  {

           

  proxy_pass https://<smp server Hostname.domain.com>;

  #proxy_pass https://<Hostname.domain.com>/;

  proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;

  proxy_redirect default ;

  #proxy_buffering off;

  #proxy_set_header Host $host;

  #proxy_set_header X-Real-IP $remote_addr;

  proxy_set_header localhost $host;

  proxy_set_header <NginxServer IP> $remote_addr;

  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  proxy_http_version 1.1;

  proxy_set_header Upgrade $http_upgrade;

  proxy_set_header Connection "upgrade";

        }

    }

  #paste blow code after server configuration closing braces

  upstream backend

  {

  server <smp server host name>:8081;

  }

}

********************************************************************

in smp server port 8081 and 8083 are open

in Nginx server(in DMZ) port 443 is open.

Also all trace option for SAPWM traces are disable and we are not able to enable and change it to "Enable" in Cockpit-> Log-> setting

Kindly advice

Thanks

vivek

vivek_gaurav
Participant
0 Kudos

Hi All,

it some issue with our SAP Work manager configuration because same ,i can easily able to connect using SAP Inventory Management App.

Sorry for late response .

Closing the tread.

Regards

Vivek

Answers (3)

Answers (3)

Former Member
0 Kudos

The documents I have seen before don't show how to configure it to use Websockets, only a proxy.  Please see my comment on:

vivek_gaurav
Participant
0 Kudos

Thanks for quick reply to all of you.

I have one doubt that on browser when i am calling https://<Nginx public IP> ,it gives me result "I am here"

But when I browse for https://<Nginx public IP>/SAPWM it gives error blank page "Resourse not found"

Is it fine...

Kindly suggest, below i had attached config file of nginx

Thanks

vivek

kirankola
Advisor
Advisor
0 Kudos

Hi Vivek,

To find out the root cause:

Regards,

Kiran

i834235
Product and Topic Expert
Product and Topic Expert
0 Kudos

Vivek,

You may have  turn on some logging to identify the layer where the problem exists.

1) Connection from Agentry client  to  Reverse proxy is getting broken.

2) Connection from   Reverse proxy to SMP 3.0 is getting broken.

Also check out time setting on nginx.  Are you  using this issue during initial sync time or even during regular sync times ?

This might be useful reference.

http://scn.sap.com/docs/DOC-57367

http://help.sap.com/saphelp_smp303svr/helpdata/en/7c/28f6c5700610148394d1da5a65c0ca/content.htm?fram...

Lets hear from Kiran Kola.

Thanks

Manju.