Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Arc api not running #17

Closed
MikuMikuMe opened this issue Aug 18, 2022 · 11 comments
Closed

Error: Arc api not running #17

MikuMikuMe opened this issue Aug 18, 2022 · 11 comments

Comments

@MikuMikuMe
Copy link

MikuMikuMe commented Aug 18, 2022

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Author

MikuMikuMe commented Aug 18, 2022

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Contributor

S4nfs commented Aug 19, 2022

@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
Copy link
Author

MikuMikuMe commented Aug 19, 2022

/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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

elondust commented Sep 2, 2022

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
Copy link
Collaborator

elondust commented Sep 9, 2022

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 elondust closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants