Arclight icon indicating copy to clipboard operation
Arclight copied to clipboard

Error: Arc api not running

Open MikuMikuMe opened this issue 3 years ago • 8 comments

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:             ^

MikuMikuMe avatar Aug 18 '22 14:08 MikuMikuMe

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

elondust avatar Aug 18 '22 14:08 elondust

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 avatar Aug 18 '22 14:08 MikuMikuMe

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.

MikuMikuMe avatar Aug 18 '22 15:08 MikuMikuMe

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?

elondust avatar Aug 18 '22 15:08 elondust

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?

MikuMikuMe avatar Aug 19 '22 01:08 MikuMikuMe

@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.

S4nfs avatar Aug 19 '22 04:08 S4nfs

/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.

MikuMikuMe avatar Aug 19 '22 18:08 MikuMikuMe

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.

elondust avatar Aug 19 '22 18:08 elondust

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

MikuMikuMe avatar Sep 01 '22 20:09 MikuMikuMe

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 avatar Sep 02 '22 07:09 elondust

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.

elondust avatar Sep 09 '22 18:09 elondust