AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-133173

Matteo Tassinari's questions

Martin Hope
Matteo Tassinari
Asked: 2020-04-28 05:22:50 +0800 CST

Apache 身份验证失败,需要 ldap-group

  • 0

我一直在尝试将 Windows 服务器上的 apache 绑定到我们的活动目录服务器以进行身份​​验证和授权。

为了测试它,我一直在尝试使用以下参数的“ldap-status”处理程序

<Location "/ldap-status">
    SetHandler ldap-status

    AuthType Basic
    AuthBasicProvider ldap
    AuthName "LDAP Status"
    LDAPReferrals off
    AuthLDAPBindAuthoritative on
    AuthLDAPURL "ldap://1.2.3.4:389/cn=Users,dc=XXX,dc=example,dc=com?sAMAccountName?sub?(objectClass=person)" NONE
    AuthLDAPGroupAttribute member
    AuthLDAPGroupAttributeIsDN on
    AuthLDAPMaxSubGroupDepth 0
    AuthLDAPBindDN xxx
    AuthLDAPBindPassword xxx
    Require ldap-group "cn=TEST GROUP,cn=Users,dc=XXX,dc=example,dc=com"
</Location>

到目前为止,如果我将其删除Require ldap-group并替换为Require valid-user,它可以正常工作,但如果我恢复组要求则无法正常工作。

从我使用 powershell 从 AD 服务器中可以看到,该组存在并且它具有member列出所有成员的 DN 的属性;基于此,我设置AuthLDAPGroupAttribute为member和。AuthLDAPGroupAttributeIsDNon

我确定我的用户在我需要检查的组中,但是在 apache 错误日志中只有这条记录,这并不能真正帮助理解原因:

[Mon Apr 27 14:52:08.023952 2020] [authz_core:error] [pid 13168:tid 2072] [client 10.0.1.45:59690] AH01631: user mtassinari: authorization failure for "/ldap-status":

What can I do to correct the configuration in order to understand why "require ldap-group" fails?

active-directory authentication ldap apache-2.4 authorization
  • 2 个回答
  • 1338 Views
Martin Hope
Matteo Tassinari
Asked: 2017-01-11 00:10:44 +0800 CST

Yum-cron 无法向 root 发送电子邮件

  • 1

我正在尝试调查我们的一台 CentOS 7 服务器上的一个问题,该服务器yum-cron无法通过执行操作的结果向 root 发送电子邮件。

它总是给出这个错误:

无法向 localhost 发送电子邮件:[Errno 111] 连接被拒绝

但是,我们还有其他具有相同配置的服务器,这是唯一出现此类问题的服务器。

以下是yum-cron.conf内容:

[commands]
#  What kind of update to use:
# default                            = yum upgrade
# security                           = yum --security upgrade
# security-severity:Critical         = yum --sec-severity=Critical upgrade
# minimal                            = yum --bugfix update-minimal
# minimal-security                   = yum --security update-minimal
# minimal-security-severity:Critical =  --sec-severity=Critical update-minimal
update_cmd = default

# Whether a message should be emitted when updates are available,
# were downloaded, or applied.
update_messages = yes

# Whether updates should be downloaded when they are available.
download_updates = yes

# Whether updates should be applied when they are available.  Note
# that download_updates must also be yes for the update to be applied.
apply_updates = yes

# Maximum amout of time to randomly sleep, in minutes.  The program
# will sleep for a random amount of time between 0 and random_sleep
# minutes before running.  This is useful for e.g. staggering the
# times that multiple systems will access update servers.  If
# random_sleep is 0 or negative, the program will run immediately.
# 6*60 = 360
random_sleep = 360


[emitters]
# Name to use for this system in messages that are emitted.  If
# system_name is None, the hostname will be used.
system_name = None

# How to send messages.  Valid options are stdio and email.  If
# emit_via includes stdio, messages will be sent to stdout; this is useful
# to have cron send the messages.  If emit_via includes email, this
# program will send email itself according to the configured options.
# If emit_via is None or left blank, no messages will be sent.
emit_via = email

# The width, in characters, that messages that are emitted should be
# formatted to.
output_width = 80


[email]
# The address to send email messages from.
email_from = root

# List of addresses to send messages to.
email_to = root

# Name of the host to connect to to send email messages.
email_host = localhost


[groups]
# NOTE: This only works when group_command != objects, which is now the default
# List of groups to update
group_list = None

# The types of group packages to install
group_package_types = mandatory, default

[base]
# This section overrides yum.conf

# Use this to filter Yum core messages
# -4: critical
# -3: critical+errors
# -2: critical+errors+warnings (default)
debuglevel = -2

# skip_broken = True
mdpolicy = group:main

# Uncomment to auto-import new gpg keys (dangerous)
# assumeyes = True

我仔细检查过,它与其他服务器上的配置文件相同。

