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 <[email protected]> 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 
>> <[email protected] <mailto:[email protected]>> 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 
>>> <[email protected] <mailto:[email protected]>> 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': '[email protected] 
>>> <mailto:[email protected]>'}
>>> [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 <[email protected] 
>>>> <mailto:[email protected]>> wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Apr 1, 2019, at 1:24 PM, Alakh Prakash Singh Raghuvanshi 
>>>>> <[email protected] <mailto:[email protected]>> 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?
>>> 
>> 
> 

Reply via email to