Pgadmin 4 an error occurred initializing the application server

Arch Linux You are not logged in. #1 2018-08-06 20:37:54 Unable to start pgadmin4 after python and pgadmin update Removing pgadmin cache do not help.No info in log file. Python path: «/usr/lib/pgadmin4/venv/lib/python3.7/site-packages:/usr/lib/python3.7/site-packages:/usr/lib/python3.7» Python Home: «/usr/lib/pgadmin4/venv»Webapp path: «/usr/lib/pgadmin4/web/pgAdmin4.py»NOTE: Configuring authentication for DESKTOP mode. An error occurred initialising the application server: An error occurred initialising the […]

Содержание

  1. Arch Linux
  2. #1 2018-08-06 20:37:54
  3. Unable to start pgadmin4 after python and pgadmin update
  4. #2 2018-08-07 02:11:07
  5. Re: Unable to start pgadmin4 after python and pgadmin update
  6. #3 2018-08-07 03:13:55
  7. Re: Unable to start pgadmin4 after python and pgadmin update
  8. #4 2018-08-08 08:16:01
  9. Re: Unable to start pgadmin4 after python and pgadmin update
  10. #5 2018-08-08 10:29:20
  11. Re: Unable to start pgadmin4 after python and pgadmin update
  12. #6 2018-08-08 14:40:43
  13. Re: Unable to start pgadmin4 after python and pgadmin update
  14. #7 2018-08-08 21:57:54
  15. Re: Unable to start pgadmin4 after python and pgadmin update
  16. #8 2018-08-09 17:33:41
  17. Re: Unable to start pgadmin4 after python and pgadmin update
  18. #9 2018-08-10 17:30:21
  19. Re: Unable to start pgadmin4 after python and pgadmin update
  20. #10 2018-08-11 10:00:13
  21. Re: Unable to start pgadmin4 after python and pgadmin update
  22. #11 2018-08-20 09:05:32
  23. Re: Unable to start pgadmin4 after python and pgadmin update
  24. #12 2018-08-20 19:31:04
  25. Re: Unable to start pgadmin4 after python and pgadmin update
  26. #13 2018-08-28 22:38:28
  27. Re: Unable to start pgadmin4 after python and pgadmin update
  28. #14 2018-08-30 11:59:26
  29. Re: Unable to start pgadmin4 after python and pgadmin update
  30. #15 2018-09-14 15:22:02
  31. Re: Unable to start pgadmin4 after python and pgadmin update
  32. #16 2021-08-06 07:10:36
  33. Re: Unable to start pgadmin4 after python and pgadmin update
  34. #17 2021-08-06 14:32:01
  35. Re: Unable to start pgadmin4 after python and pgadmin update
  36. pgAdmin Unauthorized
  37. Thread: Running pgadmin4 as desktop application
  38. Running pgadmin4 as desktop application
  39. Re: Running pgadmin4 as desktop application
  40. Re: Running pgadmin4 as desktop application
  41. Re: Running pgadmin4 as desktop application
  42. Re: Running pgadmin4 as desktop application
  43. Re: Running pgadmin4 as desktop application
  44. Re: Running pgadmin4 as desktop application
  45. Re: Running pgadmin4 as desktop application
  46. Running pgadmin4 as desktop application

Arch Linux

You are not logged in.

#1 2018-08-06 20:37:54

Unable to start pgadmin4 after python and pgadmin update

Removing pgadmin cache do not help.
No info in log file.

Python path: «/usr/lib/pgadmin4/venv/lib/python3.7/site-packages:/usr/lib/python3.7/site-packages:/usr/lib/python3.7»
Python Home: «/usr/lib/pgadmin4/venv»
Webapp path: «/usr/lib/pgadmin4/web/pgAdmin4.py»
NOTE: Configuring authentication for DESKTOP mode.

An error occurred initialising the application server:

An error occurred initialising the application server:

#2 2018-08-07 02:11:07

Re: Unable to start pgadmin4 after python and pgadmin update

Me too! I see exactly the same issue as gkrukar.

#3 2018-08-07 03:13:55

Re: Unable to start pgadmin4 after python and pgadmin update

Doesn’t help resolve the issue with the package, but the docker image is a reliable alternative.

#4 2018-08-08 08:16:01

Re: Unable to start pgadmin4 after python and pgadmin update

Me too! Also with the aur/pgadmin4-systray-fix 3.1-2 version

#5 2018-08-08 10:29:20

Re: Unable to start pgadmin4 after python and pgadmin update

I’ve tried the docker image. Works for most part, but gets really complicated when I have to restore database backups. Seems like the image has a few packages missing: postgresql-common, postgresql-client

Any pointers as to what to look for to fix the original pgadmin4 issue? This issue has hit me hard.

#6 2018-08-08 14:40:43

Re: Unable to start pgadmin4 after python and pgadmin update

Same problem after python and pgadmin update in 08/08/2018

Python path: «/usr/lib/pgadmin4/venv/lib/python3.7/site-packages:/usr/lib/python3.7/site-packages:/usr/lib/python3.7»
Python Home: «/usr/lib/pgadmin4/venv»
Webapp path: «/usr/lib/pgadmin4/web/pgAdmin4.py»

