Re: [web2py] All messed up
Alright, a little further now. I figured I needed to reinstall/upgrade psycopg2, which I did. Now I'm getting the ticket: Traceback (most recent call last): File G:\web2py\gluon\restricted.py, line 227, in restricted exec ccode in environment File G:/web2py/applications/myapp/models/0_0_globals.py http://127.0.0.1:8000/admin/edit/YAKiToMe/models/0_0_globals.py, line 43, in module migrate=True, # True causes db changes to propagate immediately File G:\web2py\gluon\packages\dal\pydal\base.py, line 174, in __call__ obj = super(MetaDAL, cls).__call__(*args, **kwargs) File G:\web2py\gluon\packages\dal\pydal\base.py, line 459, in __init__ raise RuntimeError(Failure to connect, tried %d times:\n%s % (attempts, tb)) RuntimeError: Failure to connect, tried 10 times: Traceback (most recent call last): File G:\web2py\gluon\packages\dal\pydal\base.py, line 437, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File G:\web2py\gluon\packages\dal\pydal\adapters\base.py, line 57, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File G:\web2py\gluon\packages\dal\pydal\adapters\postgres.py, line 151, in __init__ self.reconnect() File G:\web2py\gluon\packages\dal\pydal\connection.py, line 126, in reconnect self.connection = f() File G:\web2py\gluon\packages\dal\pydal\adapters\postgres.py, line 148, in connector return self.driver.connect(**driver_args) File C:\Program Files (x86)\Python27\lib\site-packages\psycopg2\__init__.py, line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: could not connect to server: Connection refused (0x274D/10061) Is the server running on host localhost (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x274D/10061) Is the server running on host localhost (127.0.0.1) and accepting TCP/IP connections on port 5432? I'm invoking my web2py app from localhost. I'm pretty sure I installed postgres to monitor port 5432 (the default). I'm checking it out now. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
Is your pg_hba.conf allowing your connections? On Tue, Jun 9, 2015 at 9:47 AM, weheh richard_gor...@verizon.net wrote: Alright, a little further now. I figured I needed to reinstall/upgrade psycopg2, which I did. Now I'm getting the ticket: Traceback (most recent call last): File G:\web2py\gluon\restricted.py, line 227, in restricted exec ccode in environment File G:/web2py/applications/myapp/models/0_0_globals.py http://127.0.0.1:8000/admin/edit/YAKiToMe/models/0_0_globals.py, line 43, in module migrate=True, # True causes db changes to propagate immediately File G:\web2py\gluon\packages\dal\pydal\base.py, line 174, in __call__ obj = super(MetaDAL, cls).__call__(*args, **kwargs) File G:\web2py\gluon\packages\dal\pydal\base.py, line 459, in __init__ raise RuntimeError(Failure to connect, tried %d times:\n%s % (attempts, tb)) RuntimeError: Failure to connect, tried 10 times: Traceback (most recent call last): File G:\web2py\gluon\packages\dal\pydal\base.py, line 437, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File G:\web2py\gluon\packages\dal\pydal\adapters\base.py, line 57, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File G:\web2py\gluon\packages\dal\pydal\adapters\postgres.py, line 151, in __init__ self.reconnect() File G:\web2py\gluon\packages\dal\pydal\connection.py, line 126, in reconnect self.connection = f() File G:\web2py\gluon\packages\dal\pydal\adapters\postgres.py, line 148, in connector return self.driver.connect(**driver_args) File C:\Program Files (x86)\Python27\lib\site-packages\psycopg2\__init__.py, line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: could not connect to server: Connection refused (0x274D/10061) Is the server running on host localhost (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x274D/10061) Is the server running on host localhost (127.0.0.1) and accepting TCP/IP connections on port 5432? I'm invoking my web2py app from localhost. I'm pretty sure I installed postgres to monitor port 5432 (the default). I'm checking it out now. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Massimiliano -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
actively refused it means that the socket you're pointing to is not open(able) . Review the listening ports and/or the firewall. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
@Niphlod: OK, I reinstalled Windows from source and this time web2py is back in working order. However, I'm still unable to connect to postgresql. I'm getting this ticket: Traceback (most recent call last): File G:\web2py\gluon\restricted.py, line 227, in restricted exec ccode in environment File G:/web2py/applications/myapp/models/0_0_globals.py http://127.0.0.1:8000/admin/edit/YAKiToMe/models/0_0_globals.py, line 43, in module migrate=True, # True causes db changes to propagate immediately File G:\web2py\gluon\packages\dal\pydal\base.py, line 174, in __call__ obj = super(MetaDAL, cls).__call__(*args, **kwargs) File G:\web2py\gluon\packages\dal\pydal\base.py, line 459, in __init__ raise RuntimeError(Failure to connect, tried %d times:\n%s % (attempts, tb)) RuntimeError: Failure to connect, tried 10 times: Traceback (most recent call last): File G:\web2py\gluon\packages\dal\pydal\base.py, line 437, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File G:\web2py\gluon\packages\dal\pydal\adapters\base.py, line 57, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File G:\web2py\gluon\packages\dal\pydal\adapters\postgres.py, line 151, in __init__ self.reconnect() File G:\web2py\gluon\packages\dal\pydal\connection.py, line 126, in reconnect self.connection = f() File G:\web2py\gluon\packages\dal\pydal\adapters\postgres.py, line 148, in connector return self.driver.connect(**driver_args) File G:\web2py\gluon\contrib\pg8000\__init__.py, line 336, in connect user, host, unix_sock, port, database, password, ssl) File G:\web2py\gluon\contrib\pg8000\core.py, line 969, in __init__ raise InterfaceError(communication error, exc_info()[1]) InterfaceError: ('communication error', error(10061, 'No connection could be made because the target machine actively refused it')) Wonder if anyone has ever run into this with postgresql before? The only difference in my setup is I upgraded my postgres to the most recent version (9.4). I believe I got the user/password combos correct when I restored the db into the new postgresql install. Any thoughts, anyone? Thanks for reading. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
Thanks for the pointers. @Massimiliano, the suggestion is a good one but I found my pg_hba.conf file was OK. I finally got this working by rebooting the machine, so I'm closing the issue. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] All messed up
Grrr. I just upgraded postgresql to the latest version 9.4 on Windows. I was surprised to see that it didn't overwrite the Postgres 9.2 install on my system. So I backed up my 9.2 db, created a new db under 9.4 and restored the 9.2 db into the 9.4 db. Everything seemed OK. But web2py wouldn't connect. So, I rebooted. No connect to 9.4. I then removed Postgres 9.2. No connect to 9.4. Then I upgraded to the latest source version of web2py for Windows. Still no connect. And now, I'm getting an invalid URL when I try to go to http://127.0.0.1:8000/admin. So now I have 2 problems: can't get to admin page, can't connect to Postgres. Anybody have any ideas how to proceed? I seem to be dead in the water. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
* Take a look at your web2py error logs - it usually gives you the reason as to what is wrong (even if your admin app does not work, just open the error logs in a text editor and view it) * Did you try running web2py from the console - python web2py -S some-test-app-name Then you can try to do the usual db=DAL(postgresql connection string) to see if the connect works. * If it does, then try to work with your application and its models from the console - python web2py -S your app -M (to load the models), and try some operations from within there Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 05-06-2015 2:50 PM, weheh wrote: Grrr. I just upgraded postgresql to the latest version 9.4 on Windows. I was surprised to see that it didn't overwrite the Postgres 9.2 install on my system. So I backed up my 9.2 db, created a new db under 9.4 and restored the 9.2 db into the 9.4 db. Everything seemed OK. But web2py wouldn't connect. So, I rebooted. No connect to 9.4. I then removed Postgres 9.2. No connect to 9.4. Then I upgraded to the latest source version of web2py for Windows. Still no connect. And now, I'm getting an invalid URL when I try to go to http://127.0.0.1:8000/admin. So now I have 2 problems: can't get to admin page, can't connect to Postgres. Anybody have any ideas how to proceed? I seem to be dead in the water. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com mailto:web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
* Take a look at your web2py error logs - it usually gives you the reason as to what is wrong (even if your admin app does not work, just open the error logs in a text editor and view it) * Did you try running web2py from the console - python web2py -S some-test-app-name Then you can try to do the usual db=DAL(postgresql connection string) to see if the connect works. * If it does, then try to work with your application and its models from the console - python web2py -S your app -M (to load the models), and try some operations from within there Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 05-06-2015 2:50 PM, weheh wrote: Grrr. I just upgraded postgresql to the latest version 9.4 on Windows. I was surprised to see that it didn't overwrite the Postgres 9.2 install on my system. So I backed up my 9.2 db, created a new db under 9.4 and restored the 9.2 db into the 9.4 db. Everything seemed OK. But web2py wouldn't connect. So, I rebooted. No connect to 9.4. I then removed Postgres 9.2. No connect to 9.4. Then I upgraded to the latest source version of web2py for Windows. Still no connect. And now, I'm getting an invalid URL when I try to go to http://127.0.0.1:8000/admin. So now I have 2 problems: can't get to admin page, can't connect to Postgres. Anybody have any ideas how to proceed? I seem to be dead in the water. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com mailto:web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
Hi Kiran, thanks for the response. Unfortunately, I can't see my error files now because I can't get through to web2py admin. Before updating web2py, there were absolutely no error messages about not being able to connect to postgres. And yes, I have run from the console but still no luck in getting through to web2py. On Friday, June 5, 2015 at 2:27:40 AM UTC-7, Kiran Subbaraman wrote: - Take a look at your web2py error logs - it usually gives you the reason as to what is wrong (even if your admin app does not work, just open the error logs in a text editor and view it) - Did you try running web2py from the console - python web2py -S some-test-app-name Then you can try to do the usual db=DAL(postgresql connection string) to see if the connect works. - If it does, then try to work with your application and its models from the console - python web2py -S your app -M (to load the models), and try some operations from within there Kiran Subbaramanhttp://subbaraman.wordpress.com/about/ On Fri, 05-06-2015 2:50 PM, weheh wrote: Grrr. I just upgraded postgresql to the latest version 9.4 on Windows. I was surprised to see that it didn't overwrite the Postgres 9.2 install on my system. So I backed up my 9.2 db, created a new db under 9.4 and restored the 9.2 db into the 9.4 db. Everything seemed OK. But web2py wouldn't connect. So, I rebooted. No connect to 9.4. I then removed Postgres 9.2. No connect to 9.4. Then I upgraded to the latest source version of web2py for Windows. Still no connect. And now, I'm getting an invalid URL when I try to go to http://127.0.0.1:8000/admin. So now I have 2 problems: can't get to admin page, can't connect to Postgres. Anybody have any ideas how to proceed? I seem to be dead in the water. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
Alright. I took the error message over to another machine that has an older version of web2py running. Looks pretty fundamental. CountFileError10_0_globals.pyAttributeError: type object 'DAL' has no attribute 'Field' http://127.0.0.1:8000/admin/errors/admin#+ details http://127.0.0.1:8000/admin/ticket/admin/127.0.0.1.2015-06-05.02-55-08.02729837-2dc6-4e87-abb3-9875cf7b3015 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Traceback (most recent call last): File G:\web2py\gluon\restricted.py, line 227, in restricted exec ccode in environment File G:\web2py\applications\myapp\models\0_0_globals.py, line 18, in module from gluon.tools import * File G:\web2py\gluon\custom_import.py, line 108, in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) File G:\web2py\gluon\tools.py, line 50, in module Field = DAL.Field AttributeError: type object 'DAL' has no attribute 'Field' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] All messed up
did you by any chance update web2py using the update button on admin ? if so, and if you were running a rather old web2py instance, the updater probably left some files behind that shouldn't be there (mainly DAL structure with the new subpackage). See what the standard folder structure in gluon/ is and watch out for any leftovers... On Friday, June 5, 2015 at 11:59:17 AM UTC+2, weheh wrote: Alright. I took the error message over to another machine that has an older version of web2py running. Looks pretty fundamental. CountFileError10_0_globals.pyAttributeError: type object 'DAL' has no attribute 'Field' http://127.0.0.1:8000/admin/errors/admin#+ details http://127.0.0.1:8000/admin/ticket/admin/127.0.0.1.2015-06-05.02-55-08.02729837-2dc6-4e87-abb3-9875cf7b3015 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Traceback (most recent call last): File G:\web2py\gluon\restricted.py, line 227, in restricted exec ccode in environment File G:\web2py\applications\myapp\models\0_0_globals.py, line 18, in module from gluon.tools import * File G:\web2py\gluon\custom_import.py, line 108, in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) File G:\web2py\gluon\tools.py, line 50, in module Field = DAL.Field AttributeError: type object 'DAL' has no attribute 'Field' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.