2

我尝试将查询连接到远程 postgres 数据库 -

%psql.sql

select * from my_schema.my_table limit 5

我已经更新了解释器的值,但我仍然收到以下错误 -

java.lang.NullPointerException 在 org.apache.zeppelin.postgresql.PostgreSqlInterpreter.interpret(PostgreSqlInterpreter.java:288) 在 org.apache.zeppelin.postgresql.PostgreSqlInterpreter.executeSql(PostgreSqlInterpreter.java:201) 在 org.apache.zeppelin。 org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer. java:302) 在 org.apache.zeppelin.scheduler.Job.run(Job.java:171) 在 org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139) 在 java.util.concurrent。 Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 在 java.util.concurrent.ThreadPoolExecutor 的 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)。 runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)

我尝试从 shell 访问,但出现错误 -

进程因错误退出:2(退出值:2)

我怀疑这与它试图获取密码的事实有关。但是,相同的命令 + 密码可以在我的终端上使用。

另一个相关问题是解释器中的属性不包含数据库名称。我将其添加为,postgresql.database但我不确定是否使用了此属性。

如果您知道如何解决,请告诉我,谢谢!

4

2 回答 2

4

postgresql.databasezeppelin 不会挑选您的财产。

在 postgres jdbc URL 属性中指定数据库名称。像jdbc:postgresql://host:port/database

有关 postgres jdbc URL 的更多详细信息,请参阅https://jdbc.postgresql.org/documentation/80/connect.html

于 2016-01-22T07:37:57.140 回答
0

您的某些凭据可能有误。我输入了错误的用户名并得到了类似的东西:

java.lang.NullPointerException at org.apache.zeppelin.postgresql.PostgreSqlInterpreter.executeSql(PostgreSqlInterpreter.java:202)

于 2017-07-04T10:54:45.790 回答