Chatnaut / Arclight

An open source server virtualization management solution based on QEMU/KVM. Manage virtual machines, containers, highly available clusters, storage and networks with an integrated, easy-to-use web interface or via CLI. (Featured on zeupiter.com)
https://chatnaut.com
Other
158 stars 13 forks source link

Error: Arc api not running #17

Closed MikuMikuMe closed 1 year ago

MikuMikuMe commented 1 year ago

After installing and setting up reverse proxy. I can't login to the control panel, it is giving out Error: Arc api not running.

/root/.pm2/logs/arc-error.log last 100 lines:
0|arc      | 18-08 16:34:07.271: Error: Cannot init client. Please provide correct options
0|arc      | 18-08 16:34:07.271:     at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19)
0|arc      | 18-08 16:34:07.271:     at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16)
0|arc      | 18-08 16:34:07.271:     at Object.<anonymous> (/var/www/html/arclight/app.js:36:23)
0|arc      | 18-08 16:34:07.271:     at Module._compile (node:internal/modules/cjs/loader:1126:14)
0|arc      | 18-08 16:34:07.271:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
0|arc      | 18-08 16:34:07.271:     at Module.load (node:internal/modules/cjs/loader:1004:32)
0|arc      | 18-08 16:34:07.271:     at Function.Module._load (node:internal/modules/cjs/loader:839:12)
0|arc      | 18-08 16:34:07.271:     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
0|arc      | 18-08 16:34:07.271:     at node:internal/main/run_main_module:17:47
0|arc      | 18-08 16:34:07.960: Assertion failed: You must provide either mongoUrl|clientPromise|client in options
0|arc      | 18-08 16:34:07.962: /var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119
0|arc      | 18-08 16:34:07.962:             throw new Error('Cannot init client. Please provide correct options');
0|arc      | 18-08 16:34:07.962:             ^
elondust commented 1 year ago

Run the following commands to kill api processes.

pm2 kill
pm2 flush
cd /var/www/html/arclight
pm2 start npm --name "arc"  --log-date-format 'DD-MM HH:mm:ss.SSS' -- start
MikuMikuMe commented 1 year ago

Run the following commands to kill api processes.

pm2 kill
pm2 flush
cd /var/www/html/arclight
pm2 start npm --name "arc"  --log-date-format 'DD-MM HH:mm:ss.SSS' -- start

Thank you. That worked, but I already ran those commands before the certbot.

MikuMikuMe commented 1 year ago

Run the following commands to kill api processes.

pm2 kill
pm2 flush
cd /var/www/html/arclight
pm2 start npm --name "arc"  --log-date-format 'DD-MM HH:mm:ss.SSS' -- start

Hi, it also looks like novnc is not running, I didn't get any output after running netstat -tulpn | grep 6080.

In the vm page it stated VNC Port: 5900, but the console is trying to open port 6080.

elondust commented 1 year ago

Signout and Signin again and see if it works, also u can check out the errors in the noVNC logs. Which version of ubuntu are you using right now?

MikuMikuMe commented 1 year ago

I did try to log out and login again but it didn't work. I am using Ubuntu20.04.4LTS

Sorry for asking this but how to check the logs of novnc?

S4nfs commented 1 year ago

@Dep0s1t You can check the log files either in the logs section of the dashboard or by going to /var/www/html/arclight/logs. If everything's correct you won't see any errors in the timestamps.

MikuMikuMe commented 1 year ago
/var/www/html/arclight/apps/noVNC/utils/websockify/websockify/websocket.py:30: UserWarning: no 'numpy' module, HyBi protocol will be slower
  warnings.warn("no 'numpy' module, HyBi protocol will be slower")
WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /var/www/html/arclight/apps/noVNC
  - No SSL/TLS support (no cert file)
Traceback (most recent call last):
  File "./apps/noVNC/utils/websockify/run", line 5, in <module>
    websockify.websocketproxy.websockify_init()
  File "/var/www/html/arclight/apps/noVNC/utils/websockify/websockify/websocketproxy.py", line 582, in websockify_init
    server.start_server()
  File "/var/www/html/arclight/apps/noVNC/utils/websockify/websockify/websockifyserver.py", line 714, in start_server
    lsock = self.socket(self.listen_host, self.listen_port, False,
  File "/var/www/html/arclight/apps/noVNC/utils/websockify/websockify/websockifyserver.py", line 468, in socket
    sock.bind(addrs[0][4])
OSError: [Errno 98] Address already in use

This is what I got. At first it was /usr/bin/env: python: No such file or directory so I created a symlink for it.

elondust commented 1 year ago

According to last line the noVNC process is already in use. Kill the python process tied to noVNC sudo netstat -tulpn | grep 6080 with PID number and signin again.

MikuMikuMe commented 1 year ago

According to last line the noVNC process is already in use. Kill the python process tied to noVNC sudo netstat -tulpn | grep 6080 with PID number and signin again.

Sorry for the late reply, I almost forgot about this, I did what you said and after that it's just a blank page for console.

Image
elondust commented 1 year ago

It should be running properly after this. Are you using self-signed certificate for the console, if not then i recommend you to go for the second method by attaching your own domain and encrypt using Let's encrypt.

Also the SSH Terminal and noVNC uses the same configuration path and if there is some mistake after the post-installation configuration, both will throw errors in the logs. Try to post logs here.

elondust commented 1 year ago

I am closing this issue because it has not had recent activity. Also, there's a new patch update available, make sure to update the console to the latest version.