You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Alakh Prakash Singh Raghuvanshi <al...@gmail.com> on 2019/04/01 16:02:02 UTC

Need help setting up Django portal

Hi,

I am Alakh from IU, SICE department. I was trying to install the Django portal from the instructions here https://github.com/apache/airavata/tree/develop/modules/ide-integration <https://github.com/apache/airavata/tree/develop/modules/ide-integration> .
Issues facing:
	1. Installation for wagtail dependency is failing. I get this error 
	 During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/qj/7j37j7357dl5v4kxjq81th9w0000gp/T/pip-install-3k6jhc56/Pillow/setup.py", line 799, in <module>
        raise RequiredDependencyException(msg)
    __main__.RequiredDependencyException:
    
    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.

    2.After the above step, I went ahead to run 'python3 manage.py migrate'command which gave me the following error.
	 File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/django/contrib/admin/widgets.py", line 152
    '%s=%s' % (k, v) for k, v in params.items(),
    ^
SyntaxError: Generator expression must be parenthesized

I resolved issue 2 by changing the Django version from 1.11.16 to 1.11.17 in requirements.txt file although, I am not quite able to resolve issue 1 as of now. 
I was wondering if some one can help me in getting this project running on my local system.

Thanks,
Alakh Raghuvanshi


 

Re: Need help setting up Django portal

Posted by Suresh Marru <sm...@apache.org>.
Hi Alakh,

This is good effort from you to debug and frame a helpful query to the mailing list, Good doing. I do not have insights into your issues, may be others will chime in.

Suresh

> On Apr 2, 2019, at 1:55 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> Hi,
> 
> I have tried debugging this issue but I think the mysql docker container has something to do with it.
> There are 2 different stack trace I get.
> 1. Database initialization fails because exp_catalog.GATEWAY table query fails. But when I checked the files, create GATEWAY was the first query. I thought the query has issues so I ran it in my local system but it worked fine. 
> 2. Database initialization fails because 'Could not connect: Unknown database ‘experiment_catalog’’. As it says could not connect, I tried going inside the mysql container and I found out that  user ‘root’ was not able to login with the default password given in airavata-server.properties although with user ‘airavata’ I was able to login.
> 
> As to why Django was not connecting, the above db initialization doesn’t happen due to which the service ‘org.apache.airavata.service.profile.server.ProfileServiceServer’ supposed to be running on 8962 doesn’t come up.
> Also, with python3.6 version the Django portal installation is very smooth with little to no issues. I think the readme file with prerequisites should be updated with the version number as well.
> 
> Initially in my local system mysql container was failing but then I deleted all the project files and re-installed all the dependencies again. It worked.
> I am not sure on how to resolve the database issue.
> 
> Thanks,
> Alakh
> 
>> On 01-Apr-2019, at 4:11 PM, Suresh Marru <smarru@apache.org <ma...@apache.org>> wrote:
>> 
>> Most likely. You can take the hint from the previous log “Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]” and search in the IDE integration code on what is supposed to run on port 8962 and then verify if it is running. This error message below says it is unable to connect to database. Can you debug that first? Most of the stack traces are English and I often find them helpful. 
>> 
>> Suresh
>> 
>>> On Apr 1, 2019, at 4:07 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> Could it be because of this 
>>> 
>>> Exception in thread "main" java.lang.RuntimeException: Failed to initialize database for database_scripts/expcatalog
>>> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:63)
>>> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:45)
>>> 	at org.apache.airavata.registry.api.service.RegistryAPIServer.StartRegistryServer(RegistryAPIServer.java:69)
>>> 	at org.apache.airavata.registry.api.service.RegistryAPIServer.start(RegistryAPIServer.java:151)
>>> 	at org.apache.airavata.ide.integration.APIServerStarter.main(APIServerStarter.java:23)
>>> Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
>>> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:156)
>>> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
>>> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.throwException(ExceptionMapper.java:92)
>>> 	at org.mariadb.jdbc.Driver.connect(Driver.java:111)
>>> 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
>>> 	at java.sql.DriverManager.getConnection(DriverManager.java:208)
>>> 	at org.apache.airavata.common.utils.DBUtil.getConnection(DBUtil.java:212)
>>> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:54)
>>> 	... 4 more
>>> Caused by: java.sql.SQLException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
>>> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1029)
>>> 	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:483)
>>> 	at org.mariadb.jdbc.Driver.connect(Driver.java:106)
>>> 	... 8 more
>>> Caused by: java.net.ConnectException: Connection refused
>>> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
>>> 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>>> 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>>> 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>>> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>>> 	at java.net.Socket.connect(Socket.java:589)
>>> 	at java.net.Socket.connect(Socket.java:538)
>>> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:401)
>>> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1022)
>>> 	... 10 more
>>> 
>>> I get his trace when I run org.apache.airavata.ide.integration.APIServerStarter file.
>>> Thanks,
>>> Alakh
>>> 
>>>> On 01-Apr-2019, at 4:04 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> The keycloak is running now. I can connect to https://airavata.host:8443/auth/ <https://airavata.host:8443/auth/> 
>>>> Still I am not able to log in the website.
>>>> 
>>>> [2019-04-01 20:00:20,969 django_airavata.apps.auth.backends:120 DEBUG] userinfo: {'sub': 'dcc21374-79ff-4f9f-b895-a6f6a35554bf', 'name': 'dim Upe', 'preferred_username': 'default-admin', 'given_name': 'dim', 'family_name': 'Upe', 'email': 'dimuthu.upeksha2@gmail.com <ma...@gmail.com>'}
>>>> [2019-04-01 20:00:20,973 django_airavata.apps.auth.views:77 DEBUG] authenticated user: default-admin
>>>> Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]
>>>> 
>>>> The above are the last few lines of the log printed on the terminal. Please let me know if you need to see all the log data.
>>>> 
>>>> Thanks,
>>>> Alakh
>>>> 
>>>>> On 01-Apr-2019, at 2:48 PM, Christie, Marcus Aaron <machrist@iu.edu <ma...@iu.edu>> wrote:
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>>>>> 
>>>>>> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
>>>>>> 
>>>>> 
>>>>> It is failing to connect to https://airavata.host:8443 <https://airavata.host:8443/>. Are you able to load https://airavata.host:8443 <https://airavata.host:8443/> ? Is Keycloak running?
>>>> 
>>> 
>> 
> 


Re: Need help setting up Django portal

Posted by Alakh Prakash Singh Raghuvanshi <al...@gmail.com>.
Hi,

I have tried debugging this issue but I think the mysql docker container has something to do with it.
There are 2 different stack trace I get.
1. Database initialization fails because exp_catalog.GATEWAY table query fails. But when I checked the files, create GATEWAY was the first query. I thought the query has issues so I ran it in my local system but it worked fine. 
2. Database initialization fails because 'Could not connect: Unknown database ‘experiment_catalog’’. As it says could not connect, I tried going inside the mysql container and I found out that  user ‘root’ was not able to login with the default password given in airavata-server.properties although with user ‘airavata’ I was able to login.

As to why Django was not connecting, the above db initialization doesn’t happen due to which the service ‘org.apache.airavata.service.profile.server.ProfileServiceServer’ supposed to be running on 8962 doesn’t come up.
Also, with python3.6 version the Django portal installation is very smooth with little to no issues. I think the readme file with prerequisites should be updated with the version number as well.

Initially in my local system mysql container was failing but then I deleted all the project files and re-installed all the dependencies again. It worked.
I am not sure on how to resolve the database issue.

Thanks,
Alakh

> On 01-Apr-2019, at 4:11 PM, Suresh Marru <sm...@apache.org> wrote:
> 
> Most likely. You can take the hint from the previous log “Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]” and search in the IDE integration code on what is supposed to run on port 8962 and then verify if it is running. This error message below says it is unable to connect to database. Can you debug that first? Most of the stack traces are English and I often find them helpful. 
> 
> Suresh
> 
>> On Apr 1, 2019, at 4:07 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> Could it be because of this 
>> 
>> Exception in thread "main" java.lang.RuntimeException: Failed to initialize database for database_scripts/expcatalog
>> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:63)
>> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:45)
>> 	at org.apache.airavata.registry.api.service.RegistryAPIServer.StartRegistryServer(RegistryAPIServer.java:69)
>> 	at org.apache.airavata.registry.api.service.RegistryAPIServer.start(RegistryAPIServer.java:151)
>> 	at org.apache.airavata.ide.integration.APIServerStarter.main(APIServerStarter.java:23)
>> Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
>> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:156)
>> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
>> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.throwException(ExceptionMapper.java:92)
>> 	at org.mariadb.jdbc.Driver.connect(Driver.java:111)
>> 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
>> 	at java.sql.DriverManager.getConnection(DriverManager.java:208)
>> 	at org.apache.airavata.common.utils.DBUtil.getConnection(DBUtil.java:212)
>> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:54)
>> 	... 4 more
>> Caused by: java.sql.SQLException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
>> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1029)
>> 	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:483)
>> 	at org.mariadb.jdbc.Driver.connect(Driver.java:106)
>> 	... 8 more
>> Caused by: java.net.ConnectException: Connection refused
>> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
>> 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>> 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>> 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>> 	at java.net.Socket.connect(Socket.java:589)
>> 	at java.net.Socket.connect(Socket.java:538)
>> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:401)
>> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1022)
>> 	... 10 more
>> 
>> I get his trace when I run org.apache.airavata.ide.integration.APIServerStarter file.
>> Thanks,
>> Alakh
>> 
>>> On 01-Apr-2019, at 4:04 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> The keycloak is running now. I can connect to https://airavata.host:8443/auth/ <https://airavata.host:8443/auth/> 
>>> Still I am not able to log in the website.
>>> 
>>> [2019-04-01 20:00:20,969 django_airavata.apps.auth.backends:120 DEBUG] userinfo: {'sub': 'dcc21374-79ff-4f9f-b895-a6f6a35554bf', 'name': 'dim Upe', 'preferred_username': 'default-admin', 'given_name': 'dim', 'family_name': 'Upe', 'email': 'dimuthu.upeksha2@gmail.com <ma...@gmail.com>'}
>>> [2019-04-01 20:00:20,973 django_airavata.apps.auth.views:77 DEBUG] authenticated user: default-admin
>>> Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]
>>> 
>>> The above are the last few lines of the log printed on the terminal. Please let me know if you need to see all the log data.
>>> 
>>> Thanks,
>>> Alakh
>>> 
>>>> On 01-Apr-2019, at 2:48 PM, Christie, Marcus Aaron <machrist@iu.edu <ma...@iu.edu>> wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>>>> 
>>>>> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
>>>>> 
>>>> 
>>>> It is failing to connect to https://airavata.host:8443 <https://airavata.host:8443/>. Are you able to load https://airavata.host:8443 <https://airavata.host:8443/> ? Is Keycloak running?
>>> 
>> 
> 


Re: Need help setting up Django portal

Posted by Suresh Marru <sm...@apache.org>.
Most likely. You can take the hint from the previous log “Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]” and search in the IDE integration code on what is supposed to run on port 8962 and then verify if it is running. This error message below says it is unable to connect to database. Can you debug that first? Most of the stack traces are English and I often find them helpful. 

Suresh

> On Apr 1, 2019, at 4:07 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> Hi,
> 
> Could it be because of this 
> 
> Exception in thread "main" java.lang.RuntimeException: Failed to initialize database for database_scripts/expcatalog
> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:63)
> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:45)
> 	at org.apache.airavata.registry.api.service.RegistryAPIServer.StartRegistryServer(RegistryAPIServer.java:69)
> 	at org.apache.airavata.registry.api.service.RegistryAPIServer.start(RegistryAPIServer.java:151)
> 	at org.apache.airavata.ide.integration.APIServerStarter.main(APIServerStarter.java:23)
> Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:156)
> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
> 	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.throwException(ExceptionMapper.java:92)
> 	at org.mariadb.jdbc.Driver.connect(Driver.java:111)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:208)
> 	at org.apache.airavata.common.utils.DBUtil.getConnection(DBUtil.java:212)
> 	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:54)
> 	... 4 more
> Caused by: java.sql.SQLException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1029)
> 	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:483)
> 	at org.mariadb.jdbc.Driver.connect(Driver.java:106)
> 	... 8 more
> Caused by: java.net.ConnectException: Connection refused
> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> 	at java.net.Socket.connect(Socket.java:589)
> 	at java.net.Socket.connect(Socket.java:538)
> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:401)
> 	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1022)
> 	... 10 more
> 
> I get his trace when I run org.apache.airavata.ide.integration.APIServerStarter file.
> Thanks,
> Alakh
> 
>> On 01-Apr-2019, at 4:04 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> The keycloak is running now. I can connect to https://airavata.host:8443/auth/ <https://airavata.host:8443/auth/> 
>> Still I am not able to log in the website.
>> 
>> [2019-04-01 20:00:20,969 django_airavata.apps.auth.backends:120 DEBUG] userinfo: {'sub': 'dcc21374-79ff-4f9f-b895-a6f6a35554bf', 'name': 'dim Upe', 'preferred_username': 'default-admin', 'given_name': 'dim', 'family_name': 'Upe', 'email': 'dimuthu.upeksha2@gmail.com <ma...@gmail.com>'}
>> [2019-04-01 20:00:20,973 django_airavata.apps.auth.views:77 DEBUG] authenticated user: default-admin
>> Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]
>> 
>> The above are the last few lines of the log printed on the terminal. Please let me know if you need to see all the log data.
>> 
>> Thanks,
>> Alakh
>> 
>>> On 01-Apr-2019, at 2:48 PM, Christie, Marcus Aaron <machrist@iu.edu <ma...@iu.edu>> wrote:
>>> 
>>> 
>>> 
>>>> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>>> 
>>>> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
>>>> 
>>> 
>>> It is failing to connect to https://airavata.host:8443 <https://airavata.host:8443/>. Are you able to load https://airavata.host:8443 <https://airavata.host:8443/> ? Is Keycloak running?
>> 
> 