An error occurred initialising the application server: %1

#7 2018-08-08 21:57:54

Re: Unable to start pgadmin4 after python and pgadmin update

I also have the following problem when starting pgadmin4:

]$ pacman -Qi pgadmin4
Name : pgadmin4
Version : 3.0-3
Packager : Evangelos Foutras
Build Date : Mon 23 Jul 2018 06:11:20 PM CEST
Install Date : Wed 08 Aug 2018 11:30:46 PM CEST

]$ pgadmin4
Python path: «/usr/lib/pgadmin4/venv/lib/python3.7/site-packages:/usr/lib/python3.7/site-packages:/usr/lib/python3.7»
Python Home: «/usr/lib/pgadmin4/venv»
Webapp path: «/usr/lib/pgadmin4/web/pgAdmin4.py»
«Failed to launch the application server, server thread exiting.

Segmentation fault (core dumped)

If there is any information I could provide to solve the issue please let me know.

Last edited by mach (2018-08-08 22:00:57)

#8 2018-08-09 17:33:41

Re: Unable to start pgadmin4 after python and pgadmin update

Same issue. I was in a bind so I tried modifying the PKGBUILD to install 3.2, which has a release date of today (2018-08-09).

In your build directory, you’ll need to create config_distro.py:

config_local.py

. and pgAdmin4.desktop:

I’m also foolhardy enough to skip the integrity checks.

It appears that some directories aren’t available to my user account. So.

Score! Running the pgAdmin4 startup script still gives me the dialog window asking for paths but maybe this will do until the package maintainer gets around to updating. Until then, I’m running pgadmin4-server and navigating directly to http://127.0.0.1:5050/browser.

Last edited by jmbull (2018-08-20 19:29:12)

#9 2018-08-10 17:30:21

Re: Unable to start pgadmin4 after python and pgadmin update

I’m seeing this in pgadmin4’s icon server log:

Traceback (most recent call last):
File «/usr/lib/pgadmin4/web/pgAdmin4.py», line 70, in
app = create_app()
File «/usr/lib/pgadmin4/web/pgadmin/__init__.py», line 367, in create_app
driver.init_app(app)
File «/usr/lib/pgadmin4/web/pgadmin/utils/driver/__init__.py», line 40, in init_app
DriverRegistry.load_drivers()
File «/usr/lib/pgadmin4/web/pgadmin/utils/driver/registry.py», line 88, in load_drivers
module = import_module(module_name)
File «/usr/lib/python3.7/importlib/__init__.py», line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File » «, line 1006, in _gcd_import
File » «, line 983, in _find_and_load
File » «, line 967, in _find_and_load_unlocked
File » «, line 677, in _load_unlocked
File » «, line 728, in exec_module
File » «, line 219, in _call_with_frames_removed
File «/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py», line 26, in
from .connection import Connection
File «/usr/lib/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py», line 141
def __init__(self, manager, conn_id, db, auto_reconnect=True, async=0,
^
SyntaxError: invalid syntax

#10 2018-08-11 10:00:13

Re: Unable to start pgadmin4 after python and pgadmin update

BTW I don’t know about pgadmin4 4.3, but building/installing manually the recently released 3.2
by adapting the current PKGBUILD worked fine (no .sig file though) at least on my machine, which is
running ‘Linux sarchx64 4.17.13-arch1-1-ARCH #1 SMP PREEMPT Mon Aug 6 23:06:31 UTC 2018 x86_64 GNU/Linux’
with latest python and postgresql

So please update pgadmin4 to 3.2

#11 2018-08-20 09:05:32

Re: Unable to start pgadmin4 after python and pgadmin update

Note this is being tracked on the packages bug reports.

#12 2018-08-20 19:31:04

Re: Unable to start pgadmin4 after python and pgadmin update

BTW I don’t know about pgadmin4 4.3,

Ha! pgadmin4 3.2. Thanks, I corrected that above.

#13 2018-08-28 22:38:28

Re: Unable to start pgadmin4 after python and pgadmin update

Resolved in the latest release, pgadmin4 3.2-1

#14 2018-08-30 11:59:26

Re: Unable to start pgadmin4 after python and pgadmin update

Tray icon issue is solved, but I’m having another issue that a user also reported on the package bug report page: https://bugs.archlinux.org/task/59575#comment172627

I’m guessing it has something to do with the setup of the virtualenv.

Pasting the issue here:
«`
$ pgadmin4
Python path: «/usr/lib/pgadmin4/venv/lib/python3.6/site-packages:/usr/lib/python3.6/site-packages:/usr/lib/python3.6»
Python Home: «/usr/lib/pgadmin4/venv»
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007f6e5a5ddc80 (most recent call first):
Aborted (core dumped)
«`

#15 2018-09-14 15:22:02

Re: Unable to start pgadmin4 after python and pgadmin update

I had the same issue, check your

/.config/pgadmin/pgadmin4.conf
Under [General] you have a PythonPath= entry

For me this worked, I first tried removing this configuration file altogether, it then writes no new file and defaults on python2.7

Hope this helped.

#16 2021-08-06 07:10:36

Re: Unable to start pgadmin4 after python and pgadmin update

Downgrading not working for me either ,
tried DBeaver too its crashing without any log too
someone help please.

Thanks in Advance.

As someone mentioned above we can create our own web based pgadmin4 server it worked

Last edited by rahulnegi20 (2021-08-06 07:23:42)

#17 2021-08-06 14:32:01

Re: Unable to start pgadmin4 after python and pgadmin update

rahulnegi20:
This is two year old thread, and I cannot tell if you solved your problem after the edit. Regardless, I am going to invite you to open a your own thread (if you need to) and I will close this one. If you think this thread relevant, you can refer back to this thread with a link. Thanks.

Nothing is too wonderful to be true, if it be consistent with the laws of nature — Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. — Alan Turing

How to Ask Questions the Smart Way

Источник

Сейчас при запуске pgAdmin 4 v4 выдается сообщение:

The server could not verify that you are authorized to access the URL requested.
You either supplied the wrong credentials (e.g. a bad password), or your browser doesn’t understand how to supply the credentials required.

Ранее такого не было и все работало нормально.

Подскажите пожалуйста, как вернуть работоспособность?

короче другой браузер попробуй

Following is working for me (using SolydK):

right click on «tray icon»
«C:Program FilesMozilla Firefoxfirefox.exe» %URL%

и все заработало..

свое написать на 1С на основе консольных утилит — есть батники, просто хотел использовать формы :)..

и еще вопрос, если так пошло уж..

пользуюсь pgAdmin 4.20, а есть уже 4.24, но она не запускается, там ошибка про то, что профиль на русском.

Источник

Thread: Running pgadmin4 as desktop application

Running pgadmin4 as desktop application

Attachment

Re: Running pgadmin4 as desktop application

Re: Running pgadmin4 as desktop application

Attachment

Re: Running pgadmin4 as desktop application

Re: Running pgadmin4 as desktop application

Attachment

Re: Running pgadmin4 as desktop application

Attachment

Re: Running pgadmin4 as desktop application

Re: Running pgadmin4 as desktop application

On Monday, October 10, 2016, Chris Mayo 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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Running pgadmin4 as desktop application

On Monday, October 10, 2016, Devrim GГјndГјz wrote:

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=../../../../us r/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=../../../..//u sr/lib/python3.5/site-packages /pgadmin4-web/
PythonPath=»/usr/lib64/python3 .5/site-packages; /usr/lib/python3.5/site-packag es»

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/e n_US/html/. That directory doesn’t exist
> — if the docs are compiled in-situ, they’ll end up in
> /usr/share/doc/pgadmin4-docs/e n_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

Can you please test again?

Источник

  • Index
  • » Newbie Corner
  • » pgAdmin 4: Unable to start program, fresh install

#1 2021-05-16 19:59:21

gkrukar
Member
Registered: 2018-05-11
Posts: 7

pgAdmin 4: Unable to start program, fresh install

[gk@gk ~]$ pgadmin4
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
Semaphore name: «pgadmin4-gk-a59283b86ae8ae85d20fdf770d799dd7-sema»
Shared memory segment name: «pgadmin4-gk-a59283b86ae8ae85d20fdf770d799dd7-shmem»
Python path:  «/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/lib/python3.9/site-packages»
Python Home:  «/usr/lib/python3.9»
Webapp path:  «/usr/lib/pgadmin4/web/pgAdmin4.py»
«An error occurred initialising the pgAdmin 4 server:nnFailed to launch the application server, server thread exiting.»

Postgresql is installed and running, database cluster is initialized

#2 2021-05-16 23:16:26

marksievers
Member
Registered: 2017-08-22
Posts: 14

Re: pgAdmin 4: Unable to start program, fresh install

I get this after my latest updates as well. `pgadmin4` package was not updated and `python` only got a minor upgrade (3.9.4-1 -> 3.9.5-2).

Still trying figure out what the actual problem is.

#3 2021-05-17 09:40:55

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 323

Re: pgAdmin 4: Unable to start program, fresh install

Same here, it used to work. I’m guessing one of the recent python packages updates broke it. Error output is not very helpful…
I can’t find «An error occurred initialising the pgAdmin 4 server» or «Failed to launch the application server, server thread exiting» grepping all my system, so I downloaded from upstream git and tried the same, but I can’t find where the error is.

#4 2021-05-19 08:19:56

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 323

Re: pgAdmin 4: Unable to start program, fresh install

I checked the logs and the first thing that failed was that I was missing the package «python-email-validator» (PKGBUILD needs to update the dependencies?).

Then, this:

Traceback (most recent call last):
  File "/usr/lib/pgadmin4/web/pgAdmin4.py", line 94, in <module>
    app = create_app()
  File "/usr/lib/pgadmin4/web/pgadmin/__init__.py", line 409, in create_app
    security.init_app(app, user_datastore)
  File "/usr/lib/python3.9/site-packages/flask_security/core.py", line 1089, in init_app
    raise ValueError("User model must contain fs_uniquifier as of 4.0.0")
ValueError: User model must contain fs_uniquifier as of 4.0.0

This seems to be related to the package community/python-flask-security-too

Any ideas?

Last edited by icar (2021-05-19 08:21:54)

#5 2021-05-19 10:11:30

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: pgAdmin 4: Unable to start program, fresh install

I’ve managed to get pgAdmin working again by downgrading the following packages:

python-flask               1.1.2-4
python-flask-security-too  3.3.3-3
python-psycopg2            2.8.6-4
python-wtforms             2.2.1-10

[edit]: python-psycopg2 is also required now.

Last edited by giddie (2021-07-05 12:22:45)

#6 2021-05-27 00:19:21

antonic901
Member
Registered: 2021-05-27
Posts: 2

Re: pgAdmin 4: Unable to start program, fresh install

Hello guys. Is there any fix for this, because I’m getting same error as stated in first post. I tried downgrading three packages that @giddie suggested but I still have the same problem. sad

#7 2021-05-27 00:21:02

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 323

Re: pgAdmin 4: Unable to start program, fresh install

Dowgrading the packages worked for me. What is your error?

#8 2021-05-27 00:37:48

antonic901
Member
Registered: 2021-05-27
Posts: 2

Re: pgAdmin 4: Unable to start program, fresh install

When using pgAdmin 4 from official repos i get same error before and after downgrading:

QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
Semaphore name: "pgadmin4-nikola-a59283b86ae8ae85d20fdf770d799dd7-sema"
Shared memory segment name: "pgadmin4-nikola-a59283b86ae8ae85d20fdf770d799dd7-shmem"
Python path:  "/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/lib/python3.9/site-packages" 
Python Home:  "/usr/lib/python3.9"
Webapp path:  "/usr/lib/pgadmin4/web/pgAdmin4.py"
"An error occurred initialising the pgAdmin 4 server:nnFailed to launch the application server, server thread exiting."

When using pgAdmin4-last from AUR before downgrading I get:

Traceback (most recent call last):
  File "/usr/lib/pgadmin4/web/pgAdmin4.py", line 39, in <module>
    import config
  File "/usr/lib/pgadmin4/web/config.py", line 25, in <module>
    from pgadmin.utils import env, IS_WIN, fs_short_path
  File "/usr/lib/pgadmin4/web/pgadmin/__init__.py", line 28, in <module>
    from flask_security import Security, SQLAlchemyUserDatastore, current_user
  File "/usr/lib/python3.9/site-packages/flask_security/__init__.py", line 15, in <module>
    from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
  File "/usr/lib/python3.9/site-packages/flask_security/core.py", line 48, in <module>
    from .mail_util import MailUtil
  File "/usr/lib/python3.9/site-packages/flask_security/mail_util.py", line 14, in <module>
    import email_validator
ModuleNotFoundError: No module named 'email_validator'

and after downgrading:

Traceback (most recent call last):
  File "/usr/lib/pgadmin4/web/pgAdmin4.py", line 98, in <module>
    app = create_app()
  File "/usr/lib/pgadmin4/web/pgadmin/__init__.py", line 347, in create_app
    if not os.path.exists(SQLITE_PATH) or get_version() == -1:
  File "/usr/lib/pgadmin4/web/pgadmin/setup/db_version.py", line 19, in get_version
    return version.value
AttributeError: 'NoneType' object has no attribute 'value'

Last edited by antonic901 (2021-05-27 00:41:07)

#10 2021-07-01 12:31:16

wpaiva
Member
Registered: 2021-07-01
Posts: 1

Re: pgAdmin 4: Unable to start program, fresh install

giddie wrote:

I’ve managed to get pgAdmin working again by downgrading the following packages:

python-flask               1.1.2-4
python-flask-security-too  3.3.3-3
python-wtforms             2.2.1-10

This worked for me too.

#11 2021-07-07 10:43:09

toelva
Member
Registered: 2021-07-07
Posts: 1

Re: pgAdmin 4: Unable to start program, fresh install

giddie wrote:

I’ve managed to get pgAdmin working again by downgrading the following packages:

python-flask               1.1.2-4
python-flask-security-too  3.3.3-3
python-psycopg2            2.8.6-4
python-wtforms             2.2.1-10

[edit]: python-psycopg2 is also required now.

Today this did not work anymore.

So I also downgraded

python-flask-migrate  2.7.0-1
python-gssapi     1.6.12-2
python-jinja   3.0.0-1
python-werkzeug  2.0.0-1

without  success

#12 2021-07-08 06:25:01

hopyres
Member
Registered: 2021-03-02
Posts: 11

Re: pgAdmin 4: Unable to start program, fresh install

When fix this troubles on new version python ?

#13 2021-07-08 07:26:12

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: pgAdmin 4: Unable to start program, fresh install

toelva wrote:

Today this did not work anymore.

That’s strange. I just updated my system now and downgraded the packages you quoted from my post, and pgAdmin seems to function OK for me.

#14 2021-07-09 00:31:56

loqs
Member
Registered: 2014-03-06
Posts: 15,645

Re: pgAdmin 4: Unable to start program, fresh install

See https://bugs.archlinux.org/task/70918
The package maintainer does not have time to fix the issue.  Please ask upstream.

#15 2021-08-05 14:00:14

Taz-Mania
Member
Registered: 2021-08-05
Posts: 1

Re: pgAdmin 4: Unable to start program, fresh install

$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin
$ python3 -m venv pgadmin4
$ source pgadmin4/bin/activate
(pgadmin4) $ pip install pgadmin4

(pgadmin4) $ pgadmin4
NOTE: Configuring authentication for SERVER mode.

Enter the email address and password to use for the initial pgAdmin user account:

Email address: user@domain.com
Password:
Retype password:
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.
* Serving Flask app «pgadmin» (lazy loading)
* Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
* Debug mode: off

#16 2021-08-09 11:46:38

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: pgAdmin 4: Unable to start program, fresh install

For what it’s worth, I’m switching to `docker-compose` for pgAdmin, since it’s pretty easy to add to my existing work configuration:

https://www.pgadmin.org/docs/pgadmin4/l … yment.html

version: "3.8"

volumes:
  pgadmin-data:

services:
  pgadmin:
    image: dpage/pgadmin4
    ports:
      - "9201:80"
    environment:
      PGADMIN_DEFAULT_EMAIL: root@localhost.localdomain
      PGADMIN_DEFAULT_PASSWORD: secret
      PGADMIN_DISABLE_POSTFIX: "true"
      PGADMIN_CONFIG_SERVER_MODE: "False"
    volumes:
      - pgadmin-data:/var/lib/pgadmin

Last edited by giddie (2021-08-09 11:56:35)

#17 2021-10-28 05:08:23

hopyres
Member
Registered: 2021-03-02
Posts: 11

Re: pgAdmin 4: Unable to start program, fresh install

This issue correctable without downgrade version?

#18 2021-10-28 22:32:25

loqs
Member
Registered: 2014-03-06
Posts: 15,645

Re: pgAdmin 4: Unable to start program, fresh install

hopyres wrote:

This issue correctable without downgrade version?

Not using Arch provided packages.  Waiting for the issue to be reported to upstream.

#19 2021-10-29 07:36:16

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: pgAdmin 4: Unable to start program, fresh install

I’m not really sure why the arch package is on version 4.30 when the current version is 6.1. Is there an official line on that?

#20 2021-10-29 07:43:36

hopyres
Member
Registered: 2021-03-02
Posts: 11

Re: pgAdmin 4: Unable to start program, fresh install

giddie wrote:

I’m not really sure why the arch package is on version 4.30 when the current version is 6.1. Is there an official line on that?

I’m used pacman manager for install pgadmin4.

#21 2021-10-29 07:57:11

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: pgAdmin 4: Unable to start program, fresh install

hopyres wrote:

I’m used pacman manager for install pgadmin4.

I mean that the version available via pacman in archlinux is 4.30, but the latest release of pgAdmin4 is 6.1.

In the meantime, if it’s important to get a version of pgAdmin working, a simple solution is to use docker:

* Install Docker
* Install docker-compose
* Create a directory named pgadmin.
* Inside the new directory, copy the configuration from this post into a file named docker-compose.yml
* Run docker-compose up -d in the same directory as the docker-compose.yml file.
* Use docker ps -a to see your running pgAdmin
* Go to http://localhost:9201 to use pgAdmin
* Use docker-compose down to shut it down

#22 2021-10-29 22:11:20

loqs
Member
Registered: 2014-03-06
Posts: 15,645

Re: pgAdmin 4: Unable to start program, fresh install

giddie wrote:

I’m not really sure why the arch package is on version 4.30 when the current version is 6.1. Is there an official line on that?

Nothing beyond the comments in https://bugs.archlinux.org/task/70918

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index ef2de94..e747e31 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -2,25 +2,25 @@
 # Maintainer: Jerome Leclanche <jerome@leclan.ch>
 
 pkgname=pgadmin4
-pkgver=4.30
-pkgrel=2
+pkgver=6.1
+pkgrel=1
 pkgdesc='Comprehensive design and management interface for PostgreSQL'
 url='https://www.pgadmin.org/'
-arch=('x86_64')
+arch=('any')
 license=('custom')
-depends=('qt5-base' 'postgresql-libs' 'hicolor-icon-theme' 'python'
-         'libxcrypt' 'libcrypt.so' 'glibc' 'gcc-libs'
-         'python-blinker' 'python-flask' 'python-flask-login'
+depends=('postgresql-libs' 'hicolor-icon-theme'
+         'python-blinker' 'python-flask' 'python-flask-login' 'python-flask-socketio'
          'python-flask-migrate' 'python-flask-sqlalchemy' 'python-flask-wtf'
          'python-passlib' 'python-pytz' 'python-simplejson' 'python-six'
          'python-speaklater' 'python-sqlparse' 'python-wtforms' 'python-psutil'
          'python-jinja' 'python-paramiko' 'python-psycopg2' 'python-bcrypt'
-         'python-cryptography' 'python-sqlalchemy1.3' 'python-testtools'
+         'python-cryptography' 'python-sqlalchemy' 'python-testtools'
          'python-webencodings' 'python-werkzeug' 'python-dateutil'
          'python-flask-gravatar' 'python-flask-mail' 'python-flask-principal'
          'python-flask-paranoid' 'python-sshtunnel' 'python-flask-security-too'
          'python-werkzeug' 'python-flask-compress' 'python-ldap3' 'python-cryptography'
-         'python-flask-babelex' 'python-gssapi')
+         'python-flask-babelex' 'python-gssapi' 'python-email-validator' 'python-eventlet'
+         'python-httpagentparser' 'python-user-agents' 'python-requests' 'python-authlib')
 makedepends=('python-setuptools' 'python-sphinx' 'python-extras' 'python-fixtures'
              'python-html5lib' 'python-pbr' 'python-mimeparse' 'python-pyrsistent'
              'imagemagick')
