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

web ui not showing up #26

Open SamEsmailR opened 1 month ago

SamEsmailR commented 1 month ago

i have a digital ocean droplet and the virtualization is supported i am using ubuntu 20.04 i tried both 18 and 24 as well but the ui is not showing when i try to go to the ip of the machine using https://ip-of-machine but when i open http://ipofmachine:3000 i see some broken ui. Can someone please guide me whats the issue i dont have any errors during installation and the only error i have in pm2 logs is this

| 2024-06-06 14:50:02 059: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-06 14:50:02 059: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-06 14:50:02 059: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-06 14:50:02 059: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-06 14:50:02 997: ReferenceError: connectFlash is not defined 0|arc | 2024-06-06 14:50:02 997: at Object. (/var/www/html/arclight/app.js:59:5) 0|arc | 2024-06-06 14:50:02 997: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-06 14:50:02 997: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-06 14:50:02 997: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-06 14:50:02 997: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-06 14:50:02 997: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-06 14:50:02 997: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-06 14:50:02 997: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-06 14:50:02 997: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-06 14:50:02 997: at Function.Module._load (node:internal/modules/cjs/loader:911:12)

i tried correcting the iport and removing it as well but still getting the connectFlash error, i used the script to install.

S4nfs commented 1 month ago

You aren't supposed to worry about the API running on port 3000. Just paste the logs here by finding the process ID of arc api PM2 processes using pm2 status (it should be 0), and then run pm2 logs 'YOUR_PROCESS_NAME_OR_ID' --err --lines 100 in your terminal.

SamEsmailR commented 1 month ago

I have the ui up and running now, it was a certificate issue but now i am not able to create a admin account it says "Error: Arc api not running on the signin page" this came after i entered credentials to create admin account. Got this with the pm2 status image

and this using the command - pm2 logs 0 --err --lines 100 [TAILING] Tailing last 100 lines for [0] process (change the value with --lines option) /root/.pm2/logs/arc-error.log last 100 lines: 0|arc | 2024-06-07 04:19:41 391: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:41 391: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:41 391: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:41 391: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:41 874: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:41 878: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:41 878: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:41 878: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:41 878: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:41 878: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:41 878: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:41 878: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:41 878: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:41 878: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:41 878: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:41 878: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:42 361: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:42 364: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:42 364: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:42 364: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:42 364: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:42 364: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:42 364: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:42 364: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:42 364: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:42 364: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:42 364: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:42 364: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:42 863: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:42 866: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:42 866: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:42 866: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:42 866: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:42 866: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:42 866: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:42 866: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:42 866: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:42 866: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:42 866: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:42 866: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:43 375: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:43 378: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:43 378: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:43 378: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:43 378: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:43 378: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:43 378: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:43 378: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:43 379: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:43 379: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:43 379: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:43 379: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:43 919: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:43 922: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:43 922: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:43 922: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:43 922: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:43 922: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:43 922: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:43 922: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:43 922: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:43 922: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:43 922: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:43 922: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:44 441: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:44 443: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:44 443: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:44 443: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:44 443: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:44 443: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:44 443: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:44 443: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:44 443: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:44 443: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:44 443: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:44 443: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:44 949: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:44 952: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:44 952: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:44 952: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:44 952: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:44 952: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:44 952: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:44 952: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:44 952: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:44 952: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:44 952: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:44 952: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:45 497: Assertion failed: You must provide either mongoUrl|clientPromise|client in options 0|arc | 2024-06-07 04:19:45 500: Error: Cannot init client. Please provide correct options 0|arc | 2024-06-07 04:19:45 500: at new MongoStore (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:119:19) 0|arc | 2024-06-07 04:19:45 500: at Function.create (/var/www/html/arclight/node_modules/connect-mongo/build/main/lib/MongoStore.js:136:16) 0|arc | 2024-06-07 04:19:45 500: at Object. (/var/www/html/arclight/app.js:36:23) 0|arc | 2024-06-07 04:19:45 500: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:45 500: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) 0|arc | 2024-06-07 04:19:45 500: at Module.load (node:internal/modules/cjs/loader:1076:32) 0|arc | 2024-06-07 04:19:45 500: at Function.Module._load (node:internal/modules/cjs/loader:911:12) 0|arc | 2024-06-07 04:19:45 500: at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 0|arc | 2024-06-07 04:19:45 500: at Module._compile (node:internal/modules/cjs/loader:1198:14) 0|arc | 2024-06-07 04:19:45 500: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)

SamEsmailR commented 1 month ago