Re: Need help setting up Django portal

Posted by Alakh Prakash Singh Raghuvanshi <al...@gmail.com>.
Hi,

Could it be because of this 

Exception in thread "main" java.lang.RuntimeException: Failed to initialize database for database_scripts/expcatalog
	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:63)
	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:45)
	at org.apache.airavata.registry.api.service.RegistryAPIServer.StartRegistryServer(RegistryAPIServer.java:69)
	at org.apache.airavata.registry.api.service.RegistryAPIServer.start(RegistryAPIServer.java:151)
	at org.apache.airavata.ide.integration.APIServerStarter.main(APIServerStarter.java:23)
Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:156)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.throwException(ExceptionMapper.java:92)
	at org.mariadb.jdbc.Driver.connect(Driver.java:111)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:208)
	at org.apache.airavata.common.utils.DBUtil.getConnection(DBUtil.java:212)
	at org.apache.airavata.common.utils.DBInitializer.initializeDB(DBInitializer.java:54)
	... 4 more
Caused by: java.sql.SQLException: Could not connect to address=(host=localhost)(port=13306)(type=master) : Connection refused
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1029)
	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:483)
	at org.mariadb.jdbc.Driver.connect(Driver.java:106)
	... 8 more
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at java.net.Socket.connect(Socket.java:538)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:401)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1022)
	... 10 more

I get his trace when I run org.apache.airavata.ide.integration.APIServerStarter file.
Thanks,
Alakh

> On 01-Apr-2019, at 4:04 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> Hi,
> 
> The keycloak is running now. I can connect to https://airavata.host:8443/auth/ <https://airavata.host:8443/auth/> 
> Still I am not able to log in the website.
> 
> [2019-04-01 20:00:20,969 django_airavata.apps.auth.backends:120 DEBUG] userinfo: {'sub': 'dcc21374-79ff-4f9f-b895-a6f6a35554bf', 'name': 'dim Upe', 'preferred_username': 'default-admin', 'given_name': 'dim', 'family_name': 'Upe', 'email': 'dimuthu.upeksha2@gmail.com <ma...@gmail.com>'}
> [2019-04-01 20:00:20,973 django_airavata.apps.auth.views:77 DEBUG] authenticated user: default-admin
> Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]
> 
> The above are the last few lines of the log printed on the terminal. Please let me know if you need to see all the log data.
> 
> Thanks,
> Alakh
> 
>> On 01-Apr-2019, at 2:48 PM, Christie, Marcus Aaron <machrist@iu.edu <ma...@iu.edu>> wrote:
>> 
>> 
>> 
>>> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
>>> 
>> 
>> It is failing to connect to https://airavata.host:8443 <https://airavata.host:8443/>. Are you able to load https://airavata.host:8443 <https://airavata.host:8443/> ? Is Keycloak running?
> 