@@ -28,67 +28,55 @@ source=(https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v${pkgver}/source/${pkgn
         pgAdmin4.desktop
         config_distro.py
         config_local.py
-        pgadmin4-python-de-vendor-venv-paths.patch
-        flask-security-compat.patch
         flask2-compat.patch)
 validpgpkeys=('E8697E2EEF76C02D3A6332778881B2A8210976F2') # Package Manager (Package Signing Key) <packages@pgadmin.org>
-sha512sums=('7ce12f65ce9dbfe4af9e92dd7f9327a05be8b8436ef495a0634043158417f3af5f457b88ee5422ede59f517c197668094454c6d7b7c33e255068479ce6ec13d9'
+sha512sums=('55ec3553aee064413043b8c829a00e710675cda5e529aa9cbd73488f4c344847d6eb03fd75c941143b986f30c7e7ee441403e9fc93042e219817879e57622863'
             'SKIP'
             'b19dda3331585010c759099eb09f4db288ce4cd3d36882b56748e1e3756dc7bee2899d7438d496280498ec6a60f6e1ba90309d49fc599403f1fdc7e8817b6645'
             '16d00dc2095904a6b12da7039458f632873829ad98d4d7653eac5804032ba92097ccae4488d56467d0ea9bd64e2654a3dead73eb7924c947ff1737ff6e3b4745'
             'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e'
-            'a8c1a3762469b02b745da4e3b30f7534ad6bb94e91d43f7e63604fef24f638e09575e2c9336e753e5b6dbe167c55bb49fb6247a16431415318479eb3a3712adc'
-            '8b23686674c12f1bbba9ded22425874adb5f6802f2e1f7e381c07208251301f0bb56622a0440e5609c5dcc5461f50fe08c7dcab4405878e9662de6faf782a39b'
             '5eb39b2926adc7fe715a2b1b3f2165bd84a9fab3f8afda1ddaaba557ad1d41a4aa8d279387699b7148a86c7af4782d5b6b7f50f89972ef3507d14795c006a65c')
 
 prepare() {
   cd ${pkgname}-${pkgver}
-
-  patch -Np1 < ../pgadmin4-python-de-vendor-venv-paths.patch
-  patch -NRp1 < ../flask-security-compat.patch
   patch -NRp1 < ../flask2-compat.patch
 
-  local PYTHONVERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
-  sed -E "s|/usr/pgadmin4/web|/usr/lib/pgadmin4/web|g;
-          s|/usr/pgadmin4/lib/python[0-9\.]+|/usr/lib/python${PYTHONVERSION}|g" 
-      -i runtime/ConfigWindow.ui
-  sed "s|##PYTHONVERSION##|${PYTHONVERSION}|g" -i runtime/Server.cpp
-
   sed -E -i requirements.txt 
-    -e '/blinker>?=/d' 
-    -e '/extras>?=/d' 
     -e '/Flask>?=/d' 
+    -e '/Flask-Gravatar>?=/d' 
     -e '/Flask-Login>?=/d' 
+    -e '/Flask-Mail>?=/d' 
     -e '/Flask-Migrate>?=/d' 
     -e '/Flask-SQLAlchemy>?=/d' 
     -e '/Flask-WTF>?=/d' 
-    -e '/pycrypto>?=/d' 
+    -e '/Flask-Compress>?=/d' 
     -e '/passlib>?=/d' 
     -e '/pytz>?=/d' 
     -e '/simplejson>?=/d' 
     -e '/six>?=/d' 
-    -e '/speaklater>?=/d' 
+    -e '/speaklater3>?=/d' 
     -e '/sqlparse>?=/d' 
     -e '/WTForms>?=/d' 
+    -e '/Flask-Paranoid>?=/d' 
     -e '/psutil>?=/d' 
     -e '/psycopg2>?=/d' 
     -e '/python-dateutil>?=/d' 
     -e '/SQLAlchemy>?=/d' 
-    -e '/Flask-Gravatar>?=/d' 
-    -e '/Flask-Mail>?=/d' 
-    -e '/Flask-Principal>?=/d' 
-    -e '/Flask-Paranoid>?=/d' 
-    -e '/htmlmin>?=/d' 
+    -e '/itsdangerous>?<?=/d' 
     -e '/Flask-Security-Too>?=/d' 
-    -e '/Flask-HTMLmin>?=/d' 
-    -e '/Flask-Compress>?=/d' 
+    -e '/bcrypt>?<?=/d' 
+    -e '/cryptography>?=/d' 
     -e '/sshtunnel>?=/d' 
-    -e '/Werkzeug>?=/d' 
     -e '/ldap3>?=/d' 
-    -e '/bcrypt>?<?=/d' 
-    -e '/cryptography>?<?=/d' 
-    -e '/Flask-BabelEx>?<?=/d' 
+    -e '/Flask-BabelEx>?=/d' 
     -e '/gssapi>?<?=/d' 
+    -e '/flask-socketio>?>?=/d' 
+    -e '/eventlet>?=/d' 
+    -e '/httpagentparser>?=/d' 
+    -e '/user-agents>?=/d' 
+    -e '/pywinpty>?=/d' 
+    -e '/Authlib>?=/d' 
+    -e '/requests>?=/d' 
     -e '/^#.*/d' 
     -e '/^$/d'
   if [[ -s requirements.txt ]]; then
@@ -104,37 +92,30 @@ build() {
   export PGADMIN_PYTHON_DIR=/usr
 
   cd ${pkgname}-${pkgver}
-  convert +set date:create +set date:modify runtime/pgAdmin4.{ico,png}
+  convert +set date:create +set date:modify  -resize 256x265 runtime/assets/pgAdmin4.png runtime/assets/pgAdmin4-0.png
+  convert +set date:create +set date:modify  -resize 48x48 runtime/assets/pgAdmin4.png runtime/assets/pgAdmin4-1.png
+  convert +set date:create +set date:modify  -resize 32x32 runtime/assets/pgAdmin4.png runtime/assets/pgAdmin4-2.png
+  convert +set date:create +set date:modify  -resize 16x16 runtime/assets/pgAdmin4.png runtime/assets/pgAdmin4-3.png
   # override doctree directory
   make docs SPHINXOPTS='-d /tmp/'
-
-  cd runtime
-  export CFLAGS+=" ${CPPFLAGS}"
-  export CXXFLAGS+=" ${CPPFLAGS}"
-  qmake CONFIG+=release
-  make
 }
 
 package() {
   cd ${pkgname}-${pkgver}
 
-  install -Dm 755 runtime/pgAdmin4 "${pkgdir}/usr/lib/pgadmin4/runtime/pgAdmin4"
+  install -dm 755 "${pkgdir}/usr/lib/pgadmin4"
   cp -a docs web "${pkgdir}/usr/lib/pgadmin4"
   install -Dm 644 "${srcdir}"/config_{distro,local}.py -t "${pkgdir}/usr/lib/pgadmin4/web"
 
-  install -Dm 644 runtime/pgAdmin4-0.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pgAdmin4.png"
-  install -Dm 644 runtime/pgAdmin4-1.png "${pkgdir}/usr/share/icons/hicolor/48x48/apps/pgAdmin4.png"
-  install -Dm 644 runtime/pgAdmin4-2.png "${pkgdir}/usr/share/icons/hicolor/32x32/apps/pgAdmin4.png"
-  install -Dm 644 runtime/pgAdmin4-3.png "${pkgdir}/usr/share/icons/hicolor/16x16/apps/pgAdmin4.png"
+  install -Dm 644 runtime/assets/pgAdmin4-0.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pgAdmin4.png"
+  install -Dm 644 runtime/assets/pgAdmin4-1.png "${pkgdir}/usr/share/icons/hicolor/48x48/apps/pgAdmin4.png"
+  install -Dm 644 runtime/assets/pgAdmin4-2.png "${pkgdir}/usr/share/icons/hicolor/32x32/apps/pgAdmin4.png"
+  install -Dm 644 runtime/assets/pgAdmin4-3.png "${pkgdir}/usr/share/icons/hicolor/16x16/apps/pgAdmin4.png"
   install -Dm 644 "${srcdir}/pgAdmin4.desktop" -t "${pkgdir}/usr/share/applications"
 
   install -D /dev/stdin "${pkgdir}/usr/bin/pgadmin4" <<END
 #!/bin/sh
-cd /usr/lib/pgadmin4
-exec runtime/pgAdmin4 "$@"
-END
-  install -D /dev/stdin "${pkgdir}/usr/bin/pgadmin4-server" <<END
-#!/bin/sh
+export PGADMIN_SERVER_MODE='OFF'
 cd /usr/lib/pgadmin4
 python web/pgAdmin4.py "$@"
 END
diff --git a/trunk/pgadmin4-python-de-vendor-venv-paths.patch b/trunk/pgadmin4-python-de-vendor-venv-paths.patch
deleted file mode 100644
index fb0b7c5..0000000
--- a/trunk/pgadmin4-python-de-vendor-venv-paths.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3edbde6534e3e819e47075c196c533d88cdbf786 Mon Sep 17 00:00:00 2001
-From: anthraxx <levente@leventepolyak.net>
-Date: Wed, 19 Dec 2018 01:10:25 +0100
-Subject: [PATCH] python: de-vendor venv paths
-
----
- runtime/Server.cpp | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/runtime/Server.cpp b/runtime/Server.cpp
-index f053cbb00..fd120f36a 100644
---- a/runtime/Server.cpp
-+++ b/runtime/Server.cpp
-@@ -131,11 +131,11 @@ Server::Server(quint16 port, QString key, QString logFileName)
-     add_to_path(pythonHome, venvPath.canonicalFilePath());
- #else
-     // Build (and canonicalise) the virtual environment path
--    QFileInfo venvBinPath(app_dir + "/../venv/bin");
--    QFileInfo venvLibPath(app_dir + "/../venv/lib/python");
--    QFileInfo venvDynLibPath(app_dir + "/../venv/lib/python/lib-dynload");
--    QFileInfo venvSitePackagesPath(app_dir + "/../venv/lib/python/site-packages");
--    QFileInfo venvPath(app_dir + "/../venv");
-+    QFileInfo venvBinPath("/usr/bin");
-+    QFileInfo venvLibPath("/usr/lib/python##PYTHONVERSION##");
-+    QFileInfo venvDynLibPath("/usr/lib/python##PYTHONVERSION##/lib-dynload");
-+    QFileInfo venvSitePackagesPath("/usr/lib/python##PYTHONVERSION##/site-packages");
-+    QFileInfo venvPath("/usr/lib/python##PYTHONVERSION##");
- 
-     // Prepend the bin directory to the path
-     add_to_path(path_env, venvBinPath.canonicalFilePath(), true);
--- 
-2.27.0
-

The above diff updates the PKGBUILD to 6.1 but pgadmin4 fails with a different error.  The 6.1 version also requires the AUR packages linked below

https://aur.archlinux.org/packages/python-user-agents/
https://aur.archlinux.org/packages/python-ua-parser/
https://aur.archlinux.org/packages/pyth … entparser/

Last edited by loqs (2021-10-29 22:17:45)

#23 2021-11-16 06:55:19

hopyres
Member
Registered: 2021-03-02
Posts: 11

Re: pgAdmin 4: Unable to start program, fresh install

When update PGADMIN to version 6.1 in official repository ?  neutral

#24 2022-05-10 19:30:34

matrs
Member
Registered: 2013-05-14
Posts: 13

Re: pgAdmin 4: Unable to start program, fresh install

To this day, pgAdmin still doesn’t work. It’s way easier just to install it using  `pip`. Follow these (official) instructions and you should have a working pgAdmin in a couple of minutes: https://www.pgadmin.org/download/pgadmin-4-python/

#25 2022-05-10 20:01:41

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 323

Re: pgAdmin 4: Unable to start program, fresh install

The way I install it (and any other Python software I want in my computer) is through pipx. No more dependency issues, which are abundant for Python software in Arch.

when i open pgadmin4 in manjaro xfce
this error message pops up saying

An error occurred initializing the pgadmin 4 server:
Failed to launch application server, server thread exiting.

error message

i checked the logs

startup log

2021-08-26 09:35:29: Checking for system tray...
2021-08-26 09:35:29: Starting pgAdmin4 server...
2021-08-26 09:35:29: Creating server object, port:42505, key:fdcf6315-03b8-4a0c-a4cc-c8e6efc3f38e, logfile:/home/thenujan/.local/share/pgadmin4.d41d8cd98f00b204e9800998ecf8427e.log
2021-08-26 09:35:29: Python Path: /usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/lib/python3.9/site-packages
2021-08-26 09:35:29: Python Home: /usr/lib/python3.9
2021-08-26 09:35:29: Initializing Python...
2021-08-26 09:35:29: Python initialized.
2021-08-26 09:35:29: Adding new additional path elements
2021-08-26 09:35:29: Redirecting stderr...
2021-08-26 09:35:29: stderr redirected successfully.
2021-08-26 09:35:29: Initializing server...
2021-08-26 09:35:29: Webapp Path: /usr/lib/pgadmin4/web/pgAdmin4.py
2021-08-26 09:35:29: Server initialized, starting server thread...
2021-08-26 09:35:29: Open the application code and run it.
2021-08-26 09:35:29: Set the port number, key and force SERVER_MODE off
2021-08-26 09:35:29: PyRun_SimpleFile launching application server...
2021-08-26 09:35:30: Failed to launch the application server, server thread exiting.

server log

Traceback (most recent call last):
  File "/usr/lib/pgadmin4/web/pgAdmin4.py", line 35, in <module>
    import config
  File "/usr/lib/pgadmin4/web/config.py", line 25, in <module>
    from pgadmin.utils import env, IS_WIN, fs_short_path
  File "/usr/lib/pgadmin4/web/pgadmin/__init__.py", line 28, in <module>
    from flask_security import Security, SQLAlchemyUserDatastore, current_user
  File "/usr/lib/python3.9/site-packages/flask_security/__init__.py", line 15, in <module>
    from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
  File "/usr/lib/python3.9/site-packages/flask_security/core.py", line 48, in <module>
    from .mail_util import MailUtil
  File "/usr/lib/python3.9/site-packages/flask_security/mail_util.py", line 14, in <module>
    import email_validator
ModuleNotFoundError: No module named 'email_validator'

i did try installing email_validator

by using pip
pip install email_validator
but its still showing me the same error

and pgadmin4 configurations seem right
enter image description here

and sometimes it strangely says failed to open system default web browser and that error message stops after the restart and then it comes back again after several attempts to open pgadmin4

and this web browser error only pops up when pgadmin4 is running in the background if i kill pgadmin4 then failed to launch application server error pops up when i open it

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Pfsense icap protocol error
  • Perl error log
  • Pfsense dpinger sendto error 64
  • Pfro error что это
  • Pfro error delete operation

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии