Additional Launching Mechanisms#

In most cases (GUI and command line) the Nexus launcher is the best method to start/stop a server. However, there are multiple ways to launch a Nexus local server from within other applications.

Option 1: Ansys Dynamic Reporting Template Editor#

From a command prompt / shell, type:

adr_template_editor

This will launch the Ansys Dynamic Reporting Template Editor:

Image

You can use this application to start a local Nexus server. Go into the Edit menu:

Image

Two options appear. The first will allow you to create a new database, the second to launch the Nexus server. If you need to create a new database, select the first option. A new window will pop up to ask where you want to create the database. Browse your directories and set where the empty database should be. The directory will be updated to include a 'media' directory, a 'manage.py' file, a 'view_report.nexdb' and a 'db.sqlite3' file.

After this step, or if you already have a database you want to connect the Nexus server to, select the Tools -> "Launch local Nexus server" option. A widget will appear:

Image

If you answer No, the Nexus server will stay up even if you close the Ansys Dynamic Reporting Template Editor application. Next, a widget will ask if the database should be deleted once the Ansys Dynamic Reporting Template Editor is closed:

Image

If you select Yes, the database will be marked for deletion. You will then be prompt to select the db.sqlite3 file in the database you want to connect to. Finally, set the port on which the Nexus server should run. The server is now up and running.

Option 2: EnSight#

From EnSight, you can access Ansys Dynamic Reporting through the Reports menu -> Connect to a report server:

Image

A dialog on how to start/connect to a Nexus server will appear:

Image

You can use this dialog to launch a new Nexus server with a new database, to launch a Nexus server connected to an existing database, or to connect to an already running Nexus server.

If you already have a database, then select the second option: "Launch a report server using a previously created report database and connect to it". A widget will appear asking you to select the db.sqlite3 file from the database you want to use. Then, the server will be launched.

Option 3: From the database#

This option can only be adopted if you already have a database and want to start the Nexus service on top of it. Navigate into the database directory, and double click on the "view_report.nexdb" file. This will automatically launch the Nexus server.

Once the server has been launched with any of the above mechanisms, the following dialog box will be displayed.

Image

A server is now up and running on your local system (Note: a new console window may be opened to support the server). If you click on the URL listed in the dialog box, a web browser window will be opened displaying the web interface to the server. It will look something like this:

Image

Any server launched locally will only be accessible on the machine it is launched on as the server will reject external access as a security measure. You will also need a username and password to be able to modify the database. No username or password are required to display items in the database directly or via reports.

The first option from the EnSight's menu ("Create a new report database, launch a report server and connect to it") will behave in the same way, with the addition that it will prompt for the directory where to create a new database before setting up the Nexus server. That is equivalent to using the "Ansys Dynamic Reporting Template Editor" -> Tools -> "Create a new Nexus server database" to first create an empty database and then "Ansys Dynamic Reporting Template Editor" -> Tools -> "Launch local Nexus server" to start a Nexus server on top of that new database.

Changing a Nexus server/database password#

When a database is initially created, it will have the username 'nexus' and the password 'cei'. This can be changed by options in the server itself. First, use the 'Log in' option at the top right of the Nexus server web pages. Enter the current database username and password to log in. Once logged in, the Information menu will include a User administration option.

Image

The administration pages will allow you to add more users, modify existing users, etc. This information is saved in the database and will be used by any Nexus server that is launched with the database listed in the Information->About page. Please note that operations performed on these pages control access to your Nexus server and the data it contains. Ansys is not able to recover passwords you change on these pages so use them with caution.

Connecting to a running server#

The template editor application will be connected to any servers it launches automatically and will allow you to create and edit report templates as well as copy data items between servers. If you are launching the application and the server you want to access is already running, the dialog box presented when the tool is launched will allow you to connect to an arbitrary server.

Image

If you are connecting to a local server, the 'Select Local Server...' button will fill out the dialog box after prompting you for the port number of the server. Note: it assumes that the username is 'nexus' and the password is 'cei'. You can also connect to a different server using the 'File->Disconnect from current Nexus server' and 'File->Connect to a Nexus server...' menu options.

Shutting down a server#

Unless explicitly shut down, a Nexus server will continue to run in the background on most systems. On Windows, closing the Nexus server console window will kill the server, but on other platforms the server may continue to run. Remember to manually shut servers you no longer need down. When you are done using the server, you can stop it via the 'Tools->Stop local Nexus server' menu. Note that this will shut down only the server you are currently connected to.