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

Unable to complete installation Caldera on Ubuntu 22.04 LTS as the docs described #2911

Open
KnightChaser opened this issue Mar 8, 2024 · 10 comments
Assignees
Labels

Comments

@KnightChaser
Copy link

Describe the bug
As the official documentation said, I tried installing Caldera on Ubuntu 22.04 LTS environment. The installation process looked fine and it ran, but an exception occurred and the process shut down when I tried to access Caldera via Chrome browser. I'm not 100% sure if there was my mistake during the procedure, but I think there is also a problem in Caldera.

To Reproduce
Steps to reproduce the behavior:

  1. Install Caldera as the documentation described.
git clone https://github.com/mitre/caldera.git --recursive --branch 5.0.0
cd caldera
pip3 install -r requirements.txt
python3 server.py --insecure
  1. After running the server, access Caldera via Chrome browser as the terminal shows.

Expected behavior
I should have been able to access Caldera through the web interface.

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 LTS at Virtual Machine(Windows 11, Intel x64 CPU architecture, VMware® Workstation 17 Pro(Version: 17.0.1 build-21139696))
  • Browser Chrome browser at Ubuntu VM, Official 64-bit build, version 122.0.6261.111
  • Version 5.0.0 magma

Additional context
I installed requirements and recommendations as the documentation described. Go(go1.22.1 linux/amd64) and Python3(Python 3.10.12 with pip3 installer) also installed too.

Copy link

github-actions bot commented Mar 8, 2024

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

@nikostzr
Copy link

nikostzr commented Mar 8, 2024

I have exactly the same issue.
I use the following during the first run:
python3 server.py --insecure --build
I tried installing both in a python venv dedicated to caldera and using the system's python/pip. No luck.
I use go version go1.21.6 linux/amd64 and Python 3.10.12 under Ubuntu 22.04

@KnightChaser
Copy link
Author

I have exactly the same issue. I use the following during the first run: python3 server.py --insecure --build I tried installing both in a python venv dedicated to caldera and using the system's python/pip. No luck. I use go version go1.21.6 linux/amd64 and Python 3.10.12 under Ubuntu 22.04

It looks like there are some unintended differences between the documentation and README.md at this repository because the documentation doesn't mention about --build option whereas README does. I also installed NPM and tried to run with --build parameters, but I encountered build errors related to Vite, even though I cleared my environment(So I even couldn't run the project.).

It looks like something is very wrong.

@elegantmoose
Copy link
Contributor

elegantmoose commented Mar 12, 2024

As per the README, you do need the --build when first run the server. README is always our definitive install guide, readthedocs can sometimes be lagging (apologies).

--> In docs now.

@elegantmoose
Copy link
Contributor

What issues with Vite where you having?

@Ch1l3n0
Copy link

Ch1l3n0 commented Mar 15, 2024

May be the same issue I'm having. I run python3 server.py --build and get the following error:

[vite:vue] Failed to resolve vue/compiler-sfc.
@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.
error during build:
Error: Failed to resolve vue/compiler-sfc.
@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.
    at resolveCompiler (/opt/caldera/plugins/magma/node_modules/@vitejs/plugin-vue/dist/index.js:3955:11)
    at Object.buildStart (/opt/caldera/plugins/magma/node_modules/@vitejs/plugin-vue/dist/index.js:4686:46)
    at /opt/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:22834:37
    at async Promise.all (index 4)
    at async /opt/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23622:13
    at async catchUnfinishedHookActions (/opt/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23132:20)
    at async rollupInternal (/opt/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23620:5)
    at async doBuild (/opt/caldera/plugins/magma/node_modules/vite/dist/node/chunks/dep-689425f3.js:41710:24)
    at async build (/opt/caldera/plugins/magma/node_modules/vite/dist/node/chunks/dep-689425f3.js:41552:16)
    at async CAC.<anonymous> (/opt/caldera/plugins/magma/node_modules/vite/dist/node/cli.js:738:9)
Traceback (most recent call last):
  File "/opt/caldera/server.py", line 249, in <module>
    subprocess.run(["npm", "run", "build"], cwd="plugins/magma", check=True)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['npm', 'run', 'build']' returned non-zero exit status 1.

@Ch1l3n0
Copy link

Ch1l3n0 commented Mar 15, 2024

Update on my last issue installing the server. My NodeJs version was out of date and did not comply with recommendations according to the docs. I used NVM to update the version to 16+ and everything worked fine. Unfortunately, the "updated" version from Ubuntu 22.04 rolling distro is only v12.

@KnightChaser
Copy link
Author

KnightChaser commented Mar 16, 2024

What issues with Vite where you having?

Sorry for the very late reply, I was also having the same issue related to the Vite that Ch1l3n0 left on this issue thread after trying to run Caldera with --build option. I will try installing again after updating my NodeJS version on Ubuntu.

@n0-ind3x
Copy link

Update on my last issue installing the server. My NodeJs version was out of date and did not comply with recommendations according to the docs. I used NVM to update the version to 16+ and everything worked fine. Unfortunately, the "updated" version from Ubuntu 22.04 rolling distro is only v12.

This fixed my NodeJs issues.. by upgrading..

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Builds and starts, however the home-screen for caldera dashboard is blank, just left menu bar viewable.

After about 30 seconds it will redirect you to the login screen..

And authenticating does nothing.. some is royally jacked with this release..

@elegantmoose
Copy link
Contributor

Builds and starts, however the home-screen for caldera dashboard is blank, just left menu bar viewable.

That sounds like maybe browser caching error. Maybe clear browser history.

Also, use bleeding edge, not version 5.0.0. --> git clone https://github.com/mitre/caldera.git --recursive (its been getting patches weekly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants