Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3I50-00031E-9Y for pgadmin-hackers@arkaria.postgresql.org; Tue, 03 Apr 2018 09:18:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3I4y-0006MH-Rt for pgadmin-hackers@arkaria.postgresql.org; Tue, 03 Apr 2018 09:18:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3I4y-0006M7-HF for pgadmin-hackers@lists.postgresql.org; Tue, 03 Apr 2018 09:18:12 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f3I4u-0001fc-IO for pgadmin-hackers@lists.postgresql.org; Tue, 03 Apr 2018 09:18:12 +0000 Received: by mail-wr0-x242.google.com with SMTP id l49so17825353wrl.4 for ; Tue, 03 Apr 2018 02:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e/8twlm7GhceQucX42YxzJBol5NiMlhzfhc+8fPObec=; b=hr5Oe2pPDw4inVx85BzCFEa8RURDOdryQBhG9awkHa/CkonhgyrHGNC9VojAg2cCLx p7KEej/ZPRf6Zk+Z5/4mKjUnBlPjPAChX3vPxLIQfBXKfW9nqVRGredWajJ221i1qsYd 5rKgDuOv2UmBYrRGYP8qQv4SkiCh+vB/pXK8zHA3PATBGE9QSjVzs2874eGfRmEcsR1j DPJG/M+ToWGgF58lCEjf7gBqvVZTNscVqAwH6NL+JCVYr4oXLf8ohfaErAjBSmQjNu83 T+7qEX4YQwjxPPMzkNsXyQqXkBpZ4mspOzGI0oTYON+JHXNlk31nhqcGMt9rqNSnLvA8 2N4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e/8twlm7GhceQucX42YxzJBol5NiMlhzfhc+8fPObec=; b=F7xbnhZKA+h80j7Hu7bGrfGAsrBdX6n8NPmOW5btUnAy58nX9kDN66totehMUo2xvG pqMBwai9m5EnZHHMSfyF4q8UxUFoX6hTLtKfSuao/YfpeQwiKHMUZr9ErKNNOhRDF7rp 7Po3KM+s9ZqICRaHERkZh9msjYlcl0CJ2MOVvL3U+u+pCHlOD+qaNSRqpC3H2ZRNchCB 5MhmYhmPf7sFUoBmPOEjghPQtiwQZlLA1sQLY3iTfZtxwgX9Qpbgin8wNuKoQrgMs3qi 8FlzJam/J3Y652TX+AJ8wHK9zZ7BPNuUboLFVsO1g4YP3+/h9LXjdmZlxx8Bnfn8QVSW C9JA== X-Gm-Message-State: AElRT7G3VWbnzD06bpRHBTQZi8+lDF8iX9k5QOBZPj/WuB9d7705+IbF Kr/a1s+o2b1gJcVkIRcjqDFqqcxZSs+/w/YoWVC/pg== X-Google-Smtp-Source: AIpwx4+LCFV3TzuKzkHa1KQtxDtTsarDyjHzL8nrNJFVnXfd2KZZKV3S2IsrPx4KOjFN8D7+p1nPWhCnyLY4oKSjbX4= X-Received: by 10.223.189.11 with SMTP id j11mr9873173wrh.49.1522747087651; Tue, 03 Apr 2018 02:18:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.69.220 with HTTP; Tue, 3 Apr 2018 02:18:07 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 3 Apr 2018 10:18:07 +0100 Message-ID: Subject: Re: Proposal for changes in official Docker image To: =?UTF-8?B?0JzQsNC60YHQuNC8INCa0L7Qu9GM0YbQvtCy?= Cc: pgadmin-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="089e082f67143e17bd0568ee2f7c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --089e082f67143e17bd0568ee2f7c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Sat, Mar 31, 2018 at 5:54 PM, =D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC =D0= =9A=D0=BE=D0=BB=D1=8C=D1=86=D0=BE=D0=B2 wrote: > 2018-03-19 17:55 GMT+03:00 Dave Page : > > > > - PGADMIN_SERVER_NAME doesn't appear to be supported. This was added at > user > > request, for security reasons (to help ensure the connection is going > where > > expected). I'm not entirely convinced of the value of that, but if it's > > fairly painless to add, it may well be worth it. > > Can you explain the meaning of this option, or maybe give me a link to > original feature request? > As far as I understand, Apache uses this to identify virtual hosts > based on HTTP Host header, > but there are no virtual hosts in Gunicorn, so no need for this. > Yeah, I looked back at the history on this - it was an Apache requirement, essentially to avoid confusing SNI. If Gunicorn doesn't support virtual hosts, then I agree there's no longer a need for this. > > > - If you don't map /var/lib/pgadmin (in my case, to a directory already > > containing a config), then I was seeing the following error. I would > expect > > it to init within the container if the config directory isn't mapped: > > > > piranha:web dpage$ docker logs affectionate_spence > > sh: -z: unknown operand > > NOTE: Configuring authentication for SERVER mode. > > > > Enter the email address and password to use for the initial pgAdmin use= r > > account: > > > > Traceback (most recent call last): > > File "run_pgadmin.py", line 4, in > > from pgAdmin4 import app > > File "/pgadmin4/pgAdmin4.py", line 67, in > > app =3D create_app() > > File "/pgadmin4/pgadmin/__init__.py", line 306, in create_app > > db_upgrade(app) > > File "/pgadmin4/pgadmin/setup/db_upgrade.py", line 25, in db_upgrade > > flask_migrate.upgrade(migration_folder) > > File "/usr/local/lib/python3.6/site-packages/flask_migrate/__init > __.py", > > line 244, in upgrade > > command.upgrade(config, revision, sql=3Dsql, tag=3Dtag) > > File "/usr/local/lib/python3.6/site-packages/alembic/command.py", lin= e > > 254, in upgrade > > script.run_env() > > File "/usr/local/lib/python3.6/site-packages/alembic/script/base.py", > line > > 427, in run_env > > util.load_python_file(self.dir, 'env.py') > > File "/usr/local/lib/python3.6/site-packages/alembic/util/pyfiles.py"= , > > line 81, in load_python_file > > module =3D load_module_py(module_id, path) > > File "/usr/local/lib/python3.6/site-packages/alembic/util/compat.py", > line > > 83, in load_module_py > > spec.loader.exec_module(module) > > File "/pgadmin4/pgadmin/setup/../../migrations/env.py", line 94, in > > > > run_migrations_online() > > File "/pgadmin4/pgadmin/setup/../../migrations/env.py", line 87, in > > run_migrations_online > > context.run_migrations() > > File "", line 8, in run_migrations > > File > > "/usr/local/lib/python3.6/site-packages/alembic/runtime/environment.py"= , > > line 836, in run_migrations > > self.get_context().run_migrations(**kw) > > File > > "/usr/local/lib/python3.6/site-packages/alembic/runtime/migration.py", > line > > 330, in run_migrations > > step.migration_fn(**kw) > > File "/pgadmin4/migrations/versions/fdc58d9bd449_.py", line 112, in > > upgrade > > email, password =3D user_info() > > File "/pgadmin4/pgadmin/setup/user_info.py", line 55, in user_info > > email =3D input("Email address: ") > > EOFError: EOF when reading a line > > [2018-03-19 14:50:59 +0000] [1] [INFO] Starting gunicorn 19.7.1 > > [2018-03-19 14:50:59 +0000] [1] [INFO] Listening at: http://0.0.0.0:808= 0 > (1) > > [2018-03-19 14:50:59 +0000] [1] [INFO] Using worker: threads > > [2018-03-19 14:50:59 +0000] [14] [INFO] Booting worker with pid: 14 > > [2018-03-19 14:50:59 +0000] [14] [ERROR] Exception in worker process > > Traceback (most recent call last): > > File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", > line > > 578, in spawn_worker > > worker.init_process() > > File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ > gthread.py", > > line 109, in init_process > > super(ThreadWorker, self).init_process() > > File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ > base.py", > > line 126, in init_process > > self.load_wsgi() > > File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ > base.py", > > line 135, in load_wsgi > > self.wsgi =3D self.app.wsgi() > > File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", > line > > 67, in wsgi > > self.callable =3D self.load() > > File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py"= , > > line 65, in load > > return self.load_wsgiapp() > > File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py"= , > > line 52, in load_wsgiapp > > return util.import_app(self.app_uri) > > File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line > 352, > > in import_app > > __import__(module) > > File "/pgadmin4/run_pgadmin.py", line 4, in > > from pgAdmin4 import app > > File "/pgadmin4/pgAdmin4.py", line 67, in > > app =3D create_app() > > File "/pgadmin4/pgadmin/__init__.py", line 309, in create_app > > schema_version =3D version.value > > AttributeError: 'NoneType' object has no attribute 'value' > > [2018-03-19 14:50:59 +0000] [14] [INFO] Worker exiting (pid: 14) > > [2018-03-19 14:50:59 +0000] [1] [INFO] Shutting down: Master > > [2018-03-19 14:50:59 +0000] [1] [INFO] Reason: Worker failed to boot. > > Yeah, that was shell quoting issue, should be fixed. > :-) --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --089e082f67143e17bd0568ee2f7c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Sat, Mar 31, 2018 at 5:54 PM, =D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC= =D0=9A=D0=BE=D0=BB=D1=8C=D1=86=D0=BE=D0=B2 <kolmax94@gmail.com>= wrote:
2018-03-19 17:55 = GMT+03:00 Dave Page <dpage@pgadmin.org>:
>
> - PGADMIN_SERVER_NAME doesn't appear to be supported. This was add= ed at user
> request, for security reasons (to help ensure the connection is going = where
> expected). I'm not entirely convinced of the value of that, but if= it's
> fairly painless to add, it may well be worth it.

Can you explain the meaning of this option, or maybe give me a = link to
original feature request?
As far as I understand, Apache uses this to identify virtual hosts
based on HTTP Host header,
but there are no virtual hosts in Gunicorn, so no need for this.

Yeah, I looked back at the history on this - it w= as an Apache requirement, essentially to avoid confusing SNI. If Gunicorn d= oesn't support virtual hosts, then I agree there's no longer a need= for this.
=C2=A0

> - If you don't map /var/lib/pgadmin (in my case, to a directory al= ready
> containing a config), then I was seeing the following error. I would e= xpect
> it to init within the container if the config directory isn't mapp= ed:
>
> piranha:web dpage$ docker logs affectionate_spence
> sh: -z: unknown operand
> NOTE: Configuring authentication for SERVER mode.
>
> Enter the email address and password to use for the initial pgAdmin us= er
> account:
>
> Traceback (most recent call last):
>=C2=A0 =C2=A0File "run_pgadmin.py", line 4, in <module>=
>=C2=A0 =C2=A0 =C2=A0from pgAdmin4 import app
>=C2=A0 =C2=A0File "/pgadmin4/pgAdmin4.py", line 67, in <mo= dule>
>=C2=A0 =C2=A0 =C2=A0app =3D create_app()
>=C2=A0 =C2=A0File "/pgadmin4/pgadmin/__init__.py", line = 306, in create_app
>=C2=A0 =C2=A0 =C2=A0db_upgrade(app)
>=C2=A0 =C2=A0File "/pgadmin4/pgadmin/setup/db_upgrade.py"= ;, line 25, in db_upgrade
>=C2=A0 =C2=A0 =C2=A0flask_migrate.upgrade(migration_folder)
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/fla= sk_migrate/__init__.py",
> line 244, in upgrade
>=C2=A0 =C2=A0 =C2=A0command.upgrade(config, revision, sql=3Dsql, tag=3D= tag)
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/ale= mbic/command.py", line
> 254, in upgrade
>=C2=A0 =C2=A0 =C2=A0script.run_env()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/ale= mbic/script/base.py", line
> 427, in run_env
>=C2=A0 =C2=A0 =C2=A0util.load_python_file(self.dir, 'env.py= 9;)
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/ale= mbic/util/pyfiles.py",
> line 81, in load_python_file
>=C2=A0 =C2=A0 =C2=A0module =3D load_module_py(module_id, path)
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/ale= mbic/util/compat.py", line
> 83, in load_module_py
>=C2=A0 =C2=A0 =C2=A0spec.loader.exec_module(module)
>=C2=A0 =C2=A0File "/pgadmin4/pgadmin/setup/../../migrations/e= nv.py", line 94, in
> <module>
>=C2=A0 =C2=A0 =C2=A0run_migrations_online()
>=C2=A0 =C2=A0File "/pgadmin4/pgadmin/setup/../../migrations/e= nv.py", line 87, in
> run_migrations_online
>=C2=A0 =C2=A0 =C2=A0context.run_migrations()
>=C2=A0 =C2=A0File "<string>", line 8, in run_migrations=
>=C2=A0 =C2=A0File
> "/usr/local/lib/python3.6/site-packages/alembic/runtime/envi= ronment.py",
> line 836, in run_migrations
>=C2=A0 =C2=A0 =C2=A0self.get_context().run_migrations(**kw)
>=C2=A0 =C2=A0File
> "/usr/local/lib/python3.6/site-packages/alembic/runtime/migr= ation.py", line
> 330, in run_migrations
>=C2=A0 =C2=A0 =C2=A0step.migration_fn(**kw)
>=C2=A0 =C2=A0File "/pgadmin4/migrations/versions/fdc58d9bd449= _.py", line 112, in
> upgrade
>=C2=A0 =C2=A0 =C2=A0email, password =3D user_info()
>=C2=A0 =C2=A0File "/pgadmin4/pgadmin/setup/user_info.py"= , line 55, in user_info
>=C2=A0 =C2=A0 =C2=A0email =3D input("Email address: ")
> EOFError: EOF when reading a line
> [2018-03-19 14:50:59 +0000] [1] [INFO] Starting gunicorn 19.7.1
> [2018-03-19 14:50:59 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080= (1)
> [2018-03-19 14:50:59 +0000] [1] [INFO] Using worker: threads
> [2018-03-19 14:50:59 +0000] [14] [INFO] Booting worker with pid: 14 > [2018-03-19 14:50:59 +0000] [14] [ERROR] Exception in worker process > Traceback (most recent call last):
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/arbiter.py", line
> 578, in spawn_worker
>=C2=A0 =C2=A0 =C2=A0worker.init_process()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/workers/gthread.py",
> line 109, in init_process
>=C2=A0 =C2=A0 =C2=A0super(ThreadWorker, self).init_process()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/workers/base.py",
> line 126, in init_process
>=C2=A0 =C2=A0 =C2=A0self.load_wsgi()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/workers/base.py",
> line 135, in load_wsgi
>=C2=A0 =C2=A0 =C2=A0self.wsgi =3D self.app.wsgi()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/app/base.py", line
> 67, in wsgi
>=C2=A0 =C2=A0 =C2=A0self.callable =3D self.load()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/app/wsgiapp.py",
> line 65, in load
>=C2=A0 =C2=A0 =C2=A0return self.load_wsgiapp()
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/app/wsgiapp.py",
> line 52, in load_wsgiapp
>=C2=A0 =C2=A0 =C2=A0return util.import_app(self.app_uri)
>=C2=A0 =C2=A0File "/usr/local/lib/python3.6/site-packages/gun= icorn/util.py", line 352,
> in import_app
>=C2=A0 =C2=A0 =C2=A0__import__(module)
>=C2=A0 =C2=A0File "/pgadmin4/run_pgadmin.py", line 4, in <= module>
>=C2=A0 =C2=A0 =C2=A0from pgAdmin4 import app
>=C2=A0 =C2=A0File "/pgadmin4/pgAdmin4.py", line 67, in <mo= dule>
>=C2=A0 =C2=A0 =C2=A0app =3D create_app()
>=C2=A0 =C2=A0File "/pgadmin4/pgadmin/__init__.py", line = 309, in create_app
>=C2=A0 =C2=A0 =C2=A0schema_version =3D version.value
> AttributeError: 'NoneType' object has no attribute 'value&= #39;
> [2018-03-19 14:50:59 +0000] [14] [INFO] Worker exiting (pid: 14)
> [2018-03-19 14:50:59 +0000] [1] [INFO] Shutting down: Master
> [2018-03-19 14:50:59 +0000] [1] [INFO] Reason: Worker failed to boot.<= br>
Yeah, that was shell quoting issue, should be fixed.

:-)

=C2=A0
--=
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--089e082f67143e17bd0568ee2f7c--