-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Open
Labels
StaleMarks an issue as stale, to be closed if no action is takenMarks an issue as stale, to be closed if no action is takenbug
Description
Steps to reproduce
How'd you do it?
Arch Linux
- sudo pacman -S metasploit , just installs metasploit
cd /opt/metasploitgem install bundlerbundle install->bundle complete, 19 gemfile dependencies- docker run postgres,
docker run --name some-postgres -e POSTGRES_PASSWORD=postgres -d postgres msfdb init --connection-string="postgresql://postgres:[email protected]:5432/postgres"Database initialization successfulmsfconsole -y ~/.msf4/database.yaml- terminal error:
/opt/metasploit/vendor/bundle/ruby/3.4.0/gems/activerecord-7.2.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in 'PG::Connection#exec': PG::UndefinedTable: ERROR: relation "workspaces" does not exist (ActiveRecord::StatementInvalid)
LINE 10: WHERE a.attrelid = '"workspaces"'::regclass
- postgres error:
2025-10-24 08:39:22.431 UTC [72] ERROR: permission denied for schema public at character 14
2025-10-24 08:39:22.431 UTC [72] STATEMENT: CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2025-10-24 08:39:22.442 UTC [72] ERROR: relation "workspaces" does not exist at character 523
2025-10-24 08:39:22.442 UTC [72] STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment,
attidentity AS identity,
attgenerated as attgenerated
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"workspaces"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
- I logged into the postgres to check the table
msf=> SELECT attrelid
msf-> FROM pg_attribute
msf-> WHERE attrelid = "workspace";
ERROR: column "workspace" does not exist
LINE 3: WHERE attrelid = "workspace";
Were you following a specific guide/tutorial or reading documentation?
If yes link the guide/tutorial or documentation you were following here, otherwise you may omit this section.
- https://wiki.archlinux.org/title/Metasploit_Framework (skipped rvm stage)
- https://docs.metasploit.com/docs/using-metasploit/getting-started/nightly-installers.html
Expected behavior
Get into the msfconsole
Current behavior
Error occurs on startup
Metasploit version
Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).
Framework Version: 6.4.92-dev
Additional Information
Deleted the text here per the issue instructions
I think there is something in the ruby code where the workspace-field should actually become an integer, but it isn't. Because the whole sql table column is only integers. I don't know ruby unfortunately, otherwise I would've digged into the source.
Have a great day and thank you for reading my post.
Metadata
Metadata
Assignees
Labels
StaleMarks an issue as stale, to be closed if no action is takenMarks an issue as stale, to be closed if no action is takenbug
Type
Projects
Status
No status