public inbox for [email protected]
help / color / mirror / Atom feedRunning pgadmin4 as desktop application
9+ messages / 3 participants
[nested] [flat]
* Running pgadmin4 as desktop application
@ 2016-10-06 10:25 Devrim Gündüz <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Devrim Gündüz @ 2016-10-06 10:25 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Can you please clarify how to start pgadmin4 in desktop application mode? I
read
https://www.pgadmin.org/docs4/dev/desktop_deployment.html
but when I run
/usr/pgadmin4-1.0/runtime/pgAdmin4 (installed via community RPMs), I get:
"
An error occurred initialising the application server:
Failed to locate pgAdmin4.py, terminating server thread."
(as reported 2 days ago on the list), followed by a segfault. There is an ini
file at the same directory, with contents like this:
$ cat /usr/pgadmin4-1.0/runtime/pgAdmin4.ini
[General]
ApplicationPath=/usr/lib/python3.5/site-packages/pgadmin4-web
PythonPath=
Can you please give me a clue so that I can fix the packaging?
Regards,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
[application/pgp-signature] signature.asc (819B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-06 12:42 Dave Page <[email protected]>
parent: Devrim Gündüz <[email protected]>
0 siblings, 2 replies; 9+ messages in thread
From: Dave Page @ 2016-10-06 12:42 UTC (permalink / raw)
To: Devrim Gündüz <[email protected]>; +Cc: pgadmin-hackers
Hi
On Thu, Oct 6, 2016 at 11:25 AM, Devrim Gündüz <[email protected]> wrote:
>
> Hi,
>
> Can you please clarify how to start pgadmin4 in desktop application mode? I
> read
>
> https://www.pgadmin.org/docs4/dev/desktop_deployment.html
>
> but when I run
>
> /usr/pgadmin4-1.0/runtime/pgAdmin4 (installed via community RPMs), I get:
>
> "
> An error occurred initialising the application server:
> Failed to locate pgAdmin4.py, terminating server thread."
>
> (as reported 2 days ago on the list), followed by a segfault. There is an ini
> file at the same directory, with contents like this:
>
> $ cat /usr/pgadmin4-1.0/runtime/pgAdmin4.ini
>
> [General]
> ApplicationPath=/usr/lib/python3.5/site-packages/pgadmin4-web
> PythonPath=
>
>
> Can you please give me a clue so that I can fix the packaging?
The global config file that Qt will read by default seems to be
"/etc/pgAdmin Development Team/pgAdmin 4.conf".
I may change that for 1.1 to use a less obnoxious path. The contents
of it seem to need to be:
[General]
ApplicationPath=../../../../usr/lib/python2.7/site-packages/pgadmin4-web/
PythonPath="/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/site-packages/"
The ApplicationPath is the directory containing pgAdmin4.py. Due to a
bugette in the way the runtime works, it needs to be relative to the
location of the runtime, hence all the back-tracking. The PythonPath
needs to include both the 32 and 64 bit directories, as it seems that
some of the Python modules end up in each.
That was enough to get it to start for me.
Then, we run into the tricky issues, where you may have to deal with
conflicts between web and desktop mode. In our other installers, we
ship a blank config_local.py file, with a simple comment at the top
telling the user they can customise any settings in that file. For web
users, we don't want that, as it's used as a security mechanism
(startup will fail if it's not present, and tell the user they must
set some security-critical options). Those options don't matter in
desktop mode, hence why we pre-write the file.
Perhaps the way around that is to have the shortcut on the menu call a
script that can create config_local.py if needed? Though, I see you
already have config_distro.py forcing the user into desktop mode,
which is a potential conflict.
The other issue I see is with the docs:
1) The path in config_distro.py is
/usr/share/doc/pgadmin4-docs/en_US/html/. That directory doesn't exist
- if the docs are compiled in-situ, they'll end up in
/usr/share/doc/pgadmin4-docs/en_US/html/_build/html
2) The docs aren't built, so there is no _build/html directory.
3) The docs are integrated into the application so really should be a
dependency of the pgadmin4 RPM.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-07 12:05 Devrim Gündüz <[email protected]>
parent: Dave Page <[email protected]>
1 sibling, 1 reply; 9+ messages in thread
From: Devrim Gündüz @ 2016-10-07 12:05 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers
Hi Dave,
On Thu, 2016-10-06 at 13:42 +0100, Dave Page wrote:
> The global config file that Qt will read by default seems to be
> "/etc/pgAdmin Development Team/pgAdmin 4.conf".
>
> I may change that for 1.1 to use a less obnoxious path. The contents
> of it seem to need to be:
>
> [General]
> ApplicationPath=../../../../usr/lib/python2.7/site-packages/pgadmin4-web/
> PythonPath="/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/site-
> packages/"
>
> The ApplicationPath is the directory containing pgAdmin4.py. Due to a
> bugette in the way the runtime works, it needs to be relative to the
> location of the runtime, hence all the back-tracking. The PythonPath
> needs to include both the 32 and 64 bit directories, as it seems that
> some of the Python modules end up in each.
>
> That was enough to get it to start for me.
This did not work for me :(
Cheers,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
[application/pgp-signature] signature.asc (819B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-07 12:44 Dave Page <[email protected]>
parent: Devrim Gündüz <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Dave Page @ 2016-10-07 12:44 UTC (permalink / raw)
To: Devrim Gündüz <[email protected]>; +Cc: pgadmin-hackers
On Fri, Oct 7, 2016 at 1:05 PM, Devrim Gündüz <[email protected]> wrote:
>
> Hi Dave,
>
> On Thu, 2016-10-06 at 13:42 +0100, Dave Page wrote:
>> The global config file that Qt will read by default seems to be
>> "/etc/pgAdmin Development Team/pgAdmin 4.conf".
>>
>> I may change that for 1.1 to use a less obnoxious path. The contents
>> of it seem to need to be:
>>
>> [General]
>> ApplicationPath=../../../../usr/lib/python2.7/site-packages/pgadmin4-web/
>> PythonPath="/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/site-
>> packages/"
>>
>> The ApplicationPath is the directory containing pgAdmin4.py. Due to a
>> bugette in the way the runtime works, it needs to be relative to the
>> location of the runtime, hence all the back-tracking. The PythonPath
>> needs to include both the 32 and 64 bit directories, as it seems that
>> some of the Python modules end up in each.
>>
>> That was enough to get it to start for me.
>
> This did not work for me :(
How can I reproduce your setup? I testing on an existing CentOS 7 VM.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-10 07:51 Devrim Gündüz <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 0 replies; 9+ messages in thread
From: Devrim Gündüz @ 2016-10-10 07:51 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers
Hi,
On Fri, 2016-10-07 at 13:44 +0100, Dave Page wrote:
> How can I reproduce your setup? I testing on an existing CentOS 7 VM.
I'm testing on my Fedora 24 box. I'll switch to CentOS 7 and will let you know
soon.
Cheers,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
[application/pgp-signature] signature.asc (819B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-10 12:20 Devrim Gündüz <[email protected]>
parent: Dave Page <[email protected]>
1 sibling, 0 replies; 9+ messages in thread
From: Devrim Gündüz @ 2016-10-10 12:20 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers
Hi Dave,
On Thu, 2016-10-06 at 13:42 +0100, Dave Page wrote:
>
> The global config file that Qt will read by default seems to be
> "/etc/pgAdmin Development Team/pgAdmin 4.conf".
>
> I may change that for 1.1 to use a less obnoxious path. The contents
> of it seem to need to be:
>
> [General]
> ApplicationPath=../../../../usr/lib/python2.7/site-packages/pgadmin4-web/
> PythonPath="/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/site-
> packages/"
>
> The ApplicationPath is the directory containing pgAdmin4.py. Due to a
> bugette in the way the runtime works, it needs to be relative to the
> location of the runtime, hence all the back-tracking. The PythonPath
> needs to include both the 32 and 64 bit directories, as it seems that
> some of the Python modules end up in each.
>
> That was enough to get it to start for me.
Ok, this worked on CentOS 7 box, but not on Fedora 24, which has QT5 and Python
3. Can you help me to debug this? The content of the file in Fedora 24 is:
$ cat /etc/pgAdmin\ Development\ Team/pgAdmin\ 4.conf
[General]
ApplicationPath=../../../..//usr/lib/python3.5/site-packages/pgadmin4-web/
PythonPath="/usr/lib64/python3.5/site-packages; /usr/lib/python3.5/site-packages"
I'm still getting segfault, and:
An error occurred initialising the application server:
Failed to locate pgAdmin4.py, terminating server thread.
> Then, we run into the tricky issues, where you may have to deal with
> conflicts between web and desktop mode. In our other installers, we
> ship a blank config_local.py file, with a simple comment at the top
> telling the user they can customise any settings in that file. For web
> users, we don't want that, as it's used as a security mechanism
> (startup will fail if it's not present, and tell the user they must
> set some security-critical options). Those options don't matter in
> desktop mode, hence why we pre-write the file.
>
> Perhaps the way around that is to have the shortcut on the menu call a
> script that can create config_local.py if needed? Though, I see you
> already have config_distro.py forcing the user into desktop mode,
> which is a potential conflict.
AFAICS, creating the file above helped to solve this issue, at least I can say
that both modes work on CentOS 7.
> The other issue I see is with the docs:
>
> 1) The path in config_distro.py is
> /usr/share/doc/pgadmin4-docs/en_US/html/. That directory doesn't exist
> - if the docs are compiled in-situ, they'll end up in
> /usr/share/doc/pgadmin4-docs/en_US/html/_build/html
>
> 2) The docs aren't built, so there is no _build/html directory.
Actuallly they are installed via -docs subpackage, but I forgot to add this as
a dependency.
> 3) The docs are integrated into the application so really should be a
> dependency of the pgadmin4 RPM.
Ok, fixed. Pushed to 9.6 testing repo:
yum --enablerepo pgdg96-updates-testing install pgadmin4 pgadmin4-web
(Packages will appear in next sync ;) )
Can you please test again?
Cheers,
--
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
[application/pgp-signature] signature.asc (819B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-10 18:42 Chris Mayo <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Chris Mayo @ 2016-10-10 18:42 UTC (permalink / raw)
To: pgadmin-hackers
> Ok, this worked on CentOS 7 box, but not on Fedora 24, which has QT5 and Python
> 3. Can you help me to debug this? The content of the file in Fedora 24 is:
>
> $ cat /etc/pgAdmin\ Development\ Team/pgAdmin\ 4.conf
> [General]
> ApplicationPath=../../../..//usr/lib/python3.5/site-packages/pgadmin4-web/
> PythonPath="/usr/lib64/python3.5/site-packages; /usr/lib/python3.5/site-packages"
>
>
> I'm still getting segfault, and:
>
> An error occurred initialising the application server:
>
> Failed to locate pgAdmin4.py, terminating server thread.
I suspect it is because the path is missing the xdg directory:
/etc/xdg/pgAdmin\ Development\ Team/pgAdmin\ 4.conf
http://doc.qt.io/qt-5/qsettings.html#locations-where-application-settings-are-stored
but that did seem to apply for Qt4.8 too:
http://doc.qt.io/qt-4.8/qsettings.html#locations-where-application-settings-are-stored
Chris
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Running pgadmin4 as desktop application
@ 2016-10-11 02:44 Dave Page <[email protected]>
parent: Chris Mayo <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Dave Page @ 2016-10-11 02:44 UTC (permalink / raw)
To: Chris Mayo <[email protected]>; +Cc: pgadmin-hackers
On Monday, October 10, 2016, Chris Mayo <[email protected]> wrote:
> > Ok, this worked on CentOS 7 box, but not on Fedora 24, which has QT5 and
> Python
> > 3. Can you help me to debug this? The content of the file in Fedora 24
> is:
> >
> > $ cat /etc/pgAdmin\ Development\ Team/pgAdmin\ 4.conf
> > [General]
> > ApplicationPath=../../../..//usr/lib/python3.5/site-
> packages/pgadmin4-web/
> > PythonPath="/usr/lib64/python3.5/site-packages; /usr/lib/python3.5/site-
> packages"
> >
> >
> > I'm still getting segfault, and:
> >
> > An error occurred initialising the application server:
> >
> > Failed to locate pgAdmin4.py, terminating server thread.
>
> I suspect it is because the path is missing the xdg directory:
> /etc/xdg/pgAdmin\ Development\ Team/pgAdmin\ 4.conf
>
> http://doc.qt.io/qt-5/qsettings.html#locations-where-application-settings-
> are-stored
>
> but that did seem to apply for Qt4.8 too:
> http://doc.qt.io/qt-4.8/qsettings.html#locations-
> where-application-settings-are-stored
In my tests on CentOS 7, I found it wasn't even trying to open the
/etc/xdg/... dir. You might try running under strace to see what it is
trying to read, e.g:
strace -e open pgadmin4
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 9+ messages in thread
* Running pgadmin4 as desktop application
@ 2016-10-11 04:44 Dave Page <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 0 replies; 9+ messages in thread
From: Dave Page @ 2016-10-11 04:44 UTC (permalink / raw)
To: Devrim Gündüz <[email protected]>; +Cc: pgadmin-hackers
Hi
On Monday, October 10, 2016, Devrim Gündüz <[email protected]
<javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:
>
> Hi Dave,
>
> On Thu, 2016-10-06 at 13:42 +0100, Dave Page wrote:
> >
> > The global config file that Qt will read by default seems to be
> > "/etc/pgAdmin Development Team/pgAdmin 4.conf".
> >
> > I may change that for 1.1 to use a less obnoxious path. The contents
> > of it seem to need to be:
> >
> > [General]
> > ApplicationPath=../../../../usr/lib/python2.7/site-packages/
> pgadmin4-web/
> > PythonPath="/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/site-
> > packages/"
> >
> > The ApplicationPath is the directory containing pgAdmin4.py. Due to a
> > bugette in the way the runtime works, it needs to be relative to the
> > location of the runtime, hence all the back-tracking. The PythonPath
> > needs to include both the 32 and 64 bit directories, as it seems that
> > some of the Python modules end up in each.
> >
> > That was enough to get it to start for me.
>
> Ok, this worked on CentOS 7 box, but not on Fedora 24, which has QT5 and
> Python
> 3. Can you help me to debug this? The content of the file in Fedora 24 is:
> $ cat /etc/pgAdmin\ Development\ Team/pgAdmin\ 4.conf
> [General]
> ApplicationPath=../../../..//usr/lib/python3.5/site-packages/pgadmin4-web/
> PythonPath="/usr/lib64/python3.5/site-packages;
> /usr/lib/python3.5/site-packages"
>
OK, so I only have command line access to a test machine right now as I'm
travelling with my tiny laptop that doesn't have vmware on it. I setup an
F24 instance on the OpenStack cluster at work, and installed your package.
It looks like pgadmin4-web should work from the command line, but it must
be started with "python3 pgAdmin4.py", because the default python
interpreter on F24 still seems to be Python 2.7.
>
>
> I'm still getting segfault, and:
>
> An error occurred initialising the application server:
>
> Failed to locate pgAdmin4.py, terminating server thread.
>
Hmm, at that point, it should ask for the paths. I'm not seeing a segfault
though - it just seems to exit for me, so I don't get a core dump. Can you
get one? If so, can you get a backtrace?
>
>
> > Then, we run into the tricky issues, where you may have to deal with
> > conflicts between web and desktop mode. In our other installers, we
> > ship a blank config_local.py file, with a simple comment at the top
> > telling the user they can customise any settings in that file. For web
> > users, we don't want that, as it's used as a security mechanism
> > (startup will fail if it's not present, and tell the user they must
> > set some security-critical options). Those options don't matter in
> > desktop mode, hence why we pre-write the file.
> >
> > Perhaps the way around that is to have the shortcut on the menu call a
> > script that can create config_local.py if needed? Though, I see you
> > already have config_distro.py forcing the user into desktop mode,
> > which is a potential conflict.
>
> AFAICS, creating the file above helped to solve this issue, at least I can
> say
> that both modes work on CentOS 7.
>
> > The other issue I see is with the docs:
> >
> > 1) The path in config_distro.py is
> > /usr/share/doc/pgadmin4-docs/en_US/html/. That directory doesn't exist
> > - if the docs are compiled in-situ, they'll end up in
> > /usr/share/doc/pgadmin4-docs/en_US/html/_build/html
> >
> > 2) The docs aren't built, so there is no _build/html directory.
>
> Actuallly they are installed via -docs subpackage, but I forgot to add
> this as
> a dependency.
>
OK, thanks.
>
> > 3) The docs are integrated into the application so really should be a
> > dependency of the pgadmin4 RPM.
>
> Ok, fixed. Pushed to 9.6 testing repo:
>
> yum --enablerepo pgdg96-updates-testing install pgadmin4 pgadmin4-web
>
:-)
>
> (Packages will appear in next sync ;) )
>
> Can you please test again?
>
I don't have that VM around at the moment :-(
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2016-10-11 04:44 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 10:25 Running pgadmin4 as desktop application Devrim Gündüz <[email protected]>
2016-10-06 12:42 ` Dave Page <[email protected]>
2016-10-07 12:05 ` Devrim Gündüz <[email protected]>
2016-10-07 12:44 ` Dave Page <[email protected]>
2016-10-10 07:51 ` Devrim Gündüz <[email protected]>
2016-10-10 12:20 ` Devrim Gündüz <[email protected]>
2016-10-10 18:42 Re: Running pgadmin4 as desktop application Chris Mayo <[email protected]>
2016-10-11 02:44 ` Dave Page <[email protected]>
2016-10-11 04:44 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox