How do I configure the studio server port and its interpreter’s default port to available ports?
To reconfigure port numbers:
- Run the command
install.sh -uto change the current studio port to the desired port number in the configuration files/tables. - Run the t
startup.shscript of Studio at the location: OFS_MMG/mmg-studio/bin/ and modify the line numbers 24/25 of OFS-MMG/mmg-studio/bin/startup.sh to specify the interpreter name and port number.DS version 22.4.3
nohup "$DIR"/datastudio --jdbc -1 --eventjdbc -1 --shell -1 --eventshell -1 --graalvm -1 --eventgraalvm -1 --pgx -1 --eventpgx -1 --external --port 8008 --jdbc 3011 --eventjdbc 3031 --python 3012 --eventpython 3032 --markdown 3009 --eventmarkdown 3029 --spark 3014 --eventspark 3034 &> "$DIR"/nohup.out &
For PGX Interpreter, modify: OFS_MMG/mmg-studio/interpreter-server/pgx-interpreter-22.4.3/bin/pgx-interpreter file "${1:-7022}" "${2:-7042}" values to "${1:-3022}" "${2:-3042}"
DS version 23.3.5
nohup "$DIR"/datastudio --jdbc -1 --shell -1 --external --port 8008 --jdbc 3011 --python 3012 --markdown 3009 --spark 3014 --pgx 3022 &> "$DIR"/nohup.out
For event ports in DS 23.3.5
Set the environment variables DS_EVENT_HANDLER_HOST and DS_EVENT_HANDLER_PORT before launching the interpreters, else, default values will be used. You can modify these ports in the startup.sh of the Studio.
Example:
export DS_EVENT_HANDLER_HOST=localhost
export DS_EVENT_HANDLER_PORT=3432
To change the ports configured for events in the Data Studio server, modify the following server configuration:
studio-server:
thrift-server:
enabled: true
port: <desired port -defaulted to 8432>
mode: TCP
NOTE:
************
Python Interpreter
Beginning with Data Studio 21.4.0, 6012 is default port on which the REST server for the Python interpreter listens. To overwrite this, set the STUDIO_INTERPRETER_PYTHON_INTERPRETER_REST_SERVER_PORT environment variable.
PGX-Python Interpreter
Beginning with Data Studio 23.1.0, 6022 is the default port on which the REST server for the PGX-Python interpreter listens. To overwrite this, set the STUDIO_INTERPRETER_PGX_PYTHON_INTERPRETER_REST_SERVER_PORT environment variable.
Modify the
startup.shto:export STUDIO_INTERPRETER_PYTHON_INTERPRETER_REST_SERVER_PORT=3038
export STUDIO_INTERPRETER_PGX_PYTHON_INTERPRETER_REST_SERVER_PORT=3039
This configuration changes the default interpreter ports to new ports.
- Ports mentioned in the interpreter json files should be reconfigured. The interpreter file location is: “OFS_MMG/mmg-studio/server/builtin/interpreters/<interpreter>.json” file.
- Execute startup.sh and check the studio/interpreter ports.
- Similarly, execute ./datastudio.sh –help from OFS_MMG/mmg-studio/bin/ for all available options.
- Change the Datastudio URL with the desired
DS port. install.sh -umust be triggered to change the current studio port to 8008 in the configuration files/tables. - After successful execution of install.sh. The ports can be updated by the user in the startup.sh of studio in the path
OFS_MMG/mmg-studio/bin/.- Edit line no 24/25 of
OFS-MMG/mmg-studio/bin/startup.shand change as below by specifying the interpreter name and port to be modified.- In DS version 22.4.3
nohup "$DIR"/datastudio --jdbc -1 --eventjdbc -1 --shell -1 --eventshell -1 --graalvm -1 --eventgraalvm -1 --pgx -1 --eventpgx -1 --external --port 8008 --jdbc 3011 --eventjdbc 3031 --python 3012 --eventpython 3032 --markdown 3009 --eventmarkdown 3029 --spark 3014 --eventspark 3034 &> "$DIR"/nohup.out
For PGX Interpreter
Change it directly in the OFS_MMG/mmg-studio/interpreter-server/pgx-interpreter-22.4.3/bin/pgx-interpreter file "${1:-7022}" "${2:-7042}" values to "${1:-3022}" "${2:-3042}"
- In DS version 23.3.5nohup "$DIR"/datastudio --jdbc -1 --shell -1 --external --port 8008 --jdbc 3011 --python 3012 --markdown 3009 --spark 3014 --pgx 3022 &> "$DIR"/nohup.out & For event ports in DS 23.3.5 You need to set the environment variables DS_EVENT_HANDLER_HOST and DS_EVENT_HANDLER_PORT before interpreters are launched. Otherwise, the default values are used. This can be mentioned in the
startup.shof studio. example:- export DS_EVENT_HANDLER_HOST=localhost
- export DS_EVENT_HANDLER_PORT=3432
In order to change the port listening for events in the Data Studio server, adapt following server configuration:- studio-server:
- thrift-server:
- enabled: true
- port: <desired port -defaulted to 8432>
- mode: TCP
- thrift-server:
- Generic Notes
Python Interpreter
Starting from Data Studio 21.4.0, the REST server for the Python interpreter listens on port 6012 by default. One can overwrite this by setting the STUDIO_INTERPRETER_PYTHON_INTERPRETER_REST_SERVER_PORT environment variable.
PGX-Python Interpreter
Starting from Data Studio 23.1.0, the REST server for the PGX-Python interpreter listens on port 6022 by default. One can overwrite this by setting the STUDIO_INTERPRETER_PGX_PYTHON_INTERPRETER_REST_SERVER_PORT environment variable.
The above can be mentioned in the
startup.shof studio as export STUDIO_INTERPRETER_PYTHON_INTERPRETER_REST_SERVER_PORT=3038 export STUDIO_INTERPRETER_PGX_PYTHON_INTERPRETER_REST_SERVER_PORT=3039The above configuration will change the default interpreter ports and reconfigure to listen to the new ports. (For example: As mentioned in the below table).
- In DS version 22.4.3
- Ports mentioned in the interpreter json files also needs to be reconfigured. The interpreter file locations can be found at “OFS_MMG/mmg-studio/server/builtin/interpreters/<interpreter>.json” file.
- Execute startup.sh and check the studio/interpreter ports.
- Similarly you can execute as ./datastudio.sh –help from OFS_MMG/mmg-studio/bin/ location for all the available options.
The above steps will reconfigure Server/Interpreter to these ports:- Server/Interpreters Modified Port
- DS Studio port 8008
- Jdbc 3011
- eventjdbc 3031
- python 3012
- eventpython 3032
- markdown 3009
- eventmarkdown 3029
- spark 3014
- eventspark 3034
- pgx 3022
- eventpgx 3042
- Edit line no 24/25 of