I'd blame the database. Is postgres up and accepting connections?
----- "Michael Cronenworth" mike@cchtml.com wrote:
Could I ask someone for a helping hand?
I'm attempting to create a koji instance on a local server machine. I've tried to follow the wiki documentation[1], but my Kojiweb reports the service is offline. The koji CLI also reports the same. I am attempting to use Kerberos without SSL. I've successfully setup the Kerberos server with an admin user and all the koji users.
Thanks, Michael
[1] http://fedoraproject.org/wiki/Koji/ServerHowTo
buildsys mailing list buildsys@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/buildsys
Jay Greguske wrote:
I'd blame the database. Is postgres up and accepting connections?
Yes, PostgreSQL is running, the koji user is added, and the SQL schema has been inserted. I've added the initial admin user (called 'admin') and pointed it to my Kerberos principal.
I tried looking for some logs to debug through, but I didn't find much. Is there something I can check or turn on to see how well the communication is working?
P.S. The koji server is Fedora 11, latest package updates.
On 02/04/2010 02:56 PM, Michael Cronenworth wrote:
Jay Greguske wrote:
I'd blame the database. Is postgres up and accepting connections?
Yes, PostgreSQL is running, the koji user is added, and the SQL schema has been inserted. I've added the initial admin user (called 'admin') and pointed it to my Kerberos principal.
I tried looking for some logs to debug through, but I didn't find much. Is there something I can check or turn on to see how well the communication is working?
Have you edited /var/lib/pgsql/data/pg_hba.conf to allow the "apache" user to connect to the "koji" database? The configuration needs to be at or near the top of that file, before the default config.
Mike Bonnet wrote:
Have you edited /var/lib/pgsql/data/pg_hba.conf to allow the "apache" user to connect to the "koji" database? The configuration needs to be at or near the top of that file, before the default config.
Yes, I even temporary logged into the apache user and ran "psql koji" and it connected me to the database. I still get "ServerOffline" in kojiweb and koji CLI:
# klist Ticket cache: FILE:/tmp/krb5cc_0 Default principal: root/admin@XX.COM
Valid starting Expires Service principal 02/04/10 15:58:53 02/05/10 15:58:53 krbtgt/XX.COM@XX.COM 02/04/10 15:59:01 02/05/10 15:58:53 host/localhost.xx.com@XX.COM
Kerberos 4 ticket cache: /tmp/tkt0 klist: You have no tickets cached
# koji add-user test ServerOffline: database outage
The koji admin user is set to principle "root/admin@XX.COM" in the SQL database.
On 02/04/2010 05:12 PM, Michael Cronenworth wrote:
Mike Bonnet wrote:
Have you edited /var/lib/pgsql/data/pg_hba.conf to allow the "apache" user to connect to the "koji" database? The configuration needs to be at or near the top of that file, before the default config.
Yes, I even temporary logged into the apache user and ran "psql koji" and it connected me to the database. I still get "ServerOffline" in kojiweb and koji CLI:
Are you seeing errors in /var/log/httpd/error_log?
# klist Ticket cache: FILE:/tmp/krb5cc_0 Default principal: root/admin@XX.COM
Valid starting Expires Service principal 02/04/10 15:58:53 02/05/10 15:58:53 krbtgt/XX.COM@XX.COM 02/04/10 15:59:01 02/05/10 15:58:53 host/localhost.xx.com@XX.COM
Kerberos 4 ticket cache: /tmp/tkt0 klist: You have no tickets cached
# koji add-user test ServerOffline: database outage
The koji admin user is set to principle "root/admin@XX.COM" in the SQL database. -- buildsys mailing list buildsys@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/buildsys
Mike Bonnet wrote:
Are you seeing errors in /var/log/httpd/error_log?
This is all I see:
[Thu Feb 04 16:14:23 2010] [notice] mod_python (pid=4750, interpreter='localhost.xx.com'): Importing module '/usr/share/koji-web/scripts/index.py'
Nothing else.
On 02/04/2010 05:12 PM, Michael Cronenworth wrote:
Yes, I even temporary logged into the apache user and ran "psql koji" and it connected me to the database. I still get "ServerOffline" in kojiweb and koji CLI:
Taking your command literally, I assume that postgres is running on the same host.
If you intend to connect to postgres locally (not over tcp) as "psql koji" would, then you must /not/ set DBHost in hub.conf. If there is a value for that option (even localhost) then the pgdb lib will try to connect over tcp, which your server may not be configured to allow.
# koji add-user test ServerOffline: database outage
The koji admin user is set to principle "root/admin@XX.COM" in the SQL database. -- buildsys mailing list buildsys@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/buildsys
Mike McLean wrote:
Taking your command literally, I assume that postgres is running on the same host.
It is.
If you intend to connect to postgres locally (not over tcp) as "psql koji" would, then you must/not/ set DBHost in hub.conf. If there is a value for that option (even localhost) then the pgdb lib will try to connect over tcp, which your server may not be configured to allow.
I had DBHost set to 127.0.0.1, but commenting that out results in no change. I still get
$ koji add-user test ServerOffline: database outage
Here's my current config inside of /etc/koji-hub/hub.conf [hub]
## Basic options ## DBName = koji DBUser = koji #DBHost = 127.0.0.1 #DBPass = example_password KojiDir = /mnt/koji
Yes, I restarted httpd.
On 02/05/2010 11:06 AM, Michael Cronenworth wrote:
I had DBHost set to 127.0.0.1, but commenting that out results in no change. I still get
$ koji add-user test ServerOffline: database outage
Is there anything in the postgres logs? /var/lib/pgsql/data/pg_log
Here's my current config inside of /etc/koji-hub/hub.conf [hub]
## Basic options ## DBName = koji DBUser = koji #DBHost = 127.0.0.1 #DBPass = example_password KojiDir = /mnt/koji
Yes, I restarted httpd.
You wrote that the command line works. Let's see what happens within python. Trying running this in a python shell (as the apache user).
bash-3.2$ python
import koji.db koji.db.provideDBopts(database = 'koji', user='koji') koji.db.connect()
What error do you see?
Mike McLean wrote:
Is there anything in the postgres logs? /var/lib/pgsql/data/pg_log
FATAL: Ident authentication failed for user "koji" (my bad, should have checked here earlier)
You wrote that the command line works. Let's see what happens within python. Trying running this in a python shell (as the apache user).
bash-3.2$ python
import koji.db koji.db.provideDBopts(database = 'koji', user='koji') koji.db.connect()
What error do you see?
Same as above, so I adjusted my pg_hba.conf file to properly allow local (not host) access for koji and apache, and now I see a web interface. Thanks!
buildsys@lists.fedoraproject.org