2

While trying to run metasploit in arch linux im getting

[root@archserver ~]# msfconsole
[-] Failed to connect to the database:
PG::InvalidParameterValue: ERROR:  invalid value for parameter
"TimeZone": "UTC" : SET time zone 'UTC'

Postgres configuration is done and db is also created

My database.yml is

production:
 adapter: postgresql
 database: msf
 username: root
 password: root
 host: localhost
 port: 5432
 pool: 5
 timeout: 5
Naveen Siva
  • 202
  • 1
  • 9

2 Answers2

1

This can also happen if you have multiple postgres instances running. This happened when I installed postgres@9.4 via homebrew then later uninstalled and installed an updated version of postgres. What I failed to realize was, postgres@9.4 was still running in the background

To verify. Open up a terminal and type:

ps axw | grep postgres

If multiple instances of postgres are found. Issue a kill command on the respective pid. i.e. kill 234

Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215
0

Fixed it by editing SET time zone 'UTC' in /opt/metasploit/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb

Naveen Siva
  • 202
  • 1
  • 9