此外,所有服务器都postfix安装为邮件服务器,使用 sendgrid 作为 smtp 中继。

最后,在所有mail服务器上,通过命令手动向 root 发送电子邮件可以正常工作。

我应该检查什么才能使 cron 正确地向 root 发送电子邮件?

编辑:

经过一些测试,我注意到在有问题的服务器上,没有监听 TCP 端口 25:

[root@srv1 ~]# ss -tnlp | grep :25
[root@srv1 ~]#

在另一台服务器上,我得到:

[root@srv2 ~]# ss -tnlp | grep :25
LISTEN 0 100 127.0.0.1:25 *:* users:(("master",pid=768,fd=13))
[root@srv2 ~]#

PID 768 的进程在哪里/usr/libexec/postfix/master -w。

然后,我检查了哪些进程对postfix服务处于活动状态,并在我得到的第一台服务器上:

[root@srv1 ~]# service postfix status
Redirecting to /bin/systemctl status  postfix.service
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-01-10 09:18:55 CET; 5min ago
  Process: 17409 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
  Process: 17431 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
  Process: 17428 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 17421 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
 Main PID: 17503 (master)
   CGroup: /system.slice/postfix.service
           ├─17503 /usr/libexec/postfix/master -w
           ├─17504 pickup -l -t unix -u
           └─17505 qmgr -l -t unix -u

而在第二个输出是:

[root@srv2 ~]# service postfix status
Redirecting to /bin/systemctl status  postfix.service
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2016-12-28 16:34:19 CET; 1 weeks 5 days ago
 Main PID: 768 (master)
   CGroup: /system.slice/postfix.service
           ├─ 768 /usr/libexec/postfix/master -w
           ├─ 770 qmgr -l -t unix -u
           ├─8185 pickup -l -t unix -u
           └─9148 tlsmgr -l -t unix -u

所以看起来第一台服务器tlsmgr根本没有启动,但是我在日志中找不到任何错误。

email cron postfix centos7
  • 1 个回答
  • 1533 Views
Martin Hope
Matteo Tassinari
Asked: 2013-05-23 02:27:36 +0800 CST

无法配置 tomcat 7 使用自己的 JDK

  • 2

我在配置tomcat 7以在 Windows 上作为服务运行时遇到以下问题。

更具体地说,tomcat 是安装在我们客户服务器上的 Web 应用程序的一部分,它必须在其中包含所有依赖项。

在这种情况下,tomcat 依赖于 Java JDK/JRE,因此我下载了一个独立的 jdk(版本 1.7u21)及其 jre,并将其放在 tomcat 文件夹中。

所以现在我的目录树是这样的:

tomcat7
  - bin
  - conf
  - jdk
    - jre
  - logs
  - temp
  - webapps
  - work

然后我继续使用命令将其安装为服务

tomcat\bin\service.bat install

jvm它在模式下安装没有问题。

请注意,我修改了 service.bat 文件,以便正确设置所有需要的变量,即 CATALINA_HOME、CATALINA_BASE、JAVA_HOME 和 JRE_HOME,最后两个指向内部 jdk/jre。

但是,如果我尝试启动该服务,我会收到一条错误消息,指出它无法启动该服务并引用错误代码 1。

查看tomcat日志,它说:

[2013-05-22 12:22:09] [info]  [ 5392] Commons Daemon procrun (1.0.15.0 32-bit) started
[2013-05-22 12:22:10] [info]  [ 5392] Running 'AGEws2Tomcat7' Service...
[2013-05-22 12:22:10] [info]  [ 2764] Starting service...
[2013-05-22 12:22:10] [error] [ 2764] %1 is not a valid Win32 application.
[2013-05-22 12:22:10] [error] [ 2764] Failed creating java C:\AGEws\tomcat7\jdk\jre\bin\server\jvm.dll
[2013-05-22 12:22:10] [error] [ 2764] %1 is not a valid Win32 application.
[2013-05-22 12:22:10] [error] [ 2764] ServiceStart returned 1
[2013-05-22 12:22:11] [error] [ 2764] %1 is not a valid Win32 application.
[2013-05-22 12:22:11] [info]  [ 5392] Run service finished.
[2013-05-22 12:22:11] [info]  [ 5392] Commons Daemon procrun finished

我试着用谷歌搜索一下这个部分Failed creating java,我发现了一些关于.dll文件可能依赖的信息,我已经找到了,但我不知道我应该把它放在哪里,如果这确实是问题所在。

我还尝试在java模式下安装该服务,它可以工作,但使用我计算机自己的 JVM 而不是内部 JVM,而我需要它来使用内部 JVM。

为了让 tomcatjvm使用自己的 jdk/jre 在模式下作为服务正常工作,我可以/必须做什么?

请注意,我们的 Web 应用程序曾经随 tomcat 5 一起发布,它在jvm模式下运行良好。

windows-service
  • 2 个回答
  • 4644 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve