Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zplam-0007sd-2K for pgadmin-hackers@arkaria.postgresql.org; Fri, 23 Oct 2015 23:17:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zplal-0007Zd-3E for pgadmin-hackers@arkaria.postgresql.org; Fri, 23 Oct 2015 23:17:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zplak-0007ZX-CC for pgadmin-hackers@postgresql.org; Fri, 23 Oct 2015 23:17:46 +0000 Received: from mout.gmx.com ([74.208.4.201]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1Zplac-0005TZ-U2 for pgadmin-hackers@postgresql.org; Fri, 23 Oct 2015 23:17:45 +0000 Received: from [92.234.71.108] by 3capp-mailcom-lxa12.server.lan (via HTTP); Sat, 24 Oct 2015 01:17:37 +0200 MIME-Version: 1.0 Message-ID: From: "Prasad Somwanshi" To: pgadmin-hackers Subject: Re: Running pgAdmin4 Content-Type: multipart/mixed; boundary=rekcebs-9ade08fe-6ea8-4bed-82cf-d5ff58085ccb Date: Sat, 24 Oct 2015 01:17:37 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: , <352C284F-06D9-4111-94EB-B4D144EAD9DB@pgadmin.org>, X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K0:Te6SIzrh6ccLk2/yAdAJEcjizVKS5B3Y4igft+8h2Td G6t4MVZ3ZeWNi96ifUBlhrZIHrGq4YS99xpy28CLBzbcoKImlx SJRT1BrS+i1mEeFGZywCkEonkr+XK9DYCwATkjSsOwwVh3t0/K LJvikpcA/LPYpOnI8rpBrQ/ETiMJTkVlaPcHEiZU8AlasGte2p 2tw4BVKUMDzynJ0XUpXTao7gJPQRpo2Ddwxzgsv7d7H1sByJrd xZz6OUIRhPmOkdCbxV7FKacdPELrFMAzmQeQj+HTpIMLF5srj0 +LxdpmdH/gU582gXOgSfUpHwdgY X-UI-Out-Filterresults: notjunk:1;V01:K0:Mcjs0/MVfTA=:QCI1yOqFWTHKL5NUTJPe1n RK53SJtw9vlEEItJMZpX51b5qecABU/eQw120r+7JHV1rW1H+wxaFFs1XlbE9Z1K3Wf71P/My FiCUmT9di7j3o6t/Wzk4hYYbULnQ4oMTy4Z8E2HewX0dg1mGvPwfKc4GeAylT+EfxYWoZxzMz REJw9tZzdKWsGnROP/m/mV499LWreV8poeH2ZsKneCZKEDh6aSXJyaBJmuxSduEKU10uHf3+x C6cKA/KGH/8G98op90DCfMSeRkPl7KuuCcw7Tc9pLmyAhHma3r5W6xWtPKrJcHlg25xRQ4Fxp Esyx/3vTItJsCHBcBxFDHF78L2ac4yETXM12SLN7GutG5ok2NoEHPzWYI0yYNcxzVF/LRbSG0 SsFpoHhWBcfqFkBZdPR8W1QG4RzeMWvOEzViTYuv0XfptesHmMBf/jM9kWlZEN6puWrNkJd99 FVrD4RLetQ== X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --rekcebs-9ade08fe-6ea8-4bed-82cf-d5ff58085ccb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It seems , Debug mode and running server in separate thread are n= ot compatible in Flask. And for Debug mode reloader need to be disabled for= such case. Othewise it give error. I've modified code to disable reloa= der in debug mode.
This problem only affects desktop runtime.
 
thanks and regards,
Prasad Somwanshi
 
 

Sent: Friday, October 02, 2015 at 8:13 AM
From: "Prasad Somwanshi" <prasad.s@mail.com>
To: pgadmin-hackers <pgadmin-hackers@postgresql.org>
Subject: Re: [pgadmin-hackers] Running pgAdmin4
Ok, in that case, probably it's broken. Error mean, it doesn't like= running python code in separate thread.

regards,
Prasad
 
 

Sent: Friday, October 02, 2015 at 7:54 AM
From: "Dave Page" <dpage@pgadmin.org>'t
To: "Prasad Somwanshi" <prasad.s@mail.com>
Cc: pgadmin-hackers <pgadmin-hackers@postgresql.org>
Subject: Re: [pgadmin-hackers] Running pgAdmin4

The desktop runtime hasn't been tested in months afaik, so it's ent= irely possible something is broken at the moment. It is only PoC code right= now.

-- 
Dave Page
Blog: http:/= /pgsnake.blogspot.com[http://pgsnake.blogspot.com/[http://pgsnake.blogspot.com/]]
Twitter: @pgsnake

EnterpriseDB UK:h= ttp://www.enterprisedb.com[http://www.enterprisedb.com][http://www.enterprisedb.com/[http://www.enterprisedb.com= /]]
The Enterprise PostgreSQL Company
On 2 Oct 2015, at 07:25, Prasad Somwanshi <prasad.s@mail.com[prasad.s@ma= il.com]> wrote:
 
Has anybody encountered this ? Or it's just me ?

regards,
Prasad
 
 

Sent: Thursday, October 01, 2015 at 10:09 AM
From: "Prasad Somwanshi" <prasad.s@mail.com[prasad.s@mail= .com]>
To: pgadmin-hackers <pgadmin-hackers@postgresql.org[pgadmin-hackers= @postgresql.org]>
Subject: Re: [pgadmin-hackers] Running pgAdmin4
I think, I did. Is there any specific settings I might have missed there ?<= br/>
regards,
Prasad
 
 

Sent: Thursday, October 01, 2015 at 6:34 AM
From: "Ashesh Vashi" <ashesh.vashi@enterprisedb.com[ashes= h.vashi@enterprisedb.com]>
To: "Prasad Somwanshi" <prasad.s@mail.com[prasad.s@mail.c= om]>
Cc: pgadmin-hackers <pgadmin-hackers@postgresql.org[pgadmin-hackers= @postgresql.org]>
Subject: Re: [pgadmin-hackers] Running pgAdmin4

On Thu, Oct 1, 2015 at 2:19 AM, Prasad Somwanshi <prasad.s@mail.com[pras= ad.s@mail.com]> wrote:

Hi,

I'm trying to pgAdmin4. I'm able to run pgAdmin4.py in python shell= . And server runs.And able to access using browser.
Then I tried running desktop application, it throws following error,

Traceback (most recent call last):
  File "/home/prasad/Development/pgadmin4/web/pgAdmin4.py", = line 73, in <module>
    app.run(port=3Dserver_port)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line= 772, in run
    run_simple(host, port, self, **options)
  File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.10.1-py= 2.7.egg/werkzeug/serving.py", line 622, in run_simple
    reloader_type)
  File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.10.1-py= 2.7.egg/werkzeug/_reloader.py", line 263, in run_with_reloader
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
ValueError: signal only works in main thread
Initial connection failed. Retrying in 2 seconds.
Initial connection failed. Retrying in 3 seconds.
Initial connection failed. Retrying in 4 seconds.
Initial connection failed after multiple attempts. Aborting.


I can see what error says. As Qt application spawns separate thread to run = server, which apparently is not allowed.
Am I missing something ?
Have you created config_local.py?
 

--
Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company[http://www.enterprisedb.com[http://www.enterprisedb.com= ][http://www.= enterprisedb.com[http://www.enterprisedb.com]]]
 
http:/= /www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi][= http:/= /www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi]]= [http:= //www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi]= [http:= //www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi]= ]][htt= p://www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi][htt= p://www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi]][ht= tp://www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi][ht= tp://www.linkedin.com/in/asheshvashi[http://www.linkedin.com/in/asheshvashi]]]]
regards,
Prasad


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org[pgadm= in-hackers@postgresql.org][pgadmin-hackers@postgresql.org[pgadmin-hackers@p= ostgresql.org]])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers[http://w= ww.postgresql.org/mailpref/pgadmin-hackers][http://www.postgresql= .org/mailpref/pgadmin-hackers[http://www.postgresql.org/mailpref/= pgadmin-hackers]][http://www.postgresql.org/mailpref/pgadmin-hack= ers[http://www.postgresql.org/mailpref/pgadmin-hackers][http://www.postgresql.org/mailpref/pgadmin-hackers[http://www.po= stgresql.org/mailpref/pgadmin-hackers]]][http://www.postgresql.or= g/mailpref/pgadmin-hackers[http://www.postgresql.org/mailpref/pga= dmin-hackers][http://www.postgresql.org/mailpref/pgadmin-hackers<= /a>[http://www.postgresql.org/mailpref/pgadmin-hackers]][= http://www.postgresql.org/mailpref/pgadmin-hackers[http://www.pos= tgresql.org/mailpref/pgadmin-hackers][http://www.postgresql.org/m= ailpref/pgadmin-hackers[http://www.postgresql.org/mailpref/pgadmi= n-hackers]]]]


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org[pgadm= in-hackers@postgresql.org])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers[http://w= ww.postgresql.org/mailpref/pgadmin-hackers][http://www.postgresql= .org/mailpref/pgadmin-hackers[http://www.postgresql.org/mailpref/= pgadmin-hackers]][http://www.postgresql.org/mailpref/pgadmin-hack= ers[http://www.postgresql.org/mailpref/pgadmin-hackers][http://www.postgresql.org/mailpref/pgadmin-hackers[http://www.po= stgresql.org/mailpref/pgadmin-hackers]]]


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org[pgadm= in-hackers@postgresql.org])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers[http://w= ww.postgresql.org/mailpref/pgadmin-hackers][http://www.postgresql= .org/mailpref/pgadmin-hackers[http://www.postgresql.org/mailpref/= pgadmin-hackers]]


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers[http://w= ww.postgresql.org/mailpref/pgadmin-hackers]
= --rekcebs-9ade08fe-6ea8-4bed-82cf-d5ff58085ccb Content-Type: text/x-patch Content-Disposition: attachment; filename=threadingissue.patch diff --git a/web/pgAdmin4.py b/web/pgAdmin4.py index 40ca3ec..556aa5c 100644 --- a/web/pgAdmin4.py +++ b/web/pgAdmin4.py @@ -53,9 +53,6 @@ if not os.path.isfile(config.SQLITE_PATH): # Create the app! app = create_app() -if config.DEBUG: - app.debug = True - # Start the web server. The port number should have already been set by the # runtime if we're running in desktop mode, otherwise we'll just use the # Flask default. @@ -70,6 +67,10 @@ else: server_port = config.DEFAULT_SERVER_PORT try: - app.run(port=server_port) +# Make sure reloader is disabled in debug mode + if config.DEBUG: + app.run(port=server_port,debug=True,use_reloader=False) + else: + app.run(port=server_port) except IOError: app.logger.error("Error starting the app server: %s", sys.exc_info()) --rekcebs-9ade08fe-6ea8-4bed-82cf-d5ff58085ccb Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --rekcebs-9ade08fe-6ea8-4bed-82cf-d5ff58085ccb--