Skip to content

Log files

A typical log file looks like the following:

2017/04/18 03:52:36 [12413389] [SESSION_ATTEMPTED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-1.example.com:4444] [1]
2017/04/18 03:52:40 [12413389] [SESSION_FAILED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-1.example.com:4444] Error forwarding the new session Request timed out waiting for a node to become available.
2017/04/18 03:52:40 [12413390] [SESSION_ATTEMPTED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-5.example.com:4444] [2]
2017/04/18 03:52:45 [12413390] [5.86s] [SESSION_CREATED] [my_quota] [192.168.2.3] [firefox-42.0] [firefox42-5.example.com:4444] [0c500a6f-98d2-4871-acb7-637d85e1416a] [2]
....
2017/04/18 03:53:05 [SESSION_DELETED] [192.168.2.3] [firefox42-5.example.com:4444] [0c500a6f-98d2-4871-acb7-637d85e1416a]

Every line contains:

FieldExampleNotes
Time2017/04/18 03:52:36
Request counter[12413389]So far as session ID is unknown when doing attempts this counter is used to find all session attempts for each new session request.
Status[SESSION_ATTEMPTED]See table below for complete list of statuses.
Quota name[my_quota]Extracted from basic HTTP auth headers.
User IP[192.168.2.3]IPv4 or IPv6 address
Browser[firefox-42.0]Name and version. Only present for new session requests.
Hub host[firefox42-1.example.com:4444]Host from quota XML file
Attempt number[1]For SESSION_ATTEMPTED entries means current attempt number. For SESSION_CREATED entries means total number of attempts to create this session.
Session ID[0c500a6f-98d2-4871-acb7-637d85e1416a]As arrived from hub
Session start time[5.86s]
ErrorError forwarding the new session Request timed out waiting for a node to become available.Only present for SESSION_FAILED

The following statuses are available:

StatusDescription
BAD_CAPABILITYUser is passing non-string value for capability that should be string
BAD_JSONUser request does not contain valid Selenium data
BAD_RESPONSEUpstream server returned data using unknown JSON protocol
BROWSER_NOT_SETBrowser name is not present or empty string
CLIENT_DISCONNECTEDUser disconnected and doing session attempts was interrupted
INITServer initialization messages
INVALID_HOST_VNC_URLFailed to parse VNC host URL specified in quota configuration
INVALID_DOWNLOAD_REQUEST_URLDownload request URL do not contain enough information to determine upstream host
INVALID_LOG_REQUEST_URLLog request URL do not contain enough information to determine upstream host
INVALID_VNC_REQUEST_URLVNC request URL do not contain enough information to determine upstream host
INVALID_VIDEO_REQUEST_URLVideo request URL do not contain enough information to determine upstream host
INVALID_URLSession ID does not contain information about host where it was created
PROXY_ERRORAn error occurred while proxying request
PROXYINGProxying Selenium request (shown in verbose mode only)
PROXYING_DOWNLOADStarting to proxy downloaded file from upstream host
PROXYING_LOGStarting to proxy log from upstream host
PROXYING_TO_VNCStarting to proxy VNC traffic
PROXYING_VIDEOStarting to proxy video from upstream host
QUOTA_INFO_REQUESTEDQuota information request arrived
ROUTE_NOT_FOUNDTrying to proxy session to unknown host. Usually means quota files inconsistency between multiple Ggr instances.
SESSION_ATTEMPTEDNew user request for session arrived
SESSION_CREATEDA new session was created and returned to user
SESSION_DELETEDExisting session was deleted by user request
SESSION_FAILEDSession attempt on specified host failed
SESSION_NOT_CREATEDAttempts to create a new session on all hosts failed. An error was returned to user.
SHUTTING_DOWNServer is shutting down and waiting graceful shutdown timeout for currently proxied requests to finish
UNKNOWN_DEVTOOLS_HOSTRequested to proxy devtools to host not present in quota
UNKNOWN_DOWNLOAD_HOSTRequested to proxy downloaded file to host not present in quota
UNKNOWN_LOG_HOSTRequested to proxy log to host not present in quota
UNKNOWN_VNC_HOSTRequested to proxy VNC to host not present in quota
UNKNOWN_VIDEO_HOSTRequested to proxy video to host not present in quota
UNSUPPORTED_BROWSERRequested browser name and version is not present in quota
UNSUPPORTED_HOST_VNC_SCHEMEInvalid URL protocol specified for host in quota VNC configuration (should be vnc:// or ws://)
WS_CLIENT_DISCONNECTEDClient disconnected from websocket API
WS_ERRORAn error occurred when trying to proxy websocket traffic
WS_SESSION_CLOSEDClient closed websocket session

Sometimes you may need to add some custom metadata like build number or branch name to Selenium logs. Just add the following capability to your tests under ggr:options:

Type: map, format: "<key>": "<value>"
labels: {"buildNumber": 122, "branch": "feature-XXX"}

With this capability browser column will look like this:

[firefox-42.0 buildNumber=122 branch=feature-XXX]

Such additional metadata in logs allows to better analyze respective Selenium sessions.