Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Description

WEB portal is included into SoftWLC project to implement Hotspot clients authorization model. An unknown user can connect to an access point without getting login and password in advance. But if he (or she) tries to access the Internet via a browser, he will be redirected to a WEB portal page where authorization or credentials obtaining (for example, via SMS) can be performed. During authorization, a user can see advertisement banners customized in accordance with operator's requirements.


The service is used for displaying virtual portals' pages and for registration and authorization of Wi-Fi users connected via Eltex access points or ESR/BRAS.


Installation is performed using eltex-portal package.


"Warming up" page will be dispayed instead of the portal during eltex-portal service initialization until the service is fully loaded. It shows that both portal initialization and service module configuration processes have not been finished yet. After eltex-portal service is fully loaded, the user will be redirected to the main page of the portal.

An example of a portal initialization page:

Service management

Operation

Command

Response

Status check

service eltex-portal status

Service is running

eltex-portal start/running, process <pid>


Service is waiting

eltex-portal stop/waiting

Service start

service eltex-portal start

Service has been started

eltex-portal start/running, process <pid>


The service is already running

start: Job is already running: eltex-portal

Service stop

service eltex-portal stop

Service has been stopped successfully

eltex-portal stop/waiting


Service has not been stopped, as it was not started

stop: Unknown instance:

Service restart

service eltex-portal restart

Service has been restarted successfully

eltex-portal stop/waiting

eltex-portal start/running, process <pid>

eltex-portal start/running, process <pid>
stop: Unknown instance:


Configuration

/etc/eltex-portal/application.conf

main configuration file. Default configuration example:

portal {
    defaultRedirectUrl = "http://eltex-co.ru"
    tariffCheckerPeriod = 1440
}

jetty {
    https {
        port = 9443
        keystorePass = 12345
        keystoreFile = /etc/eltex-portal/localhost.pfx
        keystoreType = PKCS12
        keyAlias = 1
        ciphers = [
            TLS_RSA_WITH_AES_128_CBC_SHA256
            TLS_RSA_WITH_AES_128_CBC_SHA
            TLS_RSA_WITH_AES_256_CBC_SHA256
            TLS_RSA_WITH_AES_256_CBC_SHA
        ]
    }

    accessLog {
        enabled = true
        directory = /var/log/eltex-portal/

        # <default> : NCSA format
        # <custom>  : customized NCSA with additional parameters
        format = default
        retainDays = 30
        append = false
        logCookies = true
        logAP = true
        logBRAS = true
    }
}

database {
    host = localhost
    port = 3306
    name = ELTEX_PORTAL
    user = javauser
    password = javapassword

    readOnly = true

    pool {
        # Time to wait for a connection
        connectionTimeout = 10s
        # Time to wait for connection validation
        validationTimeout = 3s

        min = 1
        max = 10
    }

    cache {
        # Limit of cached simple entries count (for each query type)
        maxEntries = 1000
        # Limit of total cached portal resources size
        maxResourceBytes = 32m
        # Maximum time to retain items in the cache
        expireTime = 2m
    }
}

Parameter

Description

portal


defaultRedirectUrl

The address where the user will be redirected if his session should be restarted. It should be set in accordance with http protocol.

tariffCheckerPeriod

The interval for checking tariff availability on portals. If there are no available tariffs, the error message is generated.

jetty


https

Configuring container operation on https. Certificate location, key and listened port must be specified.
port — listened port
keystorePass — a key to a certificate store
keystoreFile — a store file that contains a certificate
keystoreType — store type
certAlias  — certificate alias in a store
ciphers — supported ciphering methods

accessLog

Server requests logging.
enabled — logging state
directory — the directory to store logs
format — default logs format: NCSA — standard format, custom — expanded format for debugging
append — current file writing continuation after service restart
retrainDays — log storage time
append — additional information
logCookies — saving cookie to logs
logAP — saving headers from access points
logBRAS — saving data from BRAS

database


host

Database server address

port

The port of the database server for getting inbound connection

name

Database name

user

Database user's name

password

Database user's password

readOnly

Database connection status

pool

Database connections management
connectionTimeout — the idle timeout of the connection
validationTimeout — the interval for idle connections validation
min — the minimum number of connections
max — the maximum number of connections

cache

Caching settings
maxEntries — the maximum number of items in the cache
maxResourceBytes — cache size
expireTime — cache data storage time

/etc/default/eltex-portal

The file contains parameters needed for service initialization. Default configuration example:

# Eltex-Portal daemon parameters

# Port for use by Eltex Portal
PORT=9000

# Initial size of Java heap
JAVA_INIT_HEAP=16m
# Maximum size of Java heap
JAVA_MAX_HEAP=256m

# Additional arguments to pass to java
JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/eltex-portal"

Parameter

Description

PORT

The port for the server to get connections.

JAVA_INIT_HEAP

Amount of memory allocated for service operation on startup. Recommended to be set equal to JAVA_MAX_HEAP.

JAVA_MAX_HEAP

Maximum amount of memory that the service can reserve.

JAVA_OPTS

Additional options for jvm launch.

/etc/eltex-portal/log4j2.xml

service operation logging settings. Default configuration example

<?xml version="1.0" encoding="UTF-8"?>

<configuration monitorInterval="600">
    <properties>
        <Property name="maxFileSize">20 MB</Property>
        <Property name="accumulatedFileSize">100 GB</Property>
        <Property name="lastModified">4d</Property>
        <Property name="maxCount">20</Property>
        <Property name="baseDir">/var/log/eltex-portal</Property>
    </properties>
    <appenders>

        <RollingFile name="RollingFile" fileName="${baseDir}/log_ep.txt"
                     filePattern="${baseDir}/log/log_ep-%i.txt.gz">
            <PatternLayout>
                <pattern>%d{ISO8601} [%t] %-5p %logger{12} %C{1}.%M(line:%L). %m%n</pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="${maxFileSize}"/>
            </Policies>
            <DefaultRolloverStrategy max="${maxCount}">
                <Delete basePath="${baseDir}" maxDepth="3">
                    <IfFileName glob="log_ep-*.txt.gz">
                        <IfLastModified age="${lastModified}" />
                        <IfAny>
                            <IfAccumulatedFileCount exceeds="${maxCount}" />
                            <IfAccumulatedFileSize exceeds="${accumulatedFileSize}" />
                        </IfAny>
                    </IfFileName>
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>

    </appenders>

    <Loggers>
        <Root>
            <AppenderRef ref="RollingFile" level="WARNING"/>
        </Root>
        <Logger name="org.springframework" level="INFO"/>
        <Logger name="net.sf.ehcache"      level="ERROR"/>
        <Logger name="org.eclipse.jetty"   level="INFO"/>

        <!--SQL logging-->
        <Logger name="org.jooq.tools.LoggerListener" level="OFF"/>

        <Logger name="jndi"       level="OFF"/>
        <Logger name="org.quartz" level="OFF"/>
        <Logger name="com.zaxxer" level="OFF"/>
        <Logger name="org.apache" level="OFF"/>
    </Loggers>

</configuration>


Parameter

Description

monitorInterval

The interval for automatic monitoring of the logger configuration.

maxFileSize

The maximum file size. When exceeded, a new file is created, and an old file is archived.

accumulatedFileSize

Total log size (a current file + archived ones). When exceeded, the oldest files will be deleted.

lastModified

Log storage time, files modified earlier than the timeless, will be deleted.

maxCount

The maximum number of archived files. When exceeded, the oldest files will be deleted.

baseDir

Base directory to store logs.



<AppenderRef ref="RollingFile" level="ERROR"/>

Minimum logging level.

Log errors description

Log file: /var/log/eltex-portal/log_ep.txt 

Browser

Description

Example

CHECK LOGIN AND PSW IN smsc_gate.conf

NGW failed to access SMS sending service

2018-08-22T09:38:56,420 [SimpleContainerScope.Executor@266376052-35] ERROR org.eltex.portal.sms.SendSmsWithPswResponseHandler SendSmsWithPswResponseHandler.onResult(line:53). Error while sending message on number: 79529056800. ErrorCode: 10, errMessage: 79529056800. Received error code = 1. CHECK LOGIN AND PSW IN smsc_gate.conf. Error in the parameters of function of dispatch sms via http protocol

NGW_NOT_AVAILABLE

The portal failed to access NGW service


  • Нет меток