Product Documentation

FairCom DB V12 Updates

Previous Topic

Next Topic

Ports

The FairCom Server provides services over TCP/IP ports and shared memory. These services include APIs and browser-based applications for managing and exploring the Server.

Default FairCom Connection Strings

Protocol

Connection String

ISAM

FAIRCOMS@localhost:5597

iSQL

isql -u ADMIN -p ADMIN 6597@localhost:ctreeSQL

iSQL secure

isql -u ADMIN -p ADMIN ssl:6597@localhost:ctreesql

JDBC

getConnection("jdbc:ctree://localhost:6597/ctreeSQL", "ADMIN", "ADMIN")

Python SQL

pyctree.connect(user='ADMIN',password='ADMIN',database='ctreeSQL',host='localhost',port='6597')

ADO.NET

User ID=ADMIN;Password=ADMIN;database=ctreeSQL;server=localhost;port=6597

PHP SQL

ctsql_connect(":6597@localhost:ctreeSQL", "ADMIN", "ADMIN")

Default Protocols, Ports, and Names

API

Protocol

Port or Name

SQL

TCP/IP

6597

JSON NAV API

WebSocket

8081

MQTT (optional)

WebSocket

8081

MQTT (primary)

TCP/IP

1883

ISAM & CTDB

TCP/IP

5597

ISAM & CTDB

Shared Memory

FAIRCOMS

REST

HTTPS over TCP/IP

8443

FairCom Web Apps

HTTPS over TCP/IP

8443

Replication Manager Web App

HTTPS over TCP/IP

7000

See Also:

For example, when the FairCom Server is running and TCP/IP ports are not blocked, you can use a web browser to run the FairCom browser‑based applications and a simple REST API via https://localhost:8443 or the insecure HTTP protocol http://localhost:8080/

Troubleshooting Connections

If a port is not working, check the following:

  1. Ensure the FairCom server is running.
  2. Ensure your firewall is not blocking the port.
  3. Check to see if another application is already using the port.

Tip: If the localhost domain name does not work, use the IP Address 127.0.0.1.

The FairCom Server provides a variety of services that require TCP/IP ports for communication. The table below lists these ports and explains the configuration file and keywords that affect them.

Note: If a port is not working, check your firewall to make sure it is not blocked. Also check to see if another application is using the same port.

The ports listed below are defaults. FairCom recommends using the defaults until you are familiar with the FairCom Server.

You may want to change ports for the following reasons:

  1. Avoid colliding with a port used by an existing application
  2. Avoid a port blocked by a firewall
  3. Run multiple instances of the FairCom Server on the same computer.

Note: If you change ports, be sure to use ports that are not in use; otherwise, port conflicts will prevent you from being able to communicate with the FairCom Server.

Service

Port

Config File

Setting

Examples & Notes

FairCom Web Applications

8443

cthttpd.json

V12.5: "https_port": 8443

V12: "listening_https_port": 8443

https://localhost:8443/

 

MQTT Explorer - SSL

8443

cthttpd.json

V12.5: "https_port": 8443

V12: "listening_https_port": 8443

https://localhost:8443/mq/

https://localhost:8443/mqttexplorer/

SQL Explorer - SSL

8443

cthttpd.json

V12.5: "https_port": 8443

V12: "listening_https_port": 8443

https://localhost:8443/sql/

https://localhost:8443/sqlexplorer/

ACE Monitor - SSL

8443

cthttpd.json

V12.5: "https_port": 8443

V12: "listening_https_port": 8443

https://localhost:8443/monitor/

https://localhost:8443/acemonitor/

REST API - SSL

8443

cthttpd.json

V12.5: "https_port": 8443

V12: "listening_https_port": 8443

https://localhost:8443/ctree/api/v1/openapi

Insecure HTTP Port

8080

cthttpd.json

V12.5: "http_port": 8080

V12: "listening_http_port": 8080

The apps and REST API above can use this port when a secure connection is NOT required (e.g., in a development lab)

Replication Manager

7000

ctagent.json

"memphis_sql_port": 7000

FairCom’s Replication Manager web application

MQTT

1883

cthttpd.json

V12.5: "mqtt_port": 1883

V12: "mqtt_listening_port": 1883

Publish and subscribe to MQTT messages

WebSocket for JSON NAV API & MQTT protocol

8081

cthttpd.json

V12.5: "websocket_port": 8081

V12: "mqtt_websocket_port": 8081

Used by FairCom’s MQTT Explorer for MQTT messages

c-treeDB, FairCom DB ISAM, FairCom Low-Level APIs

5597

ctsrvr.cfg

SERVER_PORT 5597

Used by FairCom’s client driver to communicate with server

SQL API

6597

ctsrvr.cfg

SQL_PORT 6597

Used by FairCom’s Server for SQL communications

Node‑RED

1880

settings.js

"uiPort": 1883

Node-RED is an open-source project that can use the FairCom Server. It is not a FairCom product. Its configuration file, settings.js, is located in the folder where you installed Node-RED. Caution: By default, Node-RED communicates passwords in the clear. Node-RED can be secured.

FairCom ports are configured in configuration files located in <faircom>/config. You can change them using any text editor.

  • Files with the .json extension must follow the syntax rules of JSON files.
  • Files with the .cfg extension are FairCom’s configuration files.
    • One property per line
    • Property name is followed by white space and the property value.
    • A semi-colon (";") at the beginning of the line comments out the line.

As always, be security conscious with which database services are running and listening on ports. Less access is better. You can turn off services by disabling plug-ins.

Tip: If the localhost domain name does not work, use the IP Address 127.0.0.1.

See Also:

  • Configuring Ports
  • Connecting

TOCIndex