简体   繁体   English

在rancher日志中启动open-iscsi服务错误

[英]Starting open-iscsi service in rancher logs error

I'm testing Prometheus, with a cTor Storage Class with OpenEBS, in a Rancher 2.1 Cluster (1 node) with RancherOS running in Hyper-v. 我正在Rancher 2.1群集(1个节点)中使用带有OpenEBS的cTor存储类和在Hyper-v中运行的RancherOS来测试Prometheus。 The cStor volume is not mounting, and the pod is launching a event: cStor卷未安装,并且Pod正在启动事件:

Unable to mount volumes for pod "prometheus-server-595746cc5-7xrmt_prometheus(46f03eb4-630f-11e9-b3e5-00155daf3d1f)": timeout expired 
waiting for volumes to attach or mount for pod "prometheus"/"prometheus-server-595746cc5-7xrmt". list of unmounted volumes=[storage-volume]. list of 
unattached volumes=[config-volume storage-volume prometheus-server-token-2w8ng] a minute ago

I'm thinking that this is related with the output from command: 我认为这与命令的输出有关:

sudo ros s up open-iscsi

That is: 那是:

[rancher@kub-master ~]$ sudo ros s up open-iscsi
ERRO[0002] non-200 http response: 404
ERRO[0002] Failed to load rancher.docker.engine=(docker-18.09.5-ce): non-200 
http response: 404
INFO[0002] Project [os]: Starting project
INFO[0002] [0/21] [open-iscsi]: Starting
INFO[0092] [1/21] [open-iscsi]: Started
INFO[0092] Project [os]: Project started

So, the question is...the ERRO[0002] is important? 因此,问题是... ERRO [0002]很重要吗? where is documented how can i fix that? 我在哪里记录该如何解决?

I can't find how to fix that, and I tried: 我找不到解决方法,并尝试:

  • Reinstalling the open-iscsi service. 重新安装open-iscsi服务。
  • As i'm unsure if the container cannot mount the volume because this error, then i have tried recreating the Pool, the Storage class, ..., and the error persists. 由于我不确定容器是否因为此错误而无法装入该卷,因此我尝试重新创建Pool,Storage类,...,并且该错误仍然存​​在。

The error from the pod (unable to mount) is not enough information. 吊舱中的错误(无法安装)没有足够的信息。 Check the logs and events for the OpenEBS provisioner or any pod that starts with pvc in the openebs namespace. openebs命名空间中,检查OpenEBS供应商或任何以pvc开头的pod的日志和事件。 That should tell you the actual problem. 那应该告诉您实际的问题。

If you're running a 1-node cluster, did you tell OpenEBS not to make 3 replicas? 如果您正在运行一个1节点群集,是否告诉OpenEBS不要制作3个副本? It might be waiting for the other 2 replicas to come online and thus is not able to make the volume available for the prometheus Pod to use. 它可能正在等待其他2个副本上线,因此无法使该卷可供Prometheus Pod使用。

These are just thoughts off the top of my head. 这些只是我头上的想法。

The 404 error is strange, but it seems to have loaded the open-iscsi drivers without error. 404错误很奇怪,但是它似乎已经正确地加载了open-iscsi驱动程序。 It might not matter. 没关系。 Check Github for an issue about it, and if there isn't one, please open one and document how to reproduce the error. 检查Github上的问题,如果没有,请打开一个并记录如何重现该错误。

Can you check the prerequisites in the RancherOS for the OpenEBS installation from the OpenEBS documentation- docs.openebs.io? 您可以从OpenEBS文档docs.openebs.io中检查RancherOS中OpenEBS安装的先决条件吗? Copying the content from there. 从那里复制内容。

If you are using RancherOS as the operating system for your Kubernetes cluster, you simply need to enable the iSCSI service and start it on all the hosts or nodes. 如果您将RancherOS用作Kubernetes集群的操作系统,则只需启用iSCSI服务并在所有主机或节点上启动它即可。 If you are using Ubuntu or RHEL as the operating system for your Kubernetes cluster, you need to 如果您使用Ubuntu或RHEL作为Kubernetes集群的操作系统,则需要

  • Verify iSCSI initiators are installed on all nodes (and ) 确认iSCSI启动器已安装在所有节点(和)上
  • Add the extra_binds under Kubelet service in cluster YAML file to mount the iSCSI binary and configuration inside the Kubelet. 在群集YAML文件的Kubelet服务下添加extra_binds,以将iSCSI二进制文件和配置装入Kubelet内。

iSCSI services On RancherOS RancherOS上的iSCSI服务

To run iSCSI services, execute the following commands on each of the cluster hosts or nodes. 要运行iSCSI服务,请在每个群集主机或节点上执行以下命令。

sudo ros s enable open-iscsi sudo ros s up open-iscsi sudo ros s启用open-iscsi sudo ros s启用open-iscsi

Run the below commands on all the nodes to make sure the below directories are persistent, by default these directories are ephemeral. 在所有节点上运行以下命令,以确保以下目录是永久性的,默认情况下,这些目录为临时目录。

ros config set rancher.services.user-volumes.volumes [/home:/home,/opt:/opt,/var/lib/kubelet:/var/lib/kubelet,/etc/kubernetes:/etc/kubernetes,/var/openebs] system-docker rm all-volumes reboot ROS配置集rancher.services.user-volumes.volumes [/ home:/ home,/ opt:/ opt,/ var / lib / kubelet:/ var / lib / kubelet,/ etc / kubernetes:/ etc / kubernetes,/ [var / openebs] system-docker rm all-volumes reboot

iSCSI services on RHEL or Ubuntu Step1: Verify iSCSI initiator is installed and services are running RHEL或Ubuntu上的iSCSI服务步骤1:确认已安装iSCSI启动器并且服务正在运行

OPERATING SYSTEM ISCSI PACKAGE COMMANDS RHEL / CentOS iscsi-initiator-utils yum install iscsi-initiator-utils -y sudo systemctl enable iscsid && sudo systemctl start iscsid modprobe iscsi_tcp Ubuntu/Debian open-iscsi sudo apt install open-iscsi sudo systemctl enable iscsid && sudo systemctl start iscsid modprobe iscsi_tcp 操作系统ISCSI软件包命令RHEL / CentOS iscsi-initiator-utils yum install iscsi-initiator-utils -y sudo systemctl enable iscsid && sudo systemctl start iscsid modprobe iscsi_tcp Ubuntu / Debian open-iscsi sudo apt install open-islsisi须藤systemctl启动iscsid modprobe iscsi_tcp

Step2: Add extra_binds under kubelet service in cluster YAML 步骤2:在集群YAML中的kubelet服务下添加extra_binds

After installing the initiator tool on your nodes, edit the YAML for your cluster, editing the kubelet configuration to mount the iSCSI binary and configuration, as shown in the sample below. 在节点上安装启动程序工具后,编辑群集的YAML,编辑kubelet配置以安装iSCSI二进制文件和配置,如下面的示例所示。

services: kubelet: extra_binds: - "/etc/iscsi:/etc/iscsi" - "/sbin/iscsiadm:/sbin/iscsiadm" - "/var/lib/iscsi:/var/lib/iscsi" - "/lib/modules" 服务:kubelet:extra_binds:-“ / etc / iscsi:/ etc / iscsi”-“ / sbin / iscsiadm:/ sbin / iscsiadm”-“ / var / lib / iscsi:/ var / lib / iscsi”-“ / lib / modules”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 启动prometheus服务时遇到错误 - Facing error when starting prometheus service 警报管理器服务未启动 - Alertmanager service not starting 无法启动服务 prometheus:oci 运行时错误:container_linux.go:235:启动容器进程导致“容器初始化过早退出” - Cannot start service prometheus: oci runtime error: container_linux.go:235: starting container process caused "container init exited prematurely" AlertManager 记录“打开 alertmanager.yml:没有这样的文件或目录”并且无法启动 - AlertManager logs “open alertmanager.yml: no such file or directory” and fails to start 在 Rancher 中公开自定义工作负载指标 - Exposing Custom Workload Metrics in Rancher 如何使用 Rancher Monitoring 扩展 Prometheus? - How to scale Prometheus using Rancher Monitoring? 启动Prometheus Docker映像时出错,即使存在配置文件也找不到 - Error starting prometheus docker image, can't find config file even though it exists 普罗米修斯无法开始 - Prometheus not starting Cloudfront登录到Prometheus - Cloudfront Logs into Prometheus Rancher 2.5.7 - 监控 - 监听 8080 端口失败 监听 tcp:8080: bind: address already in use - Rancher 2.5.7 - Monitoring - listening port 8080 failed listen tcp :8080: bind: address already in use
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM