Skip to content

Frequently asked questions

This page contains a collection of common issues and questions that are encountered when configuring and using Analyst.

Before you start

First try clearing your browser’s cache and refreshing Analyst.

Starting from an existing process

To load Analyst into an existing q process, rather than starting the process with the launcher script, define the following environment variables in the process. Once set, the launcher can be loaded.

q)`ANALYST_HOME setenv "<path-to-analyst-install>"
q)`ANALYST_DATA setenv "<path-to-analyst-data-directory>"
\l <path-to-analyst-install>/launcher.q_

Set a port before loading the launcher.q_ script.

Namespaces

Analyst currently assigns to several namespaces for regular operation. The number of namespaces required will be reduced in future releases.

Currently Analyst requires the following namespaces for regular operation:

.ax           .axbits      .axdc      .axexport  .aximport  .axparser    .axq
.axsavestubs  .bct         .child     .core      .cov       .datatype    .ds
.edi          .export      .ext       .fb        .flow      .gg          .im
.localize     .localrepo   .mock      .nvqc      .pc        .pcre        .pcre2
.plugin       .pnull       .profile   .pview     .qc        .qch         .qd
.qdate        .qdtools     .qlint     .qp        .qtr       .qu          .qurl
.rch          .refactor    .registry  .rt        .sc        .signal      .skia
.skiaw        .ss          .st        .str       .table     .tmut        .tr
.tz           .utl         .vcs       .visgg     .vm        .ws          .wsi
.wsu          .wws

In future releases, most of the above namespaces will be prefixed with .ax to reduce potential collisions. Namespaces that appear in the Analyst Function Reference will not be renamed and can be relied on.

Adding a map API key

In order to use the Map plot type, a Google Maps key must be provided. Once a key is obtained, it can be added to the HTML at: $install/html/ax/app/inspector/index.html.

Within this file, there will be a script tag including Google Maps with a PUT_KEY_HERE parameter. Paste your key over the PUT_KEY_HERE value, and uncomment the script tag. Then, loading the Map plot in the visual inspector will work.

Running qCumber tests

QCumber can be run directly in the Analyst environment by selecting a test file, right clicking and selecting Code > Run Tests. You can also do this on a module level or a repository level. QCumber can also run tests using its test runner API. This can be done by using the following APIs.

.qu.runTestFile // pass the path to a file as a string or hsym
.qu.runTestFolder // pass the directory of tests that have a .quke extension as a string or hsym

Streamlined support for running libraries outside of the Analyst environment will be coming in a future release.

Automatic initialization when loading a module

Within a module, any function called onLoad will fire when the module is pulled into the workspace and on workspace load. The onLoad function will fire after all other functions and data artifacts have been loaded for the module. This can be used to set up any initial state or other setup required by the module.

Troubleshooting

Failed to start Analyst: library failed to load

If Analyst fails to load and there is a line like the following in the output then a library is failing to load.

libpng15.so.15: cannot open shared object file: No such file or directory
Failed to load Analyst: /home/kx/anaconda3/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_srp_password

A library may fail to load at various steps in the Analyst process life cycle, not just at process creation. If a process fails on startup then you will likely see a message similar to the one below at during create.

Steps to take:

  • Ensure all the required library dependencies are installed on the host server install location
  • Ensure that the configuration at $install/configs/confile.{profile,bat} has been sourced and ANALYST_HOME and ANALYST_DATA environment variables are defined

System library paths

In some circumstances, after installing the Anaconda dependency for embedPy, the system library paths can be modified. This may update the system PATH variable to point to incorrect versions of libraries and could cause them to fail when loading. Ensure that the PATH and LD_LIBRARY_PATH variables include the locations of the required dependencies before any Anaconda or other dependencies.

"Failed to load workspace: Error creating child process" when opening a workspace

It is possible for manual changes to a kdb+ install's q.k file to impact Analyst when loading a workspace. If this happens, a dialog with the above error message will appear when loading a workspace. Please attempt to load Analyst without any changes to q.k. If the issue persists, see the bug reporting procedure.

"OS reports: Protocol not available" when using .Q.hg or the Table Importer

When making a GET request to an HTTPS server using the Table Importer or .Q.hg, q fails with:

conn. OS reports: Protocol not available

and the q console may show errors similar to the following:

4699334252:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.240.1/libressl/crypto/bio/bss_file.c:255:fopen('', 'r')
4699334252:error:20074002:BIO routines:FILE_CTRL:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.240.1/libressl/crypto/bio/bss_file.c:257:
4699334252:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.240.1/libressl/ssl/ssl_rsa.c:727:
4699334252:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.240.1/libressl/crypto/bio/bss_file.c:122:fopen('', 'r')
4699334252:error:2006D080:BIO routines:BIO_new_file:no such file:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.240.1/libressl/crypto/bio/bss_file.c:125:
4699334252:error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.240.1/libressl/crypto/x509/by_file.c:252:

This error occurs when q cannot find a default CA certificate bundle when making an SSL/TLS request.

Steps to take:

  • Set the KX_SSL_CA_CERT_FILE environment variable to the location of a valid CA certificate bundle, or disable SSL verification.

Knowledge Base: SSL

Process unresponsive

If your process is performing a long-running operation or is stuck in a read loop, Analyst will become unresponsive.

// This will launch an interactive text editor at the command line and defer
// all signals to the kdb process. This will cause the process to block indefinitely
// and cause Analyst to be unresponsive.
\vi

At this point, the only way to make the process become responsive again is to stop the process with a SIGKILL or kill -9.

Clearing browser cache

A quick debugging step to eliminate any issue of cached sources is to clear your browser’s cache and refresh Analyst. To clear your browser’s cache, please refer to the vendor instructions for your browser. Below are the help links for the browsers supported by Analyst.

browser support link
Google Chrome https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en
Internet Explorer 11 https://support.microsoft.com/en-ca/help/17438/windows-internet-explorer-view-delete-browsing-history#ie=ie-11
Microsoft Edge https://support.microsoft.com/en-ca/help/10607/microsoft-edge-view-delete-browser-history
FireFox https://support.mozilla.org/en-US/kb/how-clear-firefox-cache