【问题标题】:IBM DB2 Warehouse Developer Edition web console error when connecting to LDAP server连接到 LDAP 服务器时出现 IBM DB2 Warehouse Developer Edition Web 控制台错误
【发布时间】:2019-05-09 20:52:48
【问题描述】:

当前 DB2 Warehouse Dev Ed Docker 映像,Windows 10 Docker Desktop 10.09.2,Docker 运行命令出现成功,尝试连接到 localhost:8443 的 webconsole。浏览器坐在那里“等待本地主机”在几分钟后收到一条错误消息:“连接到 LDAP 服务器时出错。请确认服务器可用并且该控制台已配置为使用 LDAP。”我在 Mac 上使用 Docker 桌面时也遇到了同样的错误。

今天早上使用 v3.6.0-db2wh_devc-linux Docker 镜像拉取。

在 Windows 10 笔记本电脑上,Docker 配置了 24gb、6cpus 和 4gb 交换 在 Mac 上,Docker 配置为 12gb、6cpus、4gb 交换。

这是我用于 Windows 和 Mac 的 Docker 运行命令

    docker run -itd -p 8443:8443 -p 50000-50001:50000-50001 --net=db2wh_net   --privileged=true --name=Db2wh -v db2wh_vol:/mnt/bludata0 -v db2wh_vol:/mnt  /blumeta0 store/ibmcorp/db2wh_ce:v3.6.0-db2wh_devc-linux
    PS C:\Users\StephenKimmel\IBMCloud> docker start Db2wh
    Db2wh
    PS C:\Users\StephenKimmel\IBMCloud> docker logs --follow Db2wh
    Failed to insert module 'autofs4'
    systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR         +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
    Detected virtualization docker.
    Detected architecture x86-64.

    Welcome to Db2 Warehouse!

    Set hostname to <cb20b07a55ce>.
    Cannot add dependency job for unit systemd-tmpfiles-clean.timer, ignoring:   Unit is masked.
    [  OK  ] Reached target Timers.
    [  OK  ] Reached target Paths.
    [  OK  ] Reached target Swap.
    [  OK  ] Reached target Local File Systems.
    [  OK  ] Created slice Root Slice.
    [  OK  ] Created slice System Slice.
    [  OK  ] Listening on Delayed Shutdown Socket.
    [  OK  ] Reached target Slices.
    [  OK  ] Listening on Journal Socket.
           Starting Create Volatile Files and Directories...
           Starting Create Static Device Nodes in /dev...
           Starting Journal Service...
    [  OK  ] Started Create Volatile Files and Directories.
    [ INFO ] Update UTMP about System Boot/Shutdown is not active.
    [DEPEND] Dependency failed for Update UTMP about System Runlevel Changes.
    Job systemd-update-utmp-runlevel.service/start failed with result    'dependency'.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Started Journal Service.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
         Starting System Security Services Daemon...
         Starting SASL authentication daemon....
         Starting LSB: Bring up/down networking...
   [  OK  ] Started SASL authentication daemon..
   [FAILED] Failed to start LSB: Bring up/down networking.
   See 'systemctl status network.service' for details.
   [  OK  ] Reached target Network.
   [  OK  ] Reached target Network is Online.
         Starting System Logging Service...
         Starting LSB: Supports the direct execution of binary formats....
   [  OK  ] Started System Logging Service.
   [  OK  ] Started LSB: Supports the direct execution of binary formats..
   [  OK  ] Started System Security Services Daemon.
   [  OK  ] Reached target Multi-User System.
          Starting SystemD Unit file to manage nping echo-server as a  service...
   [  OK  ] Reached target User and Group Name Lookups.
   [  OK  ] Started SystemD Unit file to manage nping echo-server as a service.
    [  OK  ] Started The entrypoint script for initializing the service.
    [ 5863.056359] start_dashDB_local.sh[69]: Running 'Cgroup filesystem mount existence' test...
    [ 5867.627520] start_dashDB_local.sh[69]: Running 'Platform sanity' test...
    [ 5867.728488] start_dashDB_local.sh[69]: Running 'Docker storage driver'   test...
   [ 5867.736446] start_dashDB_local.sh[69]: Running 'SELinux status' test...
   [ 5867.826912] start_dashDB_local.sh[69]: Running 'Root volume total-space' test...
   [ 5868.231104] start_dashDB_local.sh[69]: IBM Db2 Warehouse configuration: SMP
   [ 5868.313257] start_dashDB_local.sh[69]: Successfully set timezone to UTC
   [ 5868.554978] start_dashDB_local.sh[69]: Unable to discover the domain from static hostname.
   [ 5887.715775] start_dashDB_local.sh[69]: Checking if the initialization has been done previously ...
   [ 5887.728377] start_dashDB_local.sh[69]: #################################################
   [ 5887.731566] start_dashDB_local.sh[69]: The IBM Db2 Warehouse stack is already initialized.
   [ 5887.734585] start_dashDB_local.sh[69]: Checking if the container needs to be upgraded to a new version ...
   [ 5887.737636] start_dashDB_local.sh[69]: #################################################
   [ 5889.286614] start_dashDB_local.sh[69]: The container needs to be re-linked to v3.6.0.
   [ 5892.845232] start_dashDB_local.sh[69]: configure_user_management completed successfully.
   [ 5898.845279] start_dashDB_local.sh[69]: Updating the IBM Db2 Warehouse container on node dockervmguest ...
   [ 5900.790669] start_dashDB_local.sh[69]: Recovering license key ...
   [ 5901.994449] start_dashDB_local.sh[69]: #################################################
   [ 5901.994812] start_dashDB_local.sh[69]: Starting the services in the container
   [ 5901.994961] start_dashDB_local.sh[69]: #################################################
   [ 5903.976602] start_dashDB_local.sh[69]: #######################################################################
   [ 5903.976888] start_dashDB_local.sh[69]: ###   Starting all the services in the IBM Db2 Warehouse stack      ###
    [ 5903.977209] start_dashDB_local.sh[69]: #######################################################################
   [ 5903.977518] start_dashDB_local.sh[69]: * If this is a new deployment, the stack is initialized, which might
   [ 5903.977776] start_dashDB_local.sh[69]: take a while.
   [ 5903.978037] start_dashDB_local.sh[69]: * If this is a container update, it might take a while to start the services,
   [ 5903.978312] start_dashDB_local.sh[69]: depending on whether an engine or database update is required.
   [ 5904.193634] start_dashDB_local.sh[69]: Checking if database server engine needs to be upgraded/migrated ...
    [ 5904.505763] start_dashDB_local.sh[69]: **************** IBM Db2 Warehouse license information ****************
    [ 5904.508864] start_dashDB_local.sh[69]: * License type             : Unwarranted
    [ 5904.512067] start_dashDB_local.sh[69]: * License expiry date      : Permanent
    [ 5904.514919] start_dashDB_local.sh[69]: * License status           : Active
    [ 5904.517783] start_dashDB_local.sh[69]: ***********************************************************************
    [ 5907.660932] start_dashDB_local.sh[69]: configure_user_management completed successfully.
    [ 5913.449297] start_dashDB_local.sh[69]: Restart LDAP/LDAP-depended network services AND set OS to use LDAP Authentication ...
    [ 5920.823850] start_dashDB_local.sh[69]: database SSL configuration
    [ 5925.760682] start_dashDB_local.sh[69]: Updating spark properties file
    [ 5961.806118] start_dashDB_local.sh[69]: Current  total memory:  23542 MB
    [ 5961.809050] start_dashDB_local.sh[69]: Previous total memory:  3928 MB
    [ 5961.815300] start_dashDB_local.sh[69]: Current number of maximum database partitions per node : 1
    [ 5961.818020] start_dashDB_local.sh[69]: Previous number of maximum database partitions per node: 1
    [ 5961.824736] start_dashDB_local.sh[69]: Current instance memory : 80
    [ 5961.827359] start_dashDB_local.sh[69]: Previous instance memory : 80
    [ 5962.004973] start_dashDB_local.sh[69]: Spark support is going to be disabled.
    [ 5962.010608] start_dashDB_local.sh[69]: Spark support was previously disabled.
    [ 5962.013283] start_dashDB_local.sh[69]: Memory configuration has changed.
    [ 5962.143504] start_dashDB_local.sh[69]: IBM Db2 Warehouse instance will use up to 80% of the total memory.
    [ 5975.161154] start_dashDB_local.sh[69]: Running AUTOCONFIGURE to tune the database ...
    [ 5983.708930] start_dashDB_local.sh[69]: Spark support is disabled.
[ 5985.295307] start_dashDB_local.sh[69]: Update and set IBM Db2 Warehouse Cfgs
    [ 5996.383193] start_dashDB_local.sh[69]: Updating DSM configuration after container update ...
    [ 5996.463478] start_dashDB_local.sh[69]: SERVER STATUS: INACTIVE
    [ 6018.321160] start_dashDB_local.sh[69]: Updating database transaction log settings ...
    [ 6040.566146] start_dashDB_local.sh[69]: Run hardware inventory collection
    [ 6137.269296] start_dashDB_local.sh[69]: [2019-05-09.16:36:34]  INFO: Starting Db2 instance
    [ 6138.950563] start_dashDB_local.sh[69]: [2019-05-09.16:36:36]  INFO: Activating Database bludb
    [ 6146.308239] start_dashDB_local.sh[69]: SERVER STATUS: INACTIVE
    [ 6148.477150] start_dashDB_local.sh[69]: Setting file permission for cleanup and updating dswebserver.properties...
    [ 6149.768853] start_dashDB_local.sh[69]: sed: can't read /etc/sssd/sssd.conf: Permission denied
    [ 6149.834877] start_dashDB_local.sh[69]: Failed to stop sssd.service: Interactive authentication required.
    [ 6149.839671] start_dashDB_local.sh[69]: See system logs and 'systemctl  status sssd.service' for details.
    [ 6149.843289] start_dashDB_local.sh[69]: rm: cannot remove ‘/var/run/sssd.pid’: Permission denied
    [ 6149.858392] start_dashDB_local.sh[69]: Failed to start sssd.service: Interactive authentication required.
    [ 6149.861351] start_dashDB_local.sh[69]: See system logs and 'systemctl status sssd.service' for details.
    [ 6149.864454] start_dashDB_local.sh[69]: Starting dsserver...
    [ 6150.194394] start_dashDB_local.sh[69]: Starting server dsweb.
    [ 6207.202682] start_dashDB_local.sh[69]: Server dsweb started with process ID 15502.
    [ 6207.243376] start_dashDB_local.sh[69]: Started dsserver successfully.
    [ 6268.472171] start_dashDB_local.sh[69]: Running the Health check ...
    [ 6268.475281] start_dashDB_local.sh[69]: #######################################################################
    [ 6268.478363] start_dashDB_local.sh[69]: ##      --- IBM Db2 Warehouse stack service status summary ---       ##
    [ 6268.481433] start_dashDB_local.sh[69]: #######################################################################
    [ 6271.032424] start_dashDB_local.sh[69]: Redirecting to /bin/systemctl status slapd.service
    [ 6271.032671] start_dashDB_local.sh[69]: SUMMARY
    [ 6271.032865] start_dashDB_local.sh[69]: Db2TablesOnline               : RUNNING
    [ 6271.033153] start_dashDB_local.sh[69]: Db2connectivity               : RUNNING
    [ 6271.033356] start_dashDB_local.sh[69]: Db2running                    : RUNNING
    [ 6271.033588] start_dashDB_local.sh[69]: LDAPrunning                   : RUNNING
    [ 6271.033833] start_dashDB_local.sh[69]: WebConsole                    : RUNNING
    [ 6271.219900] start_dashDB_local.sh[69]: Backing-up the system configuration ...
    [ 6271.228858] start_dashDB_local.sh[69]: System configuration backed-up to /mnt/blumeta0/SystemConfig/dockervmguest on the named volume successfully
    [ 6272.959180] start_dashDB_local.sh[69]: *****************************************************************************   ***
    [ 6272.962892] start_dashDB_local.sh[69]: ******          Successfully started IBM Db2 Warehouse           ******
    [ 6272.966971] start_dashDB_local.sh[69]:   ********************************************************************************
    [ 6272.970780] start_dashDB_local.sh[69]: *
    [ 6272.974264] start_dashDB_local.sh[69]: * Next steps:
     [ 6272.977368] start_dashDB_local.sh[69]: *
    [ 6272.981321] start_dashDB_local.sh[69]: * 1. If you were monitoring the container startup progress using docker logs
    [ 6272.985007] start_dashDB_local.sh[69]: command, use Ctrl+c key-sequence to detach from the Docker logs console.
    [ 6272.989729] start_dashDB_local.sh[69]: * 3. Log in to the web console using the following information:
    [ 6272.993079] start_dashDB_local.sh[69]: *        URL: https://localhost:8443
    [ 6272.996271] start_dashDB_local.sh[69]: *        Default user ID    : bluadmin
    [ 6272.999939] start_dashDB_local.sh[69]: * 4. If you forgot the bluadmin password, reset it
    [ 6273.004204] start_dashDB_local.sh[69]: *        by running "docker exec -it Db2wh setpass <new password>".
    [ 6273.007621] start_dashDB_local.sh[69]: *        For other user management, use the web console.
    [ 6273.010741] start_dashDB_local.sh[69]: * 5. After you have confirmed that IBM Db2 Warehouse was successfully upgraded and
    [ 6273.013828] start_dashDB_local.sh[69]: *         started, remove any old containers and images.
    [ 6273.117142] start_dashDB_local.sh[69]: * Note: Db2wh is an example of a container name. Use the container name
    [ 6273.117496] start_dashDB_local.sh[69]: that you specified for the docker run command.
    [ 6273.121236] start_dashDB_local.sh[69]: *
    [ 6273.125072] start_dashDB_local.sh[69]: ********************************************************************************
    [ 6273.137114] start_dashDB_local.sh[69]: Created symlink from   /etc/systemd/system/multi-user.target.wants/crond.service to /usr/lib/systemd/system/crond.service.
    [ 6273.235829] start_dashDB_local.sh[69]: Saving deployment logs...
    [ 6274.595803] start_dashDB_local.sh[69]: Logs saved successfully

如上所述,我增加了分配给 Docker 的内存和 CPU。 我可以连接到容器并手动运行 DB2 命令,连接到 bludb 并列出表空间(例如)。

我在 Mac 上使用默认的 bluadmin 密码,但在 Windows PC 上使用 Docker setpass 命令重置了该密码。

我可以发出一个似乎成功连接到 LDAP 服务器的 ldapsearch 命令。不清楚下面的输出是否表明 LDAP 服务器中没有条目。

    [root@dockervmguest - Db2wh /]# ldapsearch -x -Z
    # extended LDIF
    #
    # LDAPv3
    # base <DC=BU19,DC=SSO,DC=AD,DC=ISOPS,DC=IBM,DC=COM> (default) with scope  subtree
    # filter: (objectclass=*)
    # requesting: ALL
    #

    # search result
    search: 3
    result: 32 No such object

    # numResponses: 1

预期的结果是在浏览器中看到 DB2 Warehouse Web 控制台。

【问题讨论】:

  • 这个问题与编程无关,因此它可能更适合 dba.stackexchange.com 。除此之外,docker 映像在 Linux(ubuntu 16.04)中对我来说可以正常工作。您能否验证您的主机操作系统在其主机文件中是否有一个主机名条目和它的真实 IP 地址?目前尚不清楚您的主机是否使用动态 IP 地址。 docker logs --follow Db2wh 在我的例子中告诉我打开 https://:8443/console (i.e. not localhost) ,我使用的是静态 IP4 地址。
  • @mustaccio。谢谢。在 Docker 主机中读取 localhost 可能会混淆流量(请参阅 IBM Cloud Private 安装说明),我在 Windows 主机文件中注释掉了 localhost 并为 PC 的 IP 地址分配了一个主机名。没变。我有一位同事可以毫无问题地在 Mac 上安装 V3.5.0,他的日志文件也显示 localhost:8443。但是,我认为网络路由问题在可疑列表中居高不下。事实上,我在同一网络(使用 192.168.0.0)上的 Mac 和 Windows 10 PC 上遇到了同样的问题 - 想知道如果不是网络,共同元素是什么。
  • 我还在查看“登录 DB2 仓库”页面的页面源,认为这可能是在尝试直接调用容器中的 LDAP 服务器,但是我没有看到任何监听器在端口 389 上的 Windows 网络中,我确实在容器内的该端口上看到了一个侦听器。
  • 如果您有一台正常工作的 Mac 和一台失败的 Mac(或工作+失败的 Win10),那么您可以比较它们以找到线索。 docker exec 进入容器以 bash 并比较 slapd.log 文件(可能在 /var/log 中)和系统消息日志(例如 /var/log/messages 或任何与 MachOS 等效的文件)。还要比较 Db2wh_local.log 文件,看看它们在哪里有很大的不同。
  • 显然DB2 Warehouse 开发者版Web 控制台网页直接访问容器中的LDAP 服务器。我在 Docker Run 命令中添加了一个“-p 389:389”参数,这样容器内的 LDAP 服务器就会暴露在容器外,现在我可以打开使用 bluadmin id 登录的 Web 控制台。 docker run -itd -p 8443:8443 -p 50000-50001:50000-50001 -p 389:389 --net=db2wh_net --hostname db2wh1 --privileged=true --name=Db2wh -v db2wh_vol:/mnt/bludata0 -v db2wh_vol:/mnt/blumeta0 store/ibmcorp/db2wh_ce:v3.5.0-db2wh_devc-linux

标签: db2 db2-luw dashdb


【解决方案1】:

显然,在 Windows 10 上使用 Docker Desktop 时,您需要使用 -p 参数明确识别暴露在容器外的 TCP/IP 端口。 Web 控制台需要直接访问容器中运行的 LDAP 服务器 (slapd) 以验证用户 ID 和密码。我必须在 Docker 运行命令中添加 -p 389:389 以使 Docker 桌面网络开始侦听主机上的该端口,并从 Web 控制台连接到(映射?网桥?NAT?路由?代理?) slapd 在 DB2 Warehouse DE 容器中。在 Linux 或 Windows 服务器 ymmmv 上运行 Docker Enterprise(甚至 CE)时,可能不需要这样做。

docker run -itd -p 8443:8443 -p 50000-50001:50000-50001 -p 389:389 --net=db2wh_net --hostname db2wh1 --privileged=true --name=Db2wh -v db2wh_vol:/mnt/bludata0 -v db2wh_vol:/mnt/blumeta0 store/ibmcorp/db2wh_ce:v3.5.0-db2wh_devc-linux

【讨论】:

猜你喜欢
  • 2016-05-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-07-02
  • 2022-07-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多