我正在尝试在我的机器上配置 NTP,但系统似乎没有读取我设置的参数。下面是我的/etc/ntp.conf
文件。(我应用了最基本的配置来排除其他问题)
server 10.45.68.47
server 127.0.0.1
Run Code Online (Sandbox Code Playgroud)
设置完上述配置后,我通过执行以下操作重新启动 ntpd 进程:
service ntpd restart
Run Code Online (Sandbox Code Playgroud)
然后我得到以下输出:
Shutting down ntpd: [ OK ]
ntpd: Synchronizing with time server: [FAILED]
Starting ntpd: [ OK ]
Run Code Online (Sandbox Code Playgroud)
此外,我可以在以下内容中看到/var/etc/messages
:
Apr 2 10:54:07 hsystem1a ntpd[21067]: ntpd exiting on signal 15
Apr 2 10:54:07 hsystem1a ntpdate[21537]: can't find host ntpServer1
Apr 2 10:54:07 hsystem1a ntpdate[21537]: can't find host ntpServer2
Apr 2 10:54:07 hsystem1a ntpdate[21537]: no servers can be used, exiting
Run Code Online (Sandbox Code Playgroud)
因此,它似乎ntpServer1
和ntpServer2
正在从某个地方,而不是我所配置的IP地址读取/etc/ntp.conf …
我的任务是使用 Java 从 imaps 电子邮件服务器检索电子邮件,因此作为客户端,我需要使用适当的证书对电子邮件服务器进行身份验证。但是,该电子邮件服务器似乎正在使用默认情况下不包含在信任库(?)中的自签名证书。从我在这里找到的,系统属性javax.net.ssl.trustStore
和javax.net.ssl.trustStorePassword
需要设置。给出的例子是:
System.setProperty("javax.net.ssl.trustStore","clientTrustStore.key");
System.setProperty("javax.net.ssl.trustStorePassword","qwerty");
Run Code Online (Sandbox Code Playgroud)
我的问题是如何获取此clientTrustStore.key
密码和相关密码?鉴于我知道电子邮件服务器的详细信息,这是我可以自己生成的东西,还是应该由维护该电子邮件服务器的 IT 部门提供的东西?