再会。
我使用 Install Assist 实用程序 (apicup) 安装了 API Connect 2018 管理和门户主机(版本 2018.2.10)。管理服务器启动正常,我看到 APIConnect 在“apic status”命令后处于启动状态。但我在部署开发人员门户时遇到问题:HAProxy 未启动... 在 /var/log/syslog 中,我看到下一条消息:
Aug 7 13:27:21 portal systemd[1]: Failed to start HAProxy Load Balancer.
HAProxy 配置文件 (/etc/haproxy/haproxy.cfg) 的应用程序后端部分是:
backend application-backend
mode tcp
option tcplog
balance leastconn
server 192.168.1.12:6443 check
我认为服务器定义行中缺少 1 个参数(只有 2 个空格)。我认为它应该是这样的:
server my_portal_host 192.168.1.12:6443 check
apiconnect-up.yaml 文件:
kind: apiconnect-up
subsystems:
mgmt:
endpoints:
- hostname: apic.test.lo
name: platform-api
- hostname: apic.test.lo
name: consumer-api
- hostname: apic.test.lo
name: cloud-admin-ui
- hostname: apic.test.lo
name: api-manager-ui
hosts:
- hostname: apic.test.lo
interfaces:
- device: eth0
dhcp: false
gw: 192.168.1.1
ip: 192.168.1.10
mask: 255.255.255.0
password: password
kvs:
additional-cloud-init-file: ""
az-name: us-west
cassandra-backup-auth-pass: ""
cassandra-backup-auth-user: ""
cassandra-backup-host: ""
cassandra-backup-path: /backups
cassandra-backup-port: "22"
cassandra-backup-protocol: sftp
cassandra-backup-schedule: 0 0 * * *
cassandra-max-memory-gb: "4"
cross-az-peers: ""
data-device: sdb
default-password: ""
dns-servers: 192.168.1.1
k8s-pod-network: 172.16.0.0/16
k8s-service-network: 172.17.0.0/16
portal-base-uri: http://portal.test.lo
public-iface: eth0
search-domain: test.lo
search-max-memory-gb: "4"
ssh-keyfile: ./id_rsa.pub
traffic-iface: eth0
target: appliance
type: management
port:
endpoints:
- hostname: portal.test.lo
name: portal-admin
- hostname: devportal.test.lo
name: portal-www
hosts:
- hostname: portal.test.lo
interfaces:
- device: eth0
dhcp: false
gw: 192.168.1.1
ip: 192.168.1.12
mask: 255.255.255.0
password: password
kvs:
additional-cloud-init-file: ""
az-name: us-west
data-device: sdb
default-password: ""
dns-servers: 192.168.1.1
k8s-pod-network: 172.16.0.0/16
k8s-service-network: 172.17.0.0/16
public-iface: eth0
search-domain: test.lo
ssh-keyfile: ./id_rsa.pub
traffic-iface: eth0
target: appliance
type: portal
version: 1.4.0+build.2018.1-1437.time.2018-06-08T04-41-28Z.commit.36f125d
该问题可能由什么原因造成?
答案1
通过将所有主机名(包括 FQDN)添加到两台计算机(mgmt 和 portal)上的 /etc/hosts 来解决此问题:
127.0.0.1 localhost
192.168.2.10 apic
192.168.2.10 apic.test.lo
192.168.1.12 portal
192.168.1.12 portal.test.lo
192.168.1.12 devportal
192.168.1.12 devportal.test.lo