Re: Need help setting up Django portal

Posted by Alakh Prakash Singh Raghuvanshi <al...@gmail.com>.
Hi,

The keycloak is running now. I can connect to https://airavata.host:8443/auth/ <https://airavata.host:8443/auth/> 
Still I am not able to log in the website.

[2019-04-01 20:00:20,969 django_airavata.apps.auth.backends:120 DEBUG] userinfo: {'sub': 'dcc21374-79ff-4f9f-b895-a6f6a35554bf', 'name': 'dim Upe', 'preferred_username': 'default-admin', 'given_name': 'dim', 'family_name': 'Upe', 'email': 'dimuthu.upeksha2@gmail.com'}
[2019-04-01 20:00:20,973 django_airavata.apps.auth.views:77 DEBUG] authenticated user: default-admin
Could not connect to any of [('::1', 8962, 0, 0), ('127.0.0.1', 8962)]

The above are the last few lines of the log printed on the terminal. Please let me know if you need to see all the log data.

Thanks,
Alakh

> On 01-Apr-2019, at 2:48 PM, Christie, Marcus Aaron <ma...@iu.edu> wrote:
> 
> 
> 
>> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>> 
>> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
>> 
> 
> It is failing to connect to https://airavata.host:8443 <https://airavata.host:8443/>. Are you able to load https://airavata.host:8443 <https://airavata.host:8443/> ? Is Keycloak running?


Re: Need help setting up Django portal

Posted by "Christie, Marcus Aaron" <ma...@iu.edu>.

> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
> 

It is failing to connect to https://airavata.host:8443 <https://airavata.host:8443/>. Are you able to load https://airavata.host:8443 <https://airavata.host:8443/> ? Is Keycloak running?

Re: Need help setting up Django portal

Posted by Alakh Prakash Singh Raghuvanshi <al...@gmail.com>.
Hi,
Yes, Although I do have a doubt. Do I need to setup the Java backend in my local system as well?

Below are the errors from the terminal
2019-04-01 17:19:14,617 django_airavata.apps.auth.backends:39 ERROR] login failed
Traceback (most recent call last):
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
    conn.connect()
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/packages/urllib3/util/retry.py", line 376, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/django_airavata/apps/auth/backends.py", line 23, in authenticate
    username, password)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/django_airavata/apps/auth/backends.py", line 63, in _get_token_and_userinfo_password_flow
    verify=verify_ssl)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 221, in fetch_token
    verify=verify, proxies=proxies)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/sessions.py", line 535, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 358, in request
    headers=headers, data=data, **kwargs)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='airavata.host', port=8443): Max retries exceeded with url: /auth/realms/default/protocol/openid-connect/token (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1134f1358>: Failed to establish a new connection: [Errno 61] Connection refused'))
[2019-04-01 17:19:14,631 django_airavata.apps.auth.views:77 DEBUG] authenticated user: None

Thanks,
Alakh

> On 01-Apr-2019, at 1:10 PM, Christie, Marcus Aaron <ma...@iu.edu> wrote:
> 
> 
> 
>> On Apr 1, 2019, at 12:46 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Sorry about the previous mails, I have successfully installed Django portal although I am not able to login through the given default username and password. 
>> 
> 
> Hi Alakh,
> 
> Are you seeing any errors from Django printed to the terminal when you run "python manage.py runserver"?  Are there any errors in the browser?


Re: Need help setting up Django portal

Posted by "Christie, Marcus Aaron" <ma...@iu.edu>.

> On Apr 1, 2019, at 12:46 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> Sorry about the previous mails, I have successfully installed Django portal although I am not able to login through the given default username and password. 
> 

Hi Alakh,

Are you seeing any errors from Django printed to the terminal when you run "python manage.py runserver"?  Are there any errors in the browser?

Re: Need help setting up Django portal

Posted by Alakh Prakash Singh Raghuvanshi <al...@gmail.com>.
Hi,
Sorry about the previous mails, I have successfully installed Django portal although I am not able to login through the given default username and password. 

Thanks,
Alakh

> On 01-Apr-2019, at 12:28 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> Hi,
> 
> I manually installed the wagtail dependency with version 2.4 and everything worked fine. Although I get a different error now.
> 
>    File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
>     val = getattr(self._wrapped, name)
> AttributeError: 'Settings' object has no attribute 'AIRAVATA_API_SECURE'
> 
> Thanks,
> Alakh
> 
> 
>> On 01-Apr-2019, at 12:02 PM, Alakh Prakash Singh Raghuvanshi <alakhpsr@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I am Alakh from IU, SICE department. I was trying to install the Django portal from the instructions here https://github.com/apache/airavata/tree/develop/modules/ide-integration <https://github.com/apache/airavata/tree/develop/modules/ide-integration> .
>> Issues facing:
>> 	1. Installation for wagtail dependency is failing. I get this error 
>> 	 During handling of the above exception, another exception occurred:
>>     
>>     Traceback (most recent call last):
>>       File "<string>", line 1, in <module>
>>       File "/private/var/folders/qj/7j37j7357dl5v4kxjq81th9w0000gp/T/pip-install-3k6jhc56/Pillow/setup.py", line 799, in <module>
>>         raise RequiredDependencyException(msg)
>>     __main__.RequiredDependencyException:
>>     
>>     The headers or library files could not be found for zlib,
>>     a required dependency when compiling Pillow from source.
>> 
>>     2.After the above step, I went ahead to run 'python3 manage.py migrate'command which gave me the following error.
>> 	 File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/django/contrib/admin/widgets.py", line 152
>>     '%s=%s' % (k, v) for k, v in params.items(),
>>     ^
>> SyntaxError: Generator expression must be parenthesized
>> 
>> I resolved issue 2 by changing the Django version from 1.11.16 to 1.11.17 in requirements.txt file although, I am not quite able to resolve issue 1 as of now. 
>> I was wondering if some one can help me in getting this project running on my local system.
>> 
>> Thanks,
>> Alakh Raghuvanshi
>> 
>> 
>>  
> 


Re: Need help setting up Django portal

Posted by Alakh Prakash Singh Raghuvanshi <al...@gmail.com>.
Hi,

I manually installed the wagtail dependency with version 2.4 and everything worked fine. Although I get a different error now.

   File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'AIRAVATA_API_SECURE'

Thanks,
Alakh


> On 01-Apr-2019, at 12:02 PM, Alakh Prakash Singh Raghuvanshi <al...@gmail.com> wrote:
> 
> Hi,
> 
> I am Alakh from IU, SICE department. I was trying to install the Django portal from the instructions here https://github.com/apache/airavata/tree/develop/modules/ide-integration <https://github.com/apache/airavata/tree/develop/modules/ide-integration> .
> Issues facing:
> 	1. Installation for wagtail dependency is failing. I get this error 
> 	 During handling of the above exception, another exception occurred:
>     
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "/private/var/folders/qj/7j37j7357dl5v4kxjq81th9w0000gp/T/pip-install-3k6jhc56/Pillow/setup.py", line 799, in <module>
>         raise RequiredDependencyException(msg)
>     __main__.RequiredDependencyException:
>     
>     The headers or library files could not be found for zlib,
>     a required dependency when compiling Pillow from source.
> 
>     2.After the above step, I went ahead to run 'python3 manage.py migrate'command which gave me the following error.
> 	 File "/Users/AlakhSingh/Projects/airavata-django/airavata-django-portal/venv/lib/python3.7/site-packages/django/contrib/admin/widgets.py", line 152
>     '%s=%s' % (k, v) for k, v in params.items(),
>     ^
> SyntaxError: Generator expression must be parenthesized
> 
> I resolved issue 2 by changing the Django version from 1.11.16 to 1.11.17 in requirements.txt file although, I am not quite able to resolve issue 1 as of now. 
> I was wondering if some one can help me in getting this project running on my local system.
> 
> Thanks,
> Alakh Raghuvanshi
> 
> 
>