-1

When using npm start to start AGE Viewer, I get the following error in my terminal.

Error: Not connected
    at _callee4$ (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:64:19)
    at tryCatch (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17)
    at Generator.<anonymous> (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22)
    at Generator.next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21)
    at asyncGeneratorStep (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
    at /home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7
    at new Promise (<anonymous>)
    at apply (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:12)
    at getMetadata (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:66:6)
info: ::ffff:127.0.0.1 - - [05/Aug/2023:04:50:51 +0000] "POST /api/v1/db/meta HTTP/1.1" 500 51
 {"timestamp":"2023-08-05 05:50:51"}
Error: Not connected
    at _callee3$ (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:54:19)
    at tryCatch (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17)
    at Generator.<anonymous> (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22)
    at Generator.next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21)
    at asyncGeneratorStep (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
    at /home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:7
    at new Promise (<anonymous>)
    at apply (/home/hallixon/age-viewer/backend/node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:12)
    at getStatus (/home/hallixon/age-viewer/backend/src/controllers/databaseController.js:56:6)
info: ::ffff:127.0.0.1 - - [05/Aug/2023:04:50:51 +0000] "GET /api/v1/db HTTP/1.1" 500 51
 {"timestamp":"2023-08-05 05:50:51"}
info: ::ffff:127.0.0.1 - - [05/Aug/2023:04:50:51 +0000] "GET /api/v1/miscellaneous HTTP/1.1" 304 -
 {"timestamp":"2023-08-05 05:50:51"}

Still, AGE Viewer runs just fine on port 3000.

Now, I'm trying to connect to my database on Viewer, and I get the error 'Metadata Load Error'. Error message shown in AGE Viewer

I also noticed that information about my graphs, nodes, and edges are missing. Clicking the dropdown to select Current Graph does not show any of my graphs.

I expected that information about the existing graphs, nodes, and edges in the database were displayed, and that there were no errors on connection to my database.

9 Answers9

1

The error is pointing to databaseController.js file of AGE backend and you need to check:

  • Database Driver
  • Database credential configuration

So, you need to review the above mentioned driver and database configuration to solve this metadata load error.

adil shahid
  • 125
  • 4
1

The error may be happening because you are using pg version > 12. In that case there should be a .version sql file in the backend folder of age-viewer. Because there's a code to fetch the sql version and match it with the .sql file, without which metadata endpoint will not give proper response, and so graph will also not load.

Sarthak
  • 380
  • 7
0

A postgres process should be running before you start AGE Viewer. The steps should be as follows:

  • Start a Postgres process
  • cd into the AGE Viewer directory and run npm run start
  • Connect to database on AGE Viewer.

Ensure the details of the postgres process match the details entered in AGE Viewer.

Tito
  • 289
  • 8
0

You may have forgotten to start the PostgreSQL server before running AGE Viewer

cd path/to/postgresql
bin/pg_ctl -D <cluster_name> -l logfile start

cd path/to/age-viewer
npm run start
Mohayu Din
  • 433
  • 9
0

This error may be happening because of your pg version. May be its greater than 12. Make sure to check the version or You may have forgotten to start the PostgreSQL server before running AGE Viewer.

cd path/to/postgresql
bin/pg_ctl -D <cluster_name> -l logfile start

cd path/to/age-viewer
npm run start
0

It's possible that the error is occurring due to the usage of PostgreSQL versions higher than 12. In such situations, there should be a .version.sql file located in the backend folder of Age-Viewer. This file is essential because it contains code to retrieve the SQL version and compare it with the corresponding .sql file. Without this essential step, the metadata endpoint won't provide accurate responses, and consequently, the graph won't load correctly.

-1

Make sure to run the Postgres server before running AGE-Viewer by using

bin/pg_ctl -D demoDataBase -l logfile start

and then cd into the age-viewer repository and run this commmand

npm run start

Lastly, in this part (photo) check both the credentials are exact same.

picture

-1

run the postgresql server before start the age-viewer project:

bin/pg_ctl -D demo -l log start

make sure that you are inside the age-viewer directory before run the npm run start command.

Marcos Silva
  • 115
  • 5
-1

You need to make sure an appropriate postgres version is being used along with the AGE Viewer. Moreover, make sure a postgres server is running in the background before accessing the AGE Viewer.