Fossology Install & Config Issues...
I am attempting to install the Fossology <http://fossology.org/> OSS license
analysis software on a server running Ubuntu Linux and PostgreSQL. I have
gotten to the point where I am at the final install command, and I get an
error on a "dbcheck" program that says:
# Checking database connectivity
ERROR: Unable to connect to the database
Connection string: 'dbname=fossology host=localhost user=fossy
password=fossy'
Connection status: '1'
ERROR: Failed to open database
ERROR: Database not configured.
Check /usr/local/share/fossology/dbconnect/fossology then re-run the
install.
When I cat the file it looks like:
dbname=fossology;
host=localhost;
user=fossy;
password=fossy;
No where in the instructions has it asked me to "configure" the DB except
for a few config files that I had to alter:
I changed the /etc/postgresql/8.1/main/pg_hba.conf file to read:
#local all postgres ident sameuser
local all all trust
Then I restarted the server with the command: /etc/init.d/postgresql-8.1restart
It restarted fine.
Then tried to run the ./install.sh -f again
And I got the same "Database not configured" error again.
Other info that might be relevant:
/etc/passwd contains the following new entries:
fosstest:x:1000:1000:fosstest,,,:/home/fosstest:/bin/bash <= main system
user
postgres:x:109:120:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
fossy:x:1001:1001:FOSSology:/srv/fossology:/bin/bash (used to be /bin/false
but I changed it to /bin/bash in the hopes that it would work) <= password
is fossy
Thanks in advance for your help. Detailed config info can be provided to
anyone wishing to help me. Thank you!
--
Kurt Schroeder
kschroe@gmail.com
http://kurtandsandy.blogspot.com
Kurt Schroeder wrote:
I am attempting to install the Fossology <http://fossology.org/> OSS license
analysis software on a server running Ubuntu Linux and PostgreSQL. I have
gotten to the point where I am at the final install command, and I get an
error on a "dbcheck" program that says:# Checking database connectivity
ERROR: Unable to connect to the database
Connection string: 'dbname=fossology host=localhost user=fossy
password=fossy'
Connection status: '1'
ERROR: Failed to open database
ERROR: Database not configured.
Check /usr/local/share/fossology/dbconnect/fossology then re-run the
install.When I cat the file it looks like:
dbname=fossology;
host=localhost;
user=fossy;
password=fossy;No where in the instructions has it asked me to "configure" the DB except
for a few config files that I had to alter:I changed the /etc/postgresql/8.1/main/pg_hba.conf file to read:
#local all postgres ident sameuser
local all all trustThen I restarted the server with the command: /etc/init.d/postgresql-8.1restart
It restarted fine.
Then tried to run the ./install.sh -f again
And I got the same "Database not configured" error again.Other info that might be relevant:
/etc/passwd contains the following new entries:
fosstest:x:1000:1000:fosstest,,,:/home/fosstest:/bin/bash <= main system
user
postgres:x:109:120:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
fossy:x:1001:1001:FOSSology:/srv/fossology:/bin/bash (used to be /bin/false
but I changed it to /bin/bash in the hopes that it would work) <= password
is fossyThanks in advance for your help. Detailed config info can be provided to
anyone wishing to help me. Thank you!
Can you connect to the database with psql?
Yes, I can:
root@ubuntu:/home/sandy# psql -d fossology -U fossy
Password for user fossy:
Welcome to psql 8.1.10, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
fossology=> \q
On Feb 6, 2008 2:18 PM, brian <brian@zijn-digital.com> wrote:
Can you connect to the database with psql?
--
Kurt Schroeder
kschroe@gmail.com
http://kurtandsandy.blogspot.com
Kurt Schroeder wrote:
Yes, I can:
root@ubuntu:/home/sandy# psql -d fossology -U fossy
Password for user fossy:
Welcome to psql 8.1.10, the PostgreSQL interactive terminal.Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quitfossology=> \q
Connect to fossology as a regular user and do:
CREATE ROLE fossy WITH OPTION CREATEDB LOGIN password fossy
if you haven't already.
brian
"Kurt Schroeder" <kschroe@gmail.com> writes:
On Feb 6, 2008 2:18 PM, brian <brian@zijn-digital.com> wrote:
Can you connect to the database with psql?
Yes, I can:
root@ubuntu:/home/sandy# psql -d fossology -U fossy
But does it work with -h localhost, which is also implied by your
connection parameters? I suspect you don't have the server configured
to listen for TCP connections, or else that there's a firewall problem.
regards, tom lane
No, it didn't work! When I ran:
fossy@fosstest:/fossology/fossology-0.6.0$ psql -d fossology -U fossy -h
localhost
I got the error:
psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "fossy",
database "fossology", SSL off
I will work on resolving this. Thank you!!!
- Kurt
On Feb 6, 2008 5:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Kurt Schroeder" <kschroe@gmail.com> writes:
On Feb 6, 2008 2:18 PM, brian <brian@zijn-digital.com> wrote:
Can you connect to the database with psql?
Yes, I can:
root@ubuntu:/home/sandy# psql -d fossology -U fossyBut does it work with -h localhost, which is also implied by your
connection parameters? I suspect you don't have the server configured
to listen for TCP connections, or else that there's a firewall problem.regards, tom lane
--
Kurt Schroeder
kschroe@gmail.com
http://kurtandsandy.blogspot.com
Still failing. Here's what I did:
1. Edited the pg_hba.conf file and added the line:
host all all 127.0.0.1 255.255.255.255 trust
fossy@fosstest:/etc/postgresql/8.1/main$ psql -d fossology -U fossy -h
localhost
Welcome to psql 8.1.10, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
2. Restarted PostgreSQL...
3. Ran the dbcheck command and received the same error:
root@fosstest:/fossology/fossology-0.6.0#./install/usr/local/fossology/test.d/dbcheck
ERROR: Unable to connect to the database
Connection string: 'dbname=fossology local=localhost user=fossy
password=fossy'
Connection status: '1'
ERROR: Failed to open database
Arrgh.
On Feb 7, 2008 9:19 AM, Kurt Schroeder <kschroe@gmail.com> wrote:
No, it didn't work! When I ran:
fossy@fosstest:/fossology/fossology-0.6.0$ psql -d fossology -U fossy -h
localhostI got the error:
psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "fossy",
database "fossology", SSL offI will work on resolving this. Thank you!!!
- Kurt
On Feb 6, 2008 5:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Kurt Schroeder" <kschroe@gmail.com> writes:
On Feb 6, 2008 2:18 PM, brian <brian@zijn-digital.com> wrote:
Can you connect to the database with psql?
Yes, I can:
root@ubuntu:/home/sandy# psql -d fossology -U fossyBut does it work with -h localhost, which is also implied by your
connection parameters? I suspect you don't have the server configured
to listen for TCP connections, or else that there's a firewall problem.regards, tom lane
--
Kurt Schroeder
kschroe@gmail.com
http://kurtandsandy.blogspot.com
--
Kurt Schroeder
kschroe@gmail.com
http://kurtandsandy.blogspot.com
Kurt Schroeder escribi�:
3. Ran the dbcheck command and received the same error:
root@fosstest:/fossology/fossology-0.6.0#./install/usr/local/fossology/test.d/dbcheck
ERROR: Unable to connect to the database
Connection string: 'dbname=fossology local=localhost user=fossy
password=fossy'
Connection status: '1'
ERROR: Failed to open database
Weird. Are you sure you are connecting to the same postmaster? i.e.
are the port settings the same?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
"Kurt Schroeder" <kschroe@gmail.com> writes:
root@fosstest:/fossology/fossology-0.6.0#./install/usr/local/fossology/test.d/dbcheck
ERROR: Unable to connect to the database
Connection string: 'dbname=fossology local=localhost user=fossy
password=fossy'
Connection status: '1'
ERROR: Failed to open database
Arrgh.
Man, that's one unhelpful error message, isn't it :-(
Have you tried looking in the postmaster log to see if the server is
reporting anything about the failed connection? (Maybe turn on
log_connections just to be sure that it should log something.)
If there is nothing in the postmaster log, that suggests that the
fossology connection isn't going where you think it's going. You
might have to resort to strace'ing fossology to see where it's
trying to connect to.
regards, tom lane