Unable to preview data from a table in postgresql datasource


#1

Hi all,

I have setup a connection to postgresql9.5, when double clicking a table to view the data it showed below error:

DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query. sql SELECT *
_ FROM “public”.“t1”_
_ OFFSET 0 ROWS_
_ FETCH NEXT 2000 ROWS ONLY plugin dw-psql-216 SqlOperatorImpl JDBC_SUB_SCAN Location 0:0:6 SqlOperatorImpl JDBC_SUB_SCAN Location 0:0:6 Fragment 0:0 [Error Id: 126067f2-ace6-4e17-bcf2-0cd344dee285 on LHQ0363.Dev.com:31010] (org.postgresql.util.PSQLException) ERROR: relation “public.t1” does not exist :16 org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2476 org.postgresql.core.v3.QueryExecutorImpl.processResults():2189 org.postgresql.core.v3.QueryExecutorImpl.execute():300 org.postgresql.jdbc.PgStatement.executeInternal():428 org.postgresql.jdbc.PgStatement.execute():354 org.postgresql.jdbc.PgStatement.executeWithFlags():301 org.postgresql.jdbc.PgStatement.executeCachedSql():287 org.postgresql.jdbc.PgStatement.executeWithFlags():264 org.postgresql.jdbc.PgStatement.executeQuery():231 org.apache.commons.dbcp.DelegatingStatement.executeQuery():208 org.apache.commons.dbcp.DelegatingStatement.executeQuery():208 com.dremio.exec.store.jdbc.JdbcRecordReader.setup():171 com.dremio.exec.store.CoercionReader.setup():109 com.dremio.sabot.op.scan.ScanOperator$1.run():178 com.dremio.sabot.op.scan.ScanOperator$1.run():174 java.security.AccessController.doPrivileged():-2 javax.security.auth.Subject.doAs():-1 org.apache.hadoop.security.UserGroupInformation.doAs():1807 com.dremio.sabot.op.scan.ScanOperator.setupReaderAsCorrectUser():174 com.dremio.sabot.op.scan.ScanOperator.setupReader():166 com.dremio.sabot.op.scan.ScanOperator.setup():147 com.dremio.sabot.driver.SmartOp$SmartProducer.setup():552 com.dremio.sabot.driver.Pipe$SetupVisitor.visitProducer():79 com.dremio.sabot.driver.Pipe$SetupVisitor.visitProducer():63 com.dremio.sabot.driver.SmartOp$SmartProducer.accept():522 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.Pipeline.setup():58 com.dremio.sabot.exec.fragment.FragmentExecutor.setupExecution():331 com.dremio.sabot.exec.fragment.FragmentExecutor.run():227 com.dremio.sabot.exec.fragment.FragmentExecutor.access$800():83 com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run():577 com.dremio.sabot.task.AsyncTaskWrapper.run():92 com.dremio.sabot.task.slicing.Slici_ngThread.run():71

Any ideas?


#2

it works on the first time querying the table data. but shows above error afterwards…


#3

It showed below error in another dremio installed on an hdp edgenode, the proflie running dremio is confirmed to having permission to create file like /opt/dremio-community-1.3/data/pdfs/results/.25xx, no idea why mkdirs failed

SYSTEM ERROR: IOException: Mkdirs failed to create /opt/dremio-community-1.3/data/pdfs/results/.25d94308-f932-ddb1-6517-76f7038cd100-1512488182289

SqlOperatorImpl ARROW_WRITER
Location 0:0:3
SqlOperatorImpl ARROW_WRITER
Location 0:0:3
Fragment 0:0

[Error Id: 7da77050-757b-46ef-ba7f-c01a2ba7505c on dn1-dev1-tbdp.dev.com:-1]

_ (java.io.IOException) Mkdirs failed to create /opt/dremio-community-1.3/data/pdfs/results/.25d94308-f932-ddb1-6517-76f7038cd100-1512488182289_
_ org.apache.hadoop.fs.RawLocalFileSystem.create():305_
_ org.apache.hadoop.fs.RawLocalFileSystem.create():339_
_ com.dremio.exec.store.dfs.PseudoDistributedFileSystem.create():372_


#4

it was caused by the installation paths are not aligned in two executors. fixed after move them to same paths in different server.


#5

Thanks for the update @forestlzj and glad it worked

Kindly let us know if you have any further questions

Thanks,
@balaji.ramaswamy


#6

having the same issue on one of our environments. suddenly all queries fail to plan or execute with the same error. I can’t see why since it has full access to said filesystem.

SYSTEM ERROR: IOException: Mkdirs failed to create /var/lib/dremio/share_stage/results/23787313-b355-82ec-916a-13775240b400 (exists=false, cwd=file:///) SqlOperatorImpl ARROW_WRITER Location 1:6:1 SqlOperatorImpl ARROW_WRITER Location 1:6:1 Fragment 1:6 [Error Id: c91cf759-b057-4011-b856-98be91c80324 on 10.244.22.246:-1] (java.io.IOException) Mkdirs failed to create /var/lib/dremio/share_stage/results/23787313-b355-82ec-916a-13775240b400 (exists=false, cwd=file:///) org.apache.hadoop.fs.ChecksumFileSystem.create():449 org.apache.hadoop.fs.ChecksumFileSystem.create():435 org.apache.hadoop.fs.FileSystem.create():945 org.apache.hadoop.fs.FileSystem.create():926 org.apache.hadoop.fs.FileSystem.create():823 org.apache.hadoop.fs.FileSystem.create():812 com.dremio.exec.store.dfs.FileSystemWrapper.create():208 com.dremio.exec.store.easy.arrow.ArrowRecordWriter.setup():98 com.dremio.sabot.op.writer.WriterOperator.setup():104 com.dremio.sabot.driver.SmartOp$SmartSingleInput.setup():252 com.dremio.sabot.driver.Pipe$SetupVisitor.visitSingleInput():73 com.dremio.sabot.driver.Pipe$SetupVisitor.visitSingleInput():63 com.dremio.sabot.driver.SmartOp$SmartSingleInput.accept():197 com.dremio.sabot.driver.StraightPipe.setup():103 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.Pipeline.setup():58 com.dremio.sabot.exec.fragment.FragmentExecutor.setupExecution():353 com.dremio.sabot.exec.fragment.FragmentExecutor.run():243 com.dremio.sabot.exec.fragment.FragmentExecutor.access$800():91 com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run():600


#7

@aalamir3, what are the permissions on /var/lib/dremio/share_stage/results?


#8

permissions are set to 775 on the parent volume mount, /var/lib/dremio with group sticky bit

we see similar errors on the local path with spilling errors, unable to create spilling directory. but it can and it does create it… it’s hit and miss