Re: pgAdmin4 Server does not create SQLite tables

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: pgAdmin4 Server does not create SQLite tables
Date: 2016-10-11 03:39:41
Message-ID: 6e8c4296-b02c-eae8-9a08-4abc2256b37b@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On 10/10/2016 08:31 PM, Dave Page wrote:
>
>
> On Sunday, October 9, 2016, Josh Berkus <josh(at)agliodbs(dot)com
> <mailto:josh(at)agliodbs(dot)com>> wrote:
>
> On 10/09/2016 05:04 PM, Josh Berkus wrote:
> > sqlite> select * from ConfigDB;
> > Error: no such table: ConfigDB
>
> More relevantly:
>
> sqlite> select * from version;
> Error: no such table: version
>
>
> Does it create pgadmin4.db at all?

Yes:

[root(at)ip-172-31-34-8 .pgadmin]# pwd
/usr/share/httpd/.pgadmin
[root(at)ip-172-31-34-8 .pgadmin]# ls
pgadmin4.db pgadmin4.log sessions

> Having removed it if present, what's the output from running 'python
> setup.py'? Any errors?

Well, setup.py is meant for the desktop version, so it doesn't create
pgadmin4.db in the same place. It creates it in the user's (root's)
homedir.

*that* pgadmin4.db does have tables. The one in /usr/share/httpd/ does not.

As an experiment, I tried copying the pgadmin4.db from /root/ to
/usr/share/httpd, and fixing its permissions. At that point, pgadmin4
started to work.

So the nature of the bug appears to be:

When Apache invokes pgAdmin4 for the first time via WSGI, the
pgadmin4.db database is created, but the tables are not generated.

--
--
Josh Berkus
Red Hat OSAS
(any opinions are my own)

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2016-10-11 04:00:02 Re: pgAdmin4 Server does not create SQLite tables
Previous Message Dave Page 2016-10-11 03:31:29 Re: pgAdmin4 Server does not create SQLite tables