使用ANT生成证书的时候出错
我想使用Ant生成CA证书,在做好build.xml,写好./bin/cli.xml
执行脚本时出现
[java] Initializing CA
[java] Generating rootCA keystore:
[java] CA name: AdminRootCA
[java] SuperAdmin CN: SuperAdmin
[java] DN: CN=AdminRootCA,OU=SSLVPN CA Center,O=China Mobile Group Guangdong Co., Ltd,C=CN
[java] CA token type: soft
[java] CA token password: hidden
[java] Keytype: RSA
[java] Keyspec: 2048
[java] Validity (days): 3650
[java] Policy ID: null
[java] Signature alg: SHA1WithRSA
[java] Certificate profile: ROOTCA
[java] CA token properties: null
[java] Signed by: self signed
[java] Initalizing authorization module with caid=548590678 and superadmin CN 'SuperAdmin'.
[java] principal=sslvpnuser
[java] credentials=pwd
[java] security_enable=false
[java]
[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused]
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:839)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.cesecore.jndi.JndiHelper.getRemoteSession(JndiHelper.java:81)
[java] at org.ejbca.core.model.util.EjbRemoteHelper.getComplexAccessControlSession(EjbRemoteHelper.java:126)
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.initAuthorizationModule(BaseCaAdminCommand.java:167)
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:212)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
[java] ... 8 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:529)
[java] at java.net.Socket.connect(Socket.java:478)
[java] at java.net.Socket.<init>(Socket.java:375)
[java] at java.net.Socket.<init>(Socket.java:189)
[java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
[java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
[java] ... 13 more
[java] Could not run execute method for class class org.ejbca.ui.cli.ca.CaInitCommand
[java] org.ejbca.ui.cli.ErrorAdminCommandException: java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:324)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.initAuthorizationModule(BaseCaAdminCommand.java:167)
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:212)
[java] ... 2 more
ejbca:initVPNRootCA:
[echo] Initializing CA with 'VPNRootCA' 'CN=China Mobile Group Guangdong Co., Ltd. VPN Root CA,O=China Mobile Group Guangdong Co., Ltd,OU=SSLVPN CA Center,C=CN'' soft null 2048 RSA 3650 null SHA1WithRSA -superadmincn 'SuperVpnAdmin'...
[java] Initializing CA
[java] Generating rootCA keystore:
[java] CA name: VPNRootCA
[java] SuperAdmin CN: SuperVpnAdmin
[java] DN: CN=China Mobile Group Guangdong Co., Ltd. VPN Root CA,OU=SSLVPN CA Center,O=China Mobile Group Guangdong Co., Ltd,C=CN
[java] CA token type: soft
[java] CA token password: hidden
[java] Keytype: RSA
[java] Keyspec: 2048
[java] Validity (days): 3650
[java] Policy ID: null
[java] Signature alg: SHA1WithRSA
[java] Certificate profile: ROOTCA
[java] CA token properties: null
[java] Signed by: self signed
[java] Initalizing authorization module with caid=695496221 and superadmin CN 'SuperVpnAdmin'.
[java] principal=sslvpnuser
[java] credentials=pwd
[java] security_enable=false
[java]
[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused]
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:839)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.cesecore.jndi.JndiHelper.getRemoteSession(JndiHelper.java:81)
[java] at org.ejbca.core.model.util.EjbRemoteHelper.getComplexAccessControlSession(EjbRemoteHelper.java:126)
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.initAuthorizationModule(BaseCaAdminCommand.java:167)
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:212)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
[java] ... 8 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:529)
[java] at java.net.Socket.connect(Socket.java:478)
[java] at java.net.Socket.<init>(Socket.java:375)
[java] at java.net.Socket.<init>(Socket.java:189)
[java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
[java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
[java] ... 13 more
[java] Could not run execute method for class class org.ejbca.ui.cli.ca.CaInitCommand
[java] org.ejbca.ui.cli.ErrorAdminCommandException: java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:324)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.initAuthorizationModule(BaseCaAdminCommand.java:167)
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:212)
[java] ... 2 more
[echo] ca getrootcert 'VPNRootCA' /opt/ejbca/p12/VPNRootCA.pem
[java] principal=sslvpnuser
[java] credentials=pwd
[java] security_enable=false
[java]
[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused]
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:839)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.cesecore.jndi.JndiHelper.getRemoteSession(JndiHelper.java:81)
[java] at org.ejbca.core.model.util.EjbRemoteHelper.getCaSession(EjbRemoteHelper.java:98)
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.getCertChain(BaseCaAdminCommand.java:66)
[java] at org.ejbca.ui.cli.ca.CaGetRootCertCommand.execute(CaGetRootCertCommand.java:53)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
[java] ... 8 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:529)
[java] at java.net.Socket.connect(Socket.java:478)
[java] at java.net.Socket.<init>(Socket.java:375)
[java] at java.net.Socket.<init>(Socket.java:189)
[java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
[java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
[java] ... 13 more
[java] Error while getting certfificate chain from CA.
[java] java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.getCertChain(BaseCaAdminCommand.java:66)
[java] at org.ejbca.ui.cli.ca.CaGetRootCertCommand.execute(CaGetRootCertCommand.java:53)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] No CA certificate found.
ejbca:initVPNClientRootCA:
[echo] Initializing CA with 'VPNClientRootCA' 'CN=China Mobile Group Guangdong Co., Ltd. VPNClient Root CA,O=China Mobile Group Guangdong Co., Ltd,OU=SSLVPN CA Center,C=CN' soft null 2048 RSA 3650 null SHA1WithRSA -superadmincn 'SuperVpnClientAdmin'...
[java] Initializing CA
[java] Generating rootCA keystore:
[java] CA name: VPNClientRootCA
[java] SuperAdmin CN: SuperVpnClientAdmin
[java] DN: CN=China Mobile Group Guangdong Co., Ltd. VPNClient Root CA,OU=SSLVPN CA Center,O=China Mobile Group Guangdong Co., Ltd,C=CN
[java] CA token type: soft
[java] CA token password: hidden
[java] Keytype: RSA
[java] Keyspec: 2048
[java] Validity (days): 3650
[java] Policy ID: null
[java] Signature alg: SHA1WithRSA
[java] Certificate profile: ROOTCA
[java] CA token properties: null
[java] Signed by: self signed
[java] Initalizing authorization module with caid=-682797496 and superadmin CN 'SuperVpnClientAdmin'.
[java] principal=sslvpnuser
[java] credentials=pwd
[java] security_enable=false
[java]
[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused]
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:839)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.cesecore.jndi.JndiHelper.getRemoteSession(JndiHelper.java:81)
[java] at org.ejbca.core.model.util.EjbRemoteHelper.getComplexAccessControlSession(EjbRemoteHelper.java:126)
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.initAuthorizationModule(BaseCaAdminCommand.java:167)
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:212)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
[java] ... 8 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:529)
[java] at java.net.Socket.connect(Socket.java:478)
[java] at java.net.Socket.<init>(Socket.java:375)
[java] at java.net.Socket.<init>(Socket.java:189)
[java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
[java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
[java] ... 13 more
[java] Could not run execute method for class class org.ejbca.ui.cli.ca.CaInitCommand
[java] org.ejbca.ui.cli.ErrorAdminCommandException: java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:324)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.initAuthorizationModule(BaseCaAdminCommand.java:167)
[java] at org.ejbca.ui.cli.ca.CaInitCommand.execute(CaInitCommand.java:212)
[java] ... 2 more
[echo] ca getrootcert 'VPNClientRootCA' /opt/ejbca/p12/VPNClientRootCA.pem
[java] principal=sslvpnuser
[java] credentials=pwd
[java] security_enable=false
[java]
[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused]
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:839)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.cesecore.jndi.JndiHelper.getRemoteSession(JndiHelper.java:81)
[java] at org.ejbca.core.model.util.EjbRemoteHelper.getCaSession(EjbRemoteHelper.java:98)
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.getCertChain(BaseCaAdminCommand.java:66)
[java] at org.ejbca.ui.cli.ca.CaGetRootCertCommand.execute(CaGetRootCertCommand.java:53)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] Caused by: java.rmi.ConnectException: Connection refused to host: linux-fud5; nested exception is:
[java] java.net.ConnectException: Connection refused
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
[java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
[java] ... 8 more
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
[java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
[java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:529)
[java] at java.net.Socket.connect(Socket.java:478)
[java] at java.net.Socket.<init>(Socket.java:375)
[java] at java.net.Socket.<init>(Socket.java:189)
[java] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
[java] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
[java] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
[java] ... 13 more
[java] Error while getting certfificate chain from CA.
[java] java.lang.NullPointerException
[java] at org.ejbca.ui.cli.ca.BaseCaAdminCommand.getCertChain(BaseCaAdminCommand.java:66)
[java] at org.ejbca.ui.cli.ca.CaGetRootCertCommand.execute(CaGetRootCertCommand.java:53)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.executeCommand(EjbcaEjbCli.java:118)
[java] at org.ejbca.ui.cli.EjbcaEjbCli.main(EjbcaEjbCli.java:80)
[java] No CA certificate found.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Connection refused to host: linux-fud5