[ 
https://issues.apache.org/jira/browse/HDDS-2086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16943438#comment-16943438
 ] 

Attila Doroszlai commented on HDDS-2086:
----------------------------------------

Hi [~avijayan], this can be reproduced using the current {{ozone-recon}} 
environment, which has this configuration:

{noformat:title=https://github.com/apache/hadoop/blob/0e026cb0cefcadcfe404cd5d542f081f3b8ab69b/hadoop-ozone/dist/src/main/compose/ozone-recon/docker-config#L24}
OZONE-SITE.XML_ozone.recon.db.dir=/data/metadata/recon
{noformat}

{{/data/metadata}} does not exist in the image.  Shouldn't Recon create it if 
needed?

To reproduce the problem, simply run the tests:

{noformat}
$ cd hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/compose/ozone-recon
$ KEEP_RUNNING=true ./test.sh
{noformat}

Additionally an NPE occurs in {{ReconServer.stop}} when handling the 
{{SQLException}} because {{httpServer}} is not initialized yet.

{noformat:title=docker-compose logs recon}
recon_1     | Waiting for the service om:9874
recon_1     | WARNING: An illegal reflective access operation has occurred
recon_1     | WARNING: Illegal reflective access by 
com.google.inject.internal.cglib.core.$ReflectUtils$2 
(file:/opt/hadoop/share/ozone/lib/guice-4.0.jar) to method 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
recon_1     | WARNING: Please consider reporting this to the maintainers of 
com.google.inject.internal.cglib.core.$ReflectUtils$2
recon_1     | WARNING: Use --illegal-access=warn to enable warnings of further 
illegal reflective access operations
recon_1     | WARNING: All illegal access operations will be denied in a future 
release
recon_1     | 2019-10-03 08:40:52 INFO  ReconRestServletModule:75 - 
rest([/api/*]).packages(org.apache.hadoop.ozone.recon.api)
recon_1     | 2019-10-03 08:40:53 INFO  ReconServer:74 - Initializing Recon 
server...
recon_1     | 2019-10-03 08:40:53 ERROR ReconServer:99 - Error during 
initializing Recon server.
recon_1     | java.sql.SQLException: path to 
'//data/metadata/recon/ozone_recon_sqlite.db': '/data/metadata' does not exist
recon_1     |   at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
recon_1     |   at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:61)
recon_1     |   at 
org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:28)
recon_1     |   at 
org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:21)
recon_1     |   at org.sqlite.JDBC.createConnection(JDBC.java:116)
recon_1     |   at 
org.sqlite.SQLiteDataSource.getConnection(SQLiteDataSource.java:410)
recon_1     |   at 
org.sqlite.SQLiteDataSource.getConnection(SQLiteDataSource.java:398)
recon_1     |   at 
org.hadoop.ozone.recon.schema.StatsSchemaDefinition.initializeSchema(StatsSchemaDefinition.java:44)
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.call(ReconServer.java:78)
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.call(ReconServer.java:41)
recon_1     |   at picocli.CommandLine.execute(CommandLine.java:1173)
recon_1     |   at picocli.CommandLine.access$800(CommandLine.java:141)
recon_1     |   at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
recon_1     |   at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
recon_1     |   at 
picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
recon_1     |   at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
recon_1     |   at picocli.CommandLine.parseWithHandler(CommandLine.java:1465)
recon_1     |   at 
org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:65)
recon_1     |   at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:56)
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.main(ReconServer.java:52)
recon_1     | 2019-10-03 08:40:53 INFO  ReconServer:114 - Stopping Recon server
recon_1     | java.lang.NullPointerException
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.stop(ReconServer.java:115)
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.call(ReconServer.java:100)
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.call(ReconServer.java:41)
recon_1     |   at picocli.CommandLine.execute(CommandLine.java:1173)
recon_1     |   at picocli.CommandLine.access$800(CommandLine.java:141)
recon_1     |   at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
recon_1     |   at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
recon_1     |   at 
picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
recon_1     |   at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
recon_1     |   at picocli.CommandLine.parseWithHandler(CommandLine.java:1465)
recon_1     |   at 
org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:65)
recon_1     |   at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:56)
recon_1     |   at 
org.apache.hadoop.ozone.recon.ReconServer.main(ReconServer.java:52)
{noformat}

> ReconServer throws SQLException but path present for ozone.recon.db.dir in 
> ozone-site
> -------------------------------------------------------------------------------------
>
>                 Key: HDDS-2086
>                 URL: https://issues.apache.org/jira/browse/HDDS-2086
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Shweta
>            Priority: Major
>
> java.sql.SQLException: path to 
> '/${ozone.recon.db.dir}/ozone_recon_sqlite.db': '/${ozone.recon.db.dir}' does 
> not exist
> But property present in ozone-site.xml:
> <property>
>         <name>ozone.recon.db.dir</name>
>         <value>/tmp/metadata</value>
> </property> 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to