在NTP配置中,为本地时钟指定高层值的目的是什么?
fudge 127.127.1.0 stratum 10
如果我错了,请纠正我:如果远程 NTP 服务器(层数较低,例如 2 或 3)无法访问,服务器无论如何都会依赖内部时钟。否则,它将与这些 NTP 服务器同步时间。
因此,上述配置行是否不必要,并且仅当该层值低于某些远程 NTP 服务器层时设置本地时钟层才有意义?
在NTP配置中,为本地时钟指定高层值的目的是什么?
fudge 127.127.1.0 stratum 10
如果我错了,请纠正我:如果远程 NTP 服务器(层数较低,例如 2 或 3)无法访问,服务器无论如何都会依赖内部时钟。否则,它将与这些 NTP 服务器同步时间。
因此,上述配置行是否不必要,并且仅当该层值低于某些远程 NTP 服务器层时设置本地时钟层才有意义?
我们已sendmail
在 RHEL 6 计算机上设置为 SMTP 中继。
我们如何找到使用此中继发送邮件的远程客户端的主机名或 IP 地址?此信息是否记录在某处?
relay=
中的字段指定/var/log/maillog
接受或拒绝邮件收件人的主机名,这不是我们需要的。
我们有一个 OwnCloud 服务器。通过HTTPS接口上传的文件可以在路径中的文件系统上检索
/var/www/html/owncloud_content/our_username/path/to/files
但是,这些文件是加密的。我们怎样才能找回原始文件呢?
我们拥有 OwnCloud 应用程序的完全管理访问权限和 Linux 服务器 (CentOS 6) 的 root 访问权限。
我有一台旧服务器,它在端口 8080 上运行 Tomcat 服务。出于各种原因(包括保护来自客户端的访问),我不得不在它前面设置一个 HAProxy 服务器,并使用 SSL 证书进行保护。
这是 HAProxy 相关配置:
frontend myservice
mode tcp
option tcplog
option logasap
log global
option tcpka
bind 10.10.10.10:80
bind 10.10.10.10:443 ssl crt /etc/ssl/haproxy/myservice.example.org.pem
acl secure dst_port eq 443
http-response add-header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;"
http-response replace-header Set-Cookie (.*) \1;\ Secure if secure
use_backend bck_myservice if { hdr(Host) -i myservice.example.org myservice }
default_backend bck_deny
backend bck_myservice
mode tcp
balance leastconn
option prefer-last-server
server oldserver.example.org oldserver.example.org:8080 weight 1 check port 8080 inter 2000 rise 2 fall 5 ssl verify none
backend bck_deny
mode http
http-request deny
10.10.10.10 是新服务的 VIP,映射到 myservice.example.org。
访问http://oldserver.example.org:8080正常工作。
问题: https: //myservice.example.org导致错误“403 Forbidden”。访问该 URL 似乎不会访问 Tomcat 后端,因为在 Tomcat 日志中没有它的踪迹。(注意:HAProxy 配置曾经有mode http
,但它导致错误“503 服务不可用”。)
Ansible CLI 允许运行自定义 shell 命令(使用默认模块“ansible.builtin.command”隐式完成):
ansible myhost -a "/bin/mycommand"
是否可以通过tower-cli
aka做同样的事情awx-cli
?
编辑:使用awx
CLI 工具的答案是可以接受的;但是,我更喜欢使用tower-cli
/的解决方案awx-cli
。
我正在尝试让 CentOS 7 服务器加入 AD,但会导致错误:
AD LDAP ERROR:53(服务器不愿意执行):0000216D:SvcErr:DSID-031A1241,问题5003(WILL_NOT_PERFORM),数据0
命令运行:
[root@myserver ~]# realm join --user='[email protected]' --computer-ou=OU=ABC,OU=Servers,OU=ACME,OU=Units,DC=example,DC=org example.org
Password for [email protected]:
See: journalctl REALMD_OPERATION=r12682208.2790
realm: Couldn't join realm: Joining the domain example.org failed
[root@myserver ~]# journalctl REALMD_OPERATION=r12682208.2790 --no-pager
-- Logs begin at Mon 2022-04-25 14:28:51 CEST, end at Tue 2022-04-26 13:51:12 CEST. --
Apr 26 13:49:01 myserver.example.org realmd[2794]: * Resolving: _ldap._tcp.example.org
Apr 26 13:49:01 myserver.example.org realmd[2794]: * Performing LDAP DSE lookup on: 10.1.1.1
Apr 26 13:49:01 myserver.example.org realmd[2794]: * Performing LDAP DSE lookup on: 10.2.2.2
Apr 26 13:49:01 myserver.example.org realmd[2794]: * Successfully discovered: example.org
Apr 26 13:49:08 myserver.example.org realmd[2794]: * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/bin/net
Apr 26 13:49:08 myserver.example.org realmd[2794]: * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.HGKCL1 -U [email protected] ads join example.org createcomputer=Units/ACME/Servers/ABC
Apr 26 13:49:09 myserver.example.org realmd[2794]: Enter [email protected]'s password:ads_print_error: AD LDAP ERROR: 53 (Server is unwilling to perform): 0000216D: SvcErr: DSID-031A1241, problem 5003 (WILL_NOT_PERFORM), data 0
Apr 26 13:49:09 myserver.example.org realmd[2794]:
Apr 26 13:49:09 myserver.example.org realmd[2794]:
Apr 26 13:49:09 myserver.example.org realmd[2794]: Failed to join domain: failed to precreate account in ou ou=ABC,ou=Servers,ou=ACME,ou=Units,dc=example,dc=org: Server is unwilling to perform
Apr 26 13:49:09 myserver.example.org realmd[2794]: ! Joining the domain example.org failed
使用的帐户有权将服务器添加到域。(在 MS Windows AD 上测试。)
--verbose
选项realm
不显示任何额外的有用信息。
我怎样才能找到问题的根源?
我在一台机器上重新安装了 CentOS Stream 8。这台机器需要在端口 443 上连接到 Foreman 智能代理。
如果我nmap
在机器启动后立即运行,它会看到端口打开:
[root@centos8stream ~]# nmap mysmartproxy -p443
Starting Nmap 7.70 ( https://nmap.org ) at 2022-04-06 15:52 CEST
Nmap scan report for mysmartproxy (10.11.12.13)
Host is up (-0.18s latency).
rDNS record for 10.11.12.13: mysmartproxy.myorg.org
PORT STATE SERVICE
443/tcp open https
MAC Address: 00:11:22:33:AA:BB (VMware)
Nmap done: 1 IP address (1 host up) scanned in 0.51 seconds
但是,如果nmap
在几秒钟后运行,它会将端口视为已过滤:
PORT STATE SERVICE
443/tcp filtered https
机器设法在端口 443 上毫无问题地连接到智能代理。但是,我需要nmap
将端口视为打开的,因为有依赖于它的运行状况检查。
nmap
在同一网络中从具有不同于 CentOS Stream 8 的操作系统的其他机器上运行时,它总是将端口视为打开的。firewalld
没有效果。nftables
并且任何其他防火墙都被禁用。这种奇怪行为的原因是什么?我认为它一定是启动后加载的服务,但到目前为止我无法查明问题所在。
我找不到katello-agent
新的 CentOS Stream 9 的软件包。(我什至尝试为 CentOS Stream 8 安装 repo,但正如预期的那样,它会导致依赖关系损坏。)是否有安装它的解决方法?
(我知道Katello 已被弃用以支持远程执行,但现在我将不得不这样做。)
我有一台装有 Windows 7 的旧笔记本电脑,我在其上安装了 CentOS 8 双启动。
首次重新启动时,GRUB 仅显示 Linux 条目。因此我使用了 Boot-Repair-Disk,但不知何故无法安装 GRUB,因为现在笔记本电脑直接启动到 Windows。
磁盘分区如下(如Boot-Repair-Disk所见):
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 2,048 3,074,047 3,072,000 27 Hidden NTFS (Recovery Environment)
/dev/sda2 * 3,074,048 629,905,407 626,831,360 7 NTFS / exFAT / HPFS
/dev/sda3 629,905,408 632,002,559 2,097,152 83 Linux
/dev/sda4 632,002,560 976,773,119 344,770,560 5 Extended
/dev/sda5 632,004,608 975,978,495 343,973,888 8e Linux LVM
这是它们的粗略尺寸以及它们的用途:
/dev/sda1 1.5 Gb Windows recovery partition
/dev/sda2 300 Gb Windows 7 partition
/dev/sda3 1 Gb Linux /boot partition
/dev/sda4 164 Gb Extended partition containing /dev/sda5
/dev/sda5 4 Gb /swap, 130 Gb /, 30 Gb /home, all LVM and LUKS-encrypted
值得注意的是,Windows 将/dev/sda4
其视为主(非扩展)分区。
这是 Boot-Repair-Disk 输出的一部分:
Is there RAID on this computer? no
File descriptor 8 (/proc/17432/mountinfo) leaked on lvs invocation. Parent PID 19248: /bin/sh
Error: /dev/mapper/cl-00: unrecognised disk label
Error: /dev/mapper/cl-01: unrecognised disk label
Error: /dev/mapper/cl-02: unrecognised disk label
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.
boot-repair is executed in live-session (Boot-Repair-Disk 64bit 1oct2017, zesty, Ubuntu, x86_64)
CPU op-mode(s): 32-bit, 64-bit
file=/cdrom/preseed/lubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
ls: cannot access '/home/usr/.config': No such file or directory
Set sda as corresponding disk of mapper/cl-00
Set sda as corresponding disk of mapper/cl-01
Set sda as corresponding disk of mapper/cl-02
mount: /mnt/boot-sav/mapper/cl-00: unknown filesystem type 'crypto_LUKS'.
mount /dev/mapper/cl-00 : Error code 32
mount -r /dev/mapper/cl-00 /mnt/boot-sav/mapper/cl-00
mount: /mnt/boot-sav/mapper/cl-00: unknown filesystem type 'crypto_LUKS'.
mount -r /dev/mapper/cl-00 : Error code 32
mount: /mnt/boot-sav/mapper/cl-01: unknown filesystem type 'crypto_LUKS'.
mount /dev/mapper/cl-01 : Error code 32
mount -r /dev/mapper/cl-01 /mnt/boot-sav/mapper/cl-01
mount: /mnt/boot-sav/mapper/cl-01: unknown filesystem type 'crypto_LUKS'.
mount -r /dev/mapper/cl-01 : Error code 32
mount: /mnt/boot-sav/mapper/cl-02: unknown filesystem type 'crypto_LUKS'.
mount /dev/mapper/cl-02 : Error code 32
mount -r /dev/mapper/cl-02 /mnt/boot-sav/mapper/cl-02
mount: /mnt/boot-sav/mapper/cl-02: unknown filesystem type 'crypto_LUKS'.
mount -r /dev/mapper/cl-02 : Error code 32
=================== os-prober:
/dev/sda1:Windows 7:Windows:chain
/dev/sda2:Windows 7:Windows1:chain
=================== blkid:
/dev/sda1: LABEL="System" UUID="FC30DADA30DA9B4A" TYPE="ntfs" PARTUUID="e7d2fa64-01"
/dev/sda2: LABEL="Main disk" UUID="E6C200E1C200B837" TYPE="ntfs" PARTUUID="e7d2fa64-02"
/dev/sda3: UUID="b43f57d3-c143-47b0-ad99-a5b12a0416be" TYPE="ext4" PARTUUID="e7d2fa64-03"
/dev/sr0: UUID="2017-10-29-00-56-18-00" LABEL="Boot-Repair-Disk 64bit" TYPE="iso9660" PTUUID="6b8b4567" PTTYPE="dos"
/dev/loop0: TYPE="squashfs"
/dev/sda5: UUID="sWZAY3-8hDE-wcdv-rEsu-pTcr-9lPV-QEfxlo" TYPE="LVM2_member" PARTUUID="e7d2fa64-05"
/dev/zram0: UUID="462ef96d-8ed3-405e-92c4-043654187abd" TYPE="swap"
/dev/zram1: UUID="df6b8b51-4029-4d37-86ec-d70532265f9b" TYPE="swap"
/dev/zram2: UUID="9d842b41-46c1-4ed3-aefb-447d99a6321f" TYPE="swap"
/dev/zram3: UUID="65d9a196-c801-4e87-9283-314b665108d6" TYPE="swap"
/dev/zram4: UUID="b2cb39b0-9fe1-4485-b044-7d408527117f" TYPE="swap"
/dev/zram5: UUID="f6b1cecd-603e-40a3-8eb3-2bc1ddaca8c1" TYPE="swap"
/dev/zram6: UUID="2fc865d0-0b3b-4d11-bb8d-c272a21e5c39" TYPE="swap"
/dev/zram7: UUID="5be79bcf-4b46-4d62-81b2-952b79e0ecda" TYPE="swap"
/dev/mapper/cl-00: UUID="6eac3a8f-7854-40c7-ae94-c1d288a60698" TYPE="crypto_LUKS"
/dev/mapper/cl-01: UUID="d0e378ae-9140-4335-94e6-2d73a3cb7bd1" TYPE="crypto_LUKS"
/dev/mapper/cl-02: UUID="00e698ad-ac0b-4e27-9bc7-bdcb524ce4ba" TYPE="crypto_LUKS"
1 disks with OS, 2 OS : 0 Linux, 0 MacOS, 2 Windows, 0 unknown type OS.
在尝试重新安装 GRUB 之前真的有必要解密 LUKS LVM 分区吗?
编辑:回答评论中的问题:
输出fdisk -l /dev/sda
:
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Seagate ST950056
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe7d2fa64
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 3074047 3072000 1.5G 27 Hidden NTFS WinRE
/dev/sda2 * 3074048 629905407 626831360 298.9G 7 HPFS/NTFS/exFAT
/dev/sda3 629905408 632002559 2097152 1G 83 Linux
/dev/sda4 632002560 976773119 344770560 164.4G 5 Extended
/dev/sda5 632004608 975978495 343973888 164G 8e Linux LVM
它使用来自 CentOS 8 的默认 GRUB,即 GRUB2
LVM 分区是直接从 CentOS 安装程序创建的
笔记本电脑(将近 10 年的历史)使用 BIOS,而不是 UEFI
安装程序从不询问将 GRUB 放在哪里,它是自动完成的
在我的 CentOS 7.7.1908 上,boot
没有安装(描述系统启动过程)的手册页。如何找到哪个包提供它?
yum whatprovides /usr/share/man/man7/boot.7.gz
不返回任何结果。
bootup
手册页是从基本 repo 安装的,并引用了boot(7)
SEE ALSO 部分中的手册页。
根据(和我们的记录) ,我曾经lvresize
将 15 Gb 添加到大小为 10 Gb 的逻辑卷中。df
但是,lvresize
发现 LV 的大小为 20 Gb,因此调整大小的 LV 为 35 Gb。
这是为什么?
[root@host]# df -h /mydir
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/myvg-mylv 10G 7.0G 3.1G 70% /mydir
[root@host]# lvresize -r -L+15G /dev/mapper/myvg-mylv
Size of logical volume myvg/mylv changed from 20.00 GiB (5120 extents)
to 35.00 GiB (8960 extents).
Logical volume myvg/mylv successfully resized.
meta-data=/dev/mapper/myvg-mylv isize=256 agcount=20, agsize=131072 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=2621440, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 2621440 to 9175040
[root@host]# df -h /mydir
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/myvg-mylv 35G 7.0G 29G 20% /mydir
有两台 RHEL 8 服务器是从同一个模板配置的,仅在第一台服务器上手动完成了一些手动修复和调整。它们允许通过远程 LDAP 服务器进行 SSH 用户身份验证,并且已使用 authselect 进行配置:
authselect select sssd --force
第一台服务器运行良好,而第二台服务器的 SSH 身份验证失败。我正在寻找它们之间的区别,因为它们的 LDAP、PAM、sssd
和nscd
配置看起来相同。
编辑 11/6:nslcd
守护进程处于非活动状态;它具有默认配置,在两台服务器上都相同。
还值得注意的是,getent passwd
正确返回了所有 LDAP 用户,但这些用户无法通过 SSH 登录。sshd
配置也是一样的。
通过阅读sssd
日志,我发现第一台服务器调用(正确ldap_search_ext
)
[(&(uid=dr01)(objectclass=posixAccount)(&(uidNumber=*)(!(uidNumber=0))))][dc=mydomain,dc=org]
而第二个使用(失败)搜索
[(&(uid=dr01)(objectclass=posixAccount)(uid=*)(&(uidNumber=*)(!(uidNumber=0))))][dc=mydomain,dc=org]
因此,在第二台服务器上,查询包括一个额外的(uid=*)
. 它还在第一次搜索中引用了 BE_REQ_USER 与 BE_REQ_INITGROUPS(请参阅下面的日志)。这将返回零结果。
所以,我想知道调用ldap_search_ext
的定义在哪里。
以下是第一台服务器的日志摘录:
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [dp_get_account_info_send] (0x0200): Got request for [0x3][BE_REQ_INITGROUPS][[email protected]]
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sss_domain_get_state] (0x1000): Domain mydomain.org is Active
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [dp_attach_req] (0x0400): DP Request [Initgroups #13]: New request. Flags [0x0001].
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [dp_attach_req] (0x0400): Number of active DP request: 1
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sss_domain_get_state] (0x1000): Domain mydomain.org is Active
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_initgr_next_base] (0x0400): Searching for users with base [dc=mydomain,dc=org]
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&(uid=dr01)(objectclass=posixAccount)(&(uidNumber=*)(!(uidNumber=0))))][dc=mydomain,dc=org].
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [objectClass]
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [uid]
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [userPassword]
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [uidNumber]
(Fri Jun 7 15:15:46 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [gidNumber]
(...)
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_search_user_process] (0x0400): Search for users, returned 1 results.
第二个:
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [dp_get_account_info_send] (0x0200): Got request for [0x1][BE_REQ_USER][[email protected]]
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [dp_attach_req] (0x0400): DP Request [Account #8]: New request. Flags [0x0001].
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [dp_attach_req] (0x0400): Number of active DP request: 1
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sss_domain_get_state] (0x1000): Domain mydomain.org is Active
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_search_user_next_base] (0x0400): Searching for users with base [dc=mydomain,dc=org]
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&(uid=dr01)(objectclass=posixAccount)(uid=*)(&(uidNumber=*)(!(uidNumber=0))))][dc=mydomain,dc=org].
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [objectClass]
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [uid]
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [userPassword]
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [uidNumber]
(Fri Jun 7 15:20:50 2019) [sssd[be[mydomain.org]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [gidNumber]
我们知道反引号字符用于命令替换:
chown `id -u` /mydir
这让我想知道:打勾字符´
是否用于 Linux shell 中的任何内容?
注意:顺便说一下,命令替换也可以写成更具可读性
chown $(id -u) /mydir
我在 CentOS 7 机器上设置了一个 Apache v2.4 反向代理,为多个虚拟主机提供请求;其中有 Atlassian 应用服务器。
proxy的私网IP地址为10.0.0.77,公网IP地址为77.77.77.77,若干个DNS A记录将公网IP映射到各种FQDN:foo.example.com
、、bar.example.com
等。
有一个 NAT:
77.77.77.77:10080 -> 10.0.0.77:80
77.77.77.77:10443 -> 10.0.0.77:443
这是必要的,因为代理的公共 IP 地址也用于其他服务。设置与其他问题相同。
下面是虚拟主机配置的示例(简化)/etc/httpd/conf.d/foo.conf
,:
<VirtualHost *:80>
ServerName foo.example.com
ProxyRequests Off
ProxyPreserveHost Off
SetEnv proxy-nokeepalive 1
Redirect "/" "https://foo.example.com:10443/"
</VirtualHost>
<VirtualHost *:443>
ServerName foo.example.com
ServerSignature On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLEngine On
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder on
# SSLCipherSuite shortened here for simplicity
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384"
SSLCertificateFile /etc/httpd/ssl/proxy.crt
SSLCertificateKeyFile /etc/httpd/ssl/proxy.key
SSLCACertificateFile /etc/httpd/ssl/proxy.ca.crt
ProxyRequests Off
ProxyPreserveHost On
ProxyPass "/" "http://foo.example.com:8080/"
ProxyPassReverse "/" "http://foo.example.com:8080/"
</VirtualHost>
此配置适用于两台 Jira 服务器、一台 Stash 服务器、一台 Confluence v6.10 服务器和其他几台服务器。但是,Web 浏览器无法加载代理的 Bamboo v6.4 服务器虚拟主机和 Question2Answer 平台。
在 Firefox 上,报告的错误是NS_ERROR_NET_TIMEOUT
. 在 IE 上,错误是:
出现临时 DNS 错误。尝试刷新页面。
错误代码:INET_E_RESOURCE_NOT_FOUND
在每个失败的虚拟主机的 httpd 访问日志中,没有任何内容,甚至没有LogLevel trace8
,因此显然该请求甚至没有命中代理。
我可以从代理通过 curl 访问 Bamboo(-L
需要一个标志,因为 Bamboo 服务于 302):
[root@proxy]# curl -XGET http://bamboo.example.com:8085/
[root@proxy]# curl -v -XGET http://bamboo.example.com:8085/
* About to connect() to bamboo.example.com port 8085 (#0)
* Trying 10.0.0.11...
* Connected to bamboo.example.com (10.0.0.11) port 8085 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: bamboo.example.com:8085
> Accept: */*
>
< HTTP/1.1 302 Found
< Server: Apache-Coyote/1.1
< X-ASEN: SEN-4619603
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Vary: Accept-Encoding
< Set-Cookie: JSESSIONID=E4D13B8AD7D4D172F4E5F834D1E89710; Path=/; Secure; HttpOnly
< Cache-Control: no-store
< Location: /userlogin!doDefault.action?os_destination=%2Fstart.action
< Content-Language: en-US
< Content-Length: 0
< Date: Mon, 01 Oct 2018 15:06:19 GMT
<
* Connection #0 to host bamboo.example.com left intact
[root@proxy]# curl -L -XGET http://bamboo.example.com:8085/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Log in as a Bamboo user</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta name="application-name" content="Bamboo" />
(...)
目标服务器上的防火墙从服务器到代理是开放的(请注意,Atlassian 应用程序在非标准端口上运行,例如 Jira 在 TCP/8080 上提供内容)。
我很困惑,因为几乎所有其他虚拟主机都可以完美运行。我还仔细检查了 URL 路径,它是正确的。
这个问题的原因可能是什么?
有没有办法以更好的方式跟踪 HTTP 请求?我现在使用 Firefox 的附加 HTTP Header Live,我想找到一些更复杂的工具。
联机帮助页find
说:
-prune True; if the file is a directory, do not descend into it. If -depth is
given, false; no effect. Because -delete implies -depth, you cannot
usefully use -prune and -delete together.
最后一句话是什么意思?不能有用地运行以下命令......
find /path/ -prune -type f -ctime +15 -delete
... 查找并删除 15 天前最后一次更改的所有文件,/path/
但不在子目录中 /path/
?我认为这是一个完全有效的用例。