i fixed the above issue as well, the mongo url was missing from env variables i exported it and it worked now when i create a vm i am not able to console into it i get this image

and this

image

ssl is working i used a self signed certificate as instructed in the guide also in the logs i got this /var/www/html/arclight/logs# cat novnc.log /usr/bin/env: 'python': No such file or directory, this is shown both in the location in file /var/www/html/arclight/logs/Novnc.log and in the logs section on the ui as well image

added this in the settings as well image

Also in the terminal tab of the UI i got this image

in the console om2 logs i got this 0|arc | 2024-06-07 05:42:18 306: GET /v1/config/arc_config/66628a80f1f67ff8db0195e1 200 11.600 ms - 323 0|arc | 2024-06-07 05:44:22 547: OUPUT: undefined 0|arc | 2024-06-07 05:44:22 797: POST /v1/terminal/wssh 200 250.818 ms - 823 0|arc | 2024-06-07 05:44:22 800: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client 0|arc | 2024-06-07 05:44:22 800: at new NodeError (node:internal/errors:387:5) 0|arc | 2024-06-07 05:44:22 800: at ServerResponse.setHeader (node:_http_outgoing:644:11) 0|arc | 2024-06-07 05:44:22 800: at ServerResponse.header (/var/www/html/arclight/node_modules/express/lib/response.js:794:10) 0|arc | 2024-06-07 05:44:22 800: at ServerResponse.send (/var/www/html/arclight/node_modules/express/lib/response.js:174:12) 0|arc | 2024-06-07 05:44:22 800: at ServerResponse.json (/var/www/html/arclight/node_modules/express/lib/response.js:278:15) 0|arc | 2024-06-07 05:44:22 800: at Socket. (/var/www/html/arclight/routes/terminal.js:17:32) 0|arc | 2024-06-07 05:44:22 800: at Socket.emit (node:events:513:28) 0|arc | 2024-06-07 05:44:22 800: at addChunk (node:internal/streams/readable:315:12) 0|arc | 2024-06-07 05:44:22 800: at readableAddChunk (node:internal/streams/readable:289:9) 0|arc | 2024-06-07 05:44:22 800: at Socket.Readable.push (node:internal/streams/readable:228:10) { 0|arc | 2024-06-07 05:44:22 800: code: 'ERR_HTTP_HEADERS_SENT' 0|arc | 2024-06-07 05:44:22 800: } 0|arc | 2024-06-07 05:44:23 561: Listening on port: 3000

S4nfs commented 1 month ago

The Python error occurred because the system could not find the Python interpreter. You can try installing Python 2.x to see if it resolves the issue, or create a symlink to check if Python 3.x exists. I will try to recreate the same error, the last time i tested arclight the VNC console was not functioning correctly and this is what building with nodejs feels like, though the project was last updated 10 months ago, leading to numerous changes in dependencies, particularly with noVNC package, which Arclight was using. If you need a temporary workaround, you can try arclight v1.0.0, which lacks some features but functions since it doesn't rely on Node.js and was stable before the migration to Node.js. Please ensure to completely remove Arclight: https://docs.chatnaut.com/Arclight_doc_v1.0.0.pdf

S4nfs commented 1 month ago

All your errors are related to the missing admin account., that's why you are seeing MongoDB client errors. After installations, you need to go to: http://machine-ip-address/arclight to create an admin account from your browser. This information is somewhat missing in the Arclight docs, which I will update just now.

SamEsmailR commented 1 month ago

Can you share some details as to how vnc is being used and setup to show the vms because all the vms by default have internal ip addresses of the host machine on lease by dhcp, so how is archlight able to vnc into the correct one since there can be multiple vms and how does it track which vm to vnc into and how that mechanism work. I was trying to do it using guacamole server i tried to install windows vm but i am only able to vnc into it after the initial windows install setup is completed and vnc is installed on it this is regarding i was working in the past on my own, thanks

S4nfs commented 1 month ago

Arclight uses the lightweight version of noVNC, You can get the whole documentation here . The lightweight version does not require building a package but comes with its own set of advantages and disadvantages. Upon logging into Arclight, it automatically initiates the noVNC websockify server and begins listening on port 6080, (certs attached). Since noVNC operates within a web browser, a method to proxy VNC connections through a web server and forward them to the intended virtual machines (VMs) is necessary. In environments based on KVM, each VM can be allocated a unique port number for remote access. To establish a connection with a specific VM, Arclight employs libvirt APIs to retrieve the VM's port number and then randomizes the tokenized URL to a format similar to http://your_server_ip:vm_port?token=UGiguiwekwerbw, facilitating future connections and to maintain security.