xshell远程连接另一台电脑的数据库,启动图形失败
1.用xshell远程连接数据库10.62.207.152,且用oracle用户直接登陆
2.执行:netca
报错:
Oracle Null Service Configuration:
Error:null
Check the trace file for details:/home/u01/cfgtoollogs/netca/trace_OraDb11g_home1-1801062PM1243.log
Oracle NetService configuration failed.The exit code is 1
3.查看日志下报错详细信息
cat /home/u01/cfgtoollogs/netca/trace_OraDb11g_home1-1801062PM1243.log
java.lang.NullPointerException
at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
at oracle.net.ca.NetCA.<init>(NetCA.java:443)
at oracle.net.ca.NetCA.main(NetCA.java:429)
4解决办法:(两种办法)4.1百度NetCA.java:429搜索答案,如下
这个报错是由于本机无法通过xshell调出服务器的图形界面,执行下面三个命令即可:
[oracle@localhost] ~]$ export DISPLAY=10.150.159.58:0 //192.168.20.100 是Windows7的地址,不是服务器的IP地址,切记
[root@localhost~]# xhost + (用root用户执行,出现:access control disabled,clients can connect from any host就是执行成功了)
[oracle@localhost] ~]$ netca (成功启动图形)
4.2配置xshell
文件--->属性--->隧道(tunneling)--->勾选x11转移转发x11连接到: X DISPLAY ,如下图
![](https://images2017.cnblogs.com/blog/1156849/201801/1156849-20180106145432003-1285334424.png)