cancel
Showing results for 
Search instead for 
Did you mean: 

http web service trace log is empty in sa 17.0.10.5963

ximen
Participant
0 Kudos
1,435

Here I use the DEMO that comes with the system, demo path is C: \\ Users \\ Public \\ Documents \\ SQL Anywhere 17 \\ Samples \\ SQLAnywhere \\ HTTP

1.run web service : dbsrv17.exe -c 8m -n demo17  demo.db   -xs HTTP(PORT=8880) -zoc clientinfo.txt
2.CALL sa_server_option( 'WebClientLogging', 'ON' );
3.The data can be displayed normally on the web page:http://127.0.0.1:8880/getinfo
4. Blank when opening log file,no data in clientinfo.txt

Accepted Solutions (1)

Accepted Solutions (1)

fvestjens
Participant

I don't know whether this is still relevant, but when you want to log the requests being received by the server use this:

CALL sp_start_listener('HTTP','127.0.0.1:8880','LOG=c:\\temp\\http.log');

Found it here http://dcx.sap.com/sqla170/en/html/3be336f56c5f1014a34cab0e812f9155.html

VolkerBarth
Contributor
0 Kudos

To add:

To turn on web server logging permanently, you can do so by using the according -xs network protocol options like LogFile, LogFormat, LogMaxSize and LogOptions, such as

dbsrv17.exe -c 8m -n demo17 demo.db -xs HTTP(PORT=8880;LOG=C:\\MyHttpServer.Log;LOPT=ALL)

Answers (1)

Answers (1)

VolkerBarth
Contributor
0 Kudos

The web client log traces calls by SQL Anywhere as a web client, using web client functions/procedures. Do you have called one of those?

ximen
Participant
0 Kudos

Thank you for your reply. Isn't it "http://127.0.0.1:8880/getinfo" in the IE or google chrome,


The web service client log file contains HTTP requests and transport data recorded for outbound web service client calls. The web service client log file can also be specified using the sa_server_option system procedure:

CALL sa_server_option( 'WebClientLogFile', 'clientinfo.txt' );Logging is enabled automatically when you specify the -zoc server option. You can enable and disable logging to this file using the sa_server_option system procedure:

CALL sa_server_option( 'WebClientLogging', 'ON' );Example The following command starts the database server so that it listens for HTTP web requests on port 80, and logs outbound web service client information to the file clientinfo.txt:

dbsrv17 web.db -xs HTTP(PORT=80) -zoc clientinfo.txt

VolkerBarth
Contributor
0 Kudos

No, you seem to call a SQL Anywhere web service via your browser, so SQL Anywhere acts as web server (i.e. answering a HTTP request).

As stated, the web client logging feature traces SQL Anywhere acting as a web client (i.e. raising a HTTP request).

VolkerBarth
Contributor
0 Kudos

Yes, that is the documentation on logging web requests by SQL Anywhere as a web client.

As stated, that will not log the requests SQL Anywhere gets and answers when used as a web server, and you are using it as a web server.

ximen
Participant
0 Kudos

It turns out that I use asa as a client to access the work log function tracked by other servers. How should the server log be tracked? Browsing logs similar to windows IIS

ximen
Participant
0 Kudos

I found a related post https://sqlanywhere-forum.sap.com/questions/1221/is-this-how-i-have-to-trap-exceptions-raised-by-the... -a-web-service. But would you like to inquire that the ASA as a server does not have its own log tracing function? Otherwise this will cause performance degradation.

Windows iiS has a built-in log trace function. Doesn't ASA have it? Do I have to use stored procedures or functions to solve this problem?