Difference between revisions of "Lianja Server Manager on Windows"
Yvonne.milne (Talk | contribs) (→Security) |
Yvonne.milne (Talk | contribs) (→HTTP Settings) |
||
Line 268: | Line 268: | ||
==HTTP Settings== | ==HTTP Settings== | ||
− | [[{{ns:file}}: | + | [[{{ns:file}}:l5_wserveman4.png|link={{filepath:l5_wserveman4.png}}|HTTP Settings tab]] |
<br clear=all> | <br clear=all> | ||
Line 278: | Line 278: | ||
!width="25%"|Setting||Description | !width="25%"|Setting||Description | ||
|- | |- | ||
− | |valign="top"|Enable HTTP | + | |valign="top"|Enable HTTP server||Check to tell the Lianja Server to listen for HTTP/Cloud Server requests. The Lianja Server listens for requests on port 8001. If the port 80 checkbox is checked, it will also listen for request on port 80. |
|- | |- | ||
− | |valign="top"|Enable HTTP | + | |valign="top"|Enable HTTP port 80||valign="top"|Check to tell the Lianja Server to listen for HTTP/Cloud Server requests on port 80 as well as 8001. |
+ | |- | ||
+ | |valign="top"|Enable caching||Check to enable caching on the Lianja Server. This should be unchecked during development. | ||
|- | |- | ||
|valign="top"|wwwroot||The root folder for the Lianja Cloud Server. Default is C:\Lianja\cloudserver\tenants\public\wwwroot\. | |valign="top"|wwwroot||The root folder for the Lianja Cloud Server. Default is C:\Lianja\cloudserver\tenants\public\wwwroot\. | ||
Line 288: | Line 290: | ||
|valign="top"|Run as||The account to run as: Guest Account or This Account. For 'This Account', specify the login username and password. | |valign="top"|Run as||The account to run as: Guest Account or This Account. For 'This Account', specify the login username and password. | ||
|- | |- | ||
− | |valign="top"|Enable | + | |valign="top"|Enable debug||Check to enable the creation of debug log files. |
+ | |- | ||
+ | |valign="top"|Enable logging||Check to enable the creation of ''Common Log Format'' log files. | ||
+ | |- | ||
+ | |valign="top"|Trace requests||Check to enable the creation of trace request log files. | ||
+ | |- | ||
+ | |valign="top"|Tenancy||The tenancy name. | ||
+ | |- | ||
+ | |valign="top"|Custom Login page||The name of the custom login page script for the above tenancy. | ||
+ | |- | ||
+ | |valign="top"|Custom Login recaptcha page||The name of the custom login page with reCAPTCHA script for the above tenancy. | ||
+ | |- | ||
+ | |valign="top"|Custom App Center||The name of the custom App Center page script for the above tenancy. | ||
|- | |- | ||
|} | |} | ||
− | |||
− | |||
− | |||
==Security== | ==Security== |
Revision as of 09:13, 19 December 2019
Contents
See Also
Lianja ODBC Driver on Linux, Lianja ODBC Driver on Windows, Lianja ODBC Manager on Windows, Lianja Server Manager on Linux, License Management on Windows, SQL System Tables
The Lianja Server Manager
The Lianja Server Manager allows you to:
- Control the Lianja Server service that listens for Lianja SQL Server and Lianja Cloud Server requests
- Activate and deactivate Lianja SQL Server and Lianja Cloud Server licenses
- Configure settings for the Lianja Server service, Lianja SQL Server and Lianja Cloud Server
- Manage background scripts running via Lianja SQL Server
The Lianja Server Manager can be accessed from its desktop shortcut or from the Windows Start Menu under Lianja SQL Server or Lianja Cloud Server.
User Account Control
If you have User Account Control enabled, please click Yes on the UAC dialog displayed when you run the Lianja Server Manager. On Windows XP, please run the Lianja Server Manager as the Administrator.
Service Manager
The Service Manager tab allows you to perform the following operations on the Lianja Server service:
- Start
- Pause
- Stop
- Restart
Pausing the service has no effect on existing connections, but prevents further connections to the server being made. To resume normal service after a Pause, click the Start/Continue button.
Checking the Auto-start service box ensures that the Lianja Server service will be restarted when the machine is rebooted.
The current status of the Lianja Server is shown in the status bar.
The License Information section displays your current license owner, type and maximum connections. To add a license, enter the key in the License key box and click Activate. The Deactivate button is used to deactivate the current license. This is demonstrated in the License Activation video.
Settings
The following settings can be configured:
Section | Item | Description |
---|---|---|
Port Listener | Retries | Number of times a connection attempt will be tried before returning an error. Default is 29. |
Delay | Number of seconds the Port Listener will wait to verify that the server it called was successfully started. Default is 10. | |
Timeout | Number of seconds between each connection attempt. Default is 1. | |
Directory Paths | Root Directory | The Lianja Server root folder. |
Log files | The default folder for Lianja Server log files. | |
Error files | The default folder for Lianja Server error files. | |
Temporary files | The default folder for Lianja Server temporary files. | |
Data | The default folder for Lianja Server databases. | |
Apps | The default folder for Lianja Server Apps. | |
Library | The default folder for Lianja Server Library files. | |
Services | The default folder for Lianja Server background script services. | |
Environment | Cursors | Maximum concurrent cursors. |
Log Files | Enabled | Check to enable log file creation. |
Versions | Check to enable log file versioning. | |
Listener | Click to view the current Listener log file. | |
Server | Click to view the current Server log file. | |
Purge | Click to purge all log files. |
Important: The Database directory for Lianja Server is the Runtime data directory. This is the same directory used by the Lianja App Center and is different from the Development directory used by the Lianja App Builder. To make your databases or changes you have made to the southwind sample database available to the Lianja Server, you will need to deploy them to the Runtime data directory. This can be done in a few clicks from the Deploy Worksurface in the Lianja App Builder: see here for details.
Note: When the Lianja Server service is started, the Port Listener is activated and listens for client requests. Once a client makes a connection, the Port Listener starts the Server for that connection.
One client could have more than one connection / Server.
At any one time, there will be only one Port Listener process, but there may be many Server processes.
Note: Logging should only be enabled when required, not for general usage.
Background Scripts
The Background Scripts tab allows for the creation, modification and configuration of background service scripts. Background service scripts can be used to perform data transformation, data synchronization or any other custom operation on your data that you require in your Apps.
Background service scripts run with no UI. They are primarily used to perform data collection tasks or batch job tasks such as checking for new or updated data and emailing out notifications to Lianja users. Typically a background service will sleep for a period of time and then repeat its work. Background service scripts have the standard program extensions of prg/dbo and reside in the Services folder (see Settings above). Whenever the Lianja Server service is started, any programs in the Services folder with their Startup Mode set to Automatic will be run.
Section | Item | Description |
---|---|---|
Scripts | Script | Script name |
Status | Service status: Stopped, Started. | |
Startup Mode | Service startup mode: Manual, Automatic. | |
Buttons | New... | Create a new script. |
Edit... | Edit the selected script. | |
Delete | Delete the selected script. | |
Mode (Automatic or Manual) | Toggle the startup mode of the selected script between Automatic and Manual. | |
Refresh | Refreshes the display. | |
Status (Started or Stopped) | Toggle the status of the selected script between Started and Stopped. |
Template Background Script
//============================================================================ // // FILE : example.prg // // PURPOSE : Example code for a Lianja background service script on Windows. // //---------------------------------------------------------------------------- // // Background service scripts are called with two parameters: // // script : full path name of the script // action : Either "start", "stop" or "restart" // //----------------------------------------------------------------------------- // // Functions // // start() : Called when the service is started. Creates a // filename.active and processes all actions while this // file exists. // // stop() : Removes the filename.active file so the service will // stop when it next wakes up to do any work. // // doWork() : This is the place to add your main processing code. // //============================================================================ //----------------------------------------------------------------------------- // declare global variables //----------------------------------------------------------------------------- public p_active_file public p_error_file public p_sleep_seconds //----------------------------------------------------------------------------- // Start action //----------------------------------------------------------------------------- function start( ) // Check to see if a ".error" file already exists for this script // and delete it if it does. if file(p_error_file) erase &p_error_file if file(p_active_file) erase &p_active_file endif endif // Check to see if a ".active" file already exists for this script // and return if its already active if file(p_active_file) return .f. endif // Create the ".active" file for this script fp = fcreate(p_active_file) if ferror() = -1 return .f. else fclose(fp) endif // process any work for this script do while file(p_active_file) sleep p_sleep_seconds doWork() enddo return .t. //----------------------------------------------------------------------------- // Stop action //----------------------------------------------------------------------------- function stop( ) // Erase active file so service will stop erase &p_active_file // return result if file(p_active_file) rc = .f. else rc = .t. endif return rc //----------------------------------------------------------------------------- // error handler //----------------------------------------------------------------------------- function errorHandler( ) on error save error to &p_error_file stop() return //----------------------------------------------------------------------------- // function to handle the requested script action //----------------------------------------------------------------------------- function handle_action(action, sleepTime, scriptName) // Setup error handler on error errorHandler() // by convention we use files prefixed by the script name and postfixed with // .active and .error to keep us informed of the script execution status p_active_file = lower(basename(left(scriptName, at(".", scriptName) -1)+".active")) p_error_file = lower(basename(left(scriptName, at(".", scriptName) -1)+".error")) p_sleep_seconds = sleepTime // Change the default directory as thats where the .active status file is written set default to "C:\Lianja\server\services" // handle the specified action do case // Start service case upper(action) = "START" result = start() // Stop service case upper(action) = "STOP" result = stop() // Restart service case upper(action) = "RESTART" stop() result = start() // Unknown command otherwise result = .f. endcase return result //----------------------------------------------------------------------------- // this is the function that will be executed by this script to handle its work //----------------------------------------------------------------------------- function doWork( ) // TODO: add your own custom code here return //----------------------------------------------------------------------------- // Call the Lianja background service script action handler //----------------------------------------------------------------------------- return (handle_action(_para1, 10, procname()))
HTTP Settings
The HTTP Settings apply to the Lianja Cloud Server.
The following settings can be configured:
Setting | Description |
---|---|
Enable HTTP server | Check to tell the Lianja Server to listen for HTTP/Cloud Server requests. The Lianja Server listens for requests on port 8001. If the port 80 checkbox is checked, it will also listen for request on port 80. |
Enable HTTP port 80 | Check to tell the Lianja Server to listen for HTTP/Cloud Server requests on port 80 as well as 8001. |
Enable caching | Check to enable caching on the Lianja Server. This should be unchecked during development. |
wwwroot | The root folder for the Lianja Cloud Server. Default is C:\Lianja\cloudserver\tenants\public\wwwroot\. |
Default Page | The default page displayed. Default is login.rsp in the folder specified by wwwroot. See also Customizing the Login Page. |
Run as | The account to run as: Guest Account or This Account. For 'This Account', specify the login username and password. |
Enable debug | Check to enable the creation of debug log files. |
Enable logging | Check to enable the creation of Common Log Format log files. |
Trace requests | Check to enable the creation of trace request log files. |
Tenancy | The tenancy name. |
Custom Login page | The name of the custom login page script for the above tenancy. |
Custom Login recaptcha page | The name of the custom login page with reCAPTCHA script for the above tenancy. |
Custom App Center | The name of the custom App Center page script for the above tenancy. |
Security
The following Security settings can be configured:
Setting | Description |
---|---|
Allow unauthenticated local access | If checked local clients (same IP address) can connect without specifying a username/password. For ODBC/JDBC clients, use ?/? as the username/password. |
Enable WebSockets service | Check to enable the WebSockets service. |
Enable OData Read service | Check to enable the OData Read service. |
Enable OData Update service | Check to enable the OData Update service. |
Authenticate OData service | Check to enable OData authentication. |
Authenticate Page requests | Check to enable Page authentication (.rsp, .jssp). |
Enable server delegates | Check to enable server delegates. |
Enable reCAPTCHA | Check to enable reCAPTCHA authentication on default login pages. |
Enable package auto updates | Check to enable package auto updates. See the Lianja Package Manager for full details. |
API | If the optional API key is specified then no authentication is required but the HTTP headers must contain "LianjaAPIKEY:key" and the key must match the specified API key. |
Allow / Deny Masks
This section permits you to specify individual or groups of IP addresses allowed or denied access to the Lianja Server. Type the IP address or IP address range in the box, e.g. 192.168.*.*, then click the Add button to add it to the list. Select and IP address or range from the box and click Modify or Remove to modify or remove it.