- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有两个 pods ,一个是我的ArtemisMQ pods ,另一个是消费者服务。
我已经设置了入口,以便可以访问可正常使用的控制台,但是问题归结为当我的客户Pod尝试访问端口61616进行连接时。
我从消费者 pods 得到的错误
Could not refresh JMS Connection for destination 'PricingSave' - retrying using FixedBackOff{interval=5000, currentAttempts=0, maxAttempts=unlimited}. Cause: Failed to create session factory; nested exception is ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ219013: Timed out waiting to receive cluster topology. Group:null]
我的经纪人配置:
<?xml version='1.0'?>
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
<core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq:core ">
<name>Artemis</name>
<broadcast-groups>
<broadcast-group name="brokerCluster-broadcast">
<local-bind-address>0.0.0.0</local-bind-address>
<local-bind-port>10000</local-bind-port>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<broadcast-period>20</broadcast-period>
<connector-ref>netty-connector</connector-ref>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="brokerCluster-discovery">
<local-bind-port>10000</local-bind-port>
<local-bind-address>0.0.0.0</local-bind-address>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<refresh-timeout>10</refresh-timeout>
</discovery-group>
</discovery-groups>
<cluster-connections>
<cluster-connection name="brokerCluster">
<connector-ref>netty-connector</connector-ref>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<message-load-balancing>ON_DEMAND</message-load-balancing>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="brokerCluster-discovery"/>
</cluster-connection>
</cluster-connections>
<connectors>
<connector name="netty-connector">tcp://PODS_IP:61616</connector>
</connectors>
<persistence-enabled>true</persistence-enabled>
<!-- this could be ASYNCIO, MAPPED, NIO
ASYNCIO: Linux Libaio
MAPPED: mmap files
NIO: Plain Java Files
-->
<journal-type>ASYNCIO</journal-type>
<paging-directory>data/paging</paging-directory>
<bindings-directory>data/bindings</bindings-directory>
<journal-directory>data/journal</journal-directory>
<large-messages-directory>data/large-messages</large-messages-directory>
<journal-datasync>true</journal-datasync>
<journal-min-files>2</journal-min-files>
<journal-pool-files>10</journal-pool-files>
<journal-device-block-size>4096</journal-device-block-size>
<journal-file-size>10M</journal-file-size>
<!--
This value was determined through a calculation.
Your system could perform 2.84 writes per millisecond
on the current journal configuration.
That translates as a sync write every 352000 nanoseconds.
Note: If you specify 0 the system will perform writes directly to the disk.
We recommend this to be 0 if you are using journalType=MAPPED and journal-datasync=false.
-->
<journal-buffer-timeout>352000</journal-buffer-timeout>
<!--
When using ASYNCIO, this will determine the writing queue depth for libaio.
-->
<journal-max-io>4096</journal-max-io>
<!--
You can verify the network health of a particular NIC by specifying the <network-check-NIC> element.
<network-check-NIC>theNicName</network-check-NIC>
-->
<!--
Use this to use an HTTP server to validate the network
<network-check-URL-list>http://www.apache.org</network-check-URL-list> -->
<!-- <network-check-period>10000</network-check-period> -->
<!-- <network-check-timeout>1000</network-check-timeout> -->
<!-- this is a comma separated list, no spaces, just DNS or IPs
it should accept IPV6
Warning: Make sure you understand your network topology as this is meant to validate if your network is valid.
Using IPs that could eventually disappear or be partially visible may defeat the purpose.
You can use a list of multiple IPs, and if any successful ping will make the server OK to continue running -->
<!-- <network-check-list>10.0.0.1</network-check-list> -->
<!-- use this to customize the ping used for ipv4 addresses -->
<!-- <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command> -->
<!-- use this to customize the ping used for ipv6 addresses -->
<!-- <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command> -->
<!-- how often we are looking for how many bytes are being used on the disk in ms -->
<disk-scan-period>5000</disk-scan-period>
<!-- once the disk hits this limit the system will block, or close the connection in certain protocols
that won't support flow control. -->
<max-disk-usage>90</max-disk-usage>
<!-- should the broker detect dead locks and other issues -->
<critical-analyzer>true</critical-analyzer>
<critical-analyzer-timeout>120000</critical-analyzer-timeout>
<critical-analyzer-check-period>60000</critical-analyzer-check-period>
<critical-analyzer-policy>HALT</critical-analyzer-policy>
<page-sync-timeout>484000</page-sync-timeout>
<!-- the system will enter into page mode once you hit this limit.
This is an estimate in bytes of how much the messages are using in memory
The system will use half of the available memory (-Xmx) by default for the global-max-size.
You may specify a different value here if you need to customize it to your needs.
<global-max-size>100Mb</global-max-size>
-->
<acceptors>
<!-- Acceptor for every supported protocol -->
<acceptor name="artemis">tcp://PODS_IP:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true</acceptor>
<!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.-->
<acceptor name="amqp">tcp://PODS_IP:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true</acceptor>
<!-- STOMP Acceptor. -->
<acceptor name="stomp">tcp://PODS_IP:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>
<!-- HornetQ Compatibility Acceptor. Enables HornetQ Core and STOMP for legacy HornetQ clients. -->
<acceptor name="hornetq">tcp://PODS_IP:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>
<!-- MQTT Acceptor -->
<acceptor name="mqtt">tcp://PODS_IP:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>
</acceptors>
<security-settings>
<security-setting match="#">
<permission type="createNonDurableQueue" roles="amq"/>
<permission type="deleteNonDurableQueue" roles="amq"/>
<permission type="createDurableQueue" roles="amq"/>
<permission type="deleteDurableQueue" roles="amq"/>
<permission type="createAddress" roles="amq"/>
<permission type="deleteAddress" roles="amq"/>
<permission type="consume" roles="amq"/>
<permission type="browse" roles="amq"/>
<permission type="send" roles="amq"/>
<!-- we need this otherwise ./artemis data imp wouldn't work -->
<permission type="manage" roles="amq"/>
</security-setting>
</security-settings>
<address-settings>
<!-- if you define auto-create on certain queues, management has to be auto-create -->
<address-setting match="activemq.management#">
<dead-letter-address>DLQ</dead-letter-address>
<expiry-address>ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<!-- with -1 only the global-max-size is in use for limiting -->
<max-size-bytes>-1</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>
<auto-create-queues>true</auto-create-queues>
<auto-create-addresses>true</auto-create-addresses>
<auto-create-jms-queues>true</auto-create-jms-queues>
<auto-create-jms-topics>true</auto-create-jms-topics>
</address-setting>
<!--default for catch all-->
<address-setting match="#">
<dead-letter-address>dlq</dead-letter-address>
<expiry-address>ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<!-- with -1 only the global-max-size is in use for limiting -->
<max-size-bytes>-1</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>
<auto-create-queues>true</auto-create-queues>
<auto-create-addresses>true</auto-create-addresses>
<auto-create-jms-queues>true</auto-create-jms-queues>
<auto-create-jms-topics>true</auto-create-jms-topics>
</address-setting>
</address-settings>
<addresses>
<address name="PricingSave.dlq">
<anycast>
<queue name="PricingSave.dlq"/>
</anycast>
</address>
<address name="PricingSave">
<anycast>
<queue name="PricingSave"/>
</anycast>
</address>
<address name="ExpiryQueue">
<anycast>
<queue name="ExpiryQueue" />
</anycast>
</address>
</addresses>
<!-- Uncomment the following if you want to use the Standard LoggingActiveMQServerPlugin pluging to log in events
<broker-plugins>
<broker-plugin class-name="org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin">
<property key="LOG_ALL_EVENTS" value="true"/>
<property key="LOG_CONNECTION_EVENTS" value="true"/>
<property key="LOG_SESSION_EVENTS" value="true"/>
<property key="LOG_CONSUMER_EVENTS" value="true"/>
<property key="LOG_DELIVERING_EVENTS" value="true"/>
<property key="LOG_SENDING_EVENTS" value="true"/>
<property key="LOG_INTERNAL_EVENTS" value="true"/>
</broker-plugin>
</broker-plugins>
-->
</core>
</configuration>
我的Artemis服务配置:
kind: Service
apiVersion: v1
metadata:
labels:
name: amq
name: amq
namespace: default
spec:
selector:
app: amq
ports:
- name: web
port: 8161
protocol: TCP
targetPort: 8161
- name: stomp
port: 61613
protocol: TCP
targetPort: 61613
- name: mqtt
port: 1883
protocol: TCP
targetPort: 1883
- name: openwire
port: 61616
protocol: TCP
targetPort: 61616
- name: jmx
port: 9404
protocol: TCP
targetPort: 9404
- name: hornetq
port: 5445
protocol: TCP
targetPort: 5445
- name: amqp
port: 5672
protocol: TCP
targetPort: 5672
sessionAffinity: None
type: ClusterIP
我的Artemis部署配置:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: amq
name: amq
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: amq
strategy:
type: Recreate
template:
metadata:
annotations:
linkerd.io/inject: enabled
labels:
app: amq
spec:
containers:
- image: REPOSITORY/IMAGE
name: amq
env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONTAINER_CORE_LIMIT
valueFrom:
resourceFieldRef:
resource: limits.cpu
- name: CONTAINER_MAX_MEMORY
valueFrom:
resourceFieldRef:
resource: limits.memory
ports:
- containerPort: 8161
name: web
protocol: TCP
- containerPort: 61613
name: stomp
protocol: TCP
- containerPort: 1883
name: mqtt
protocol: TCP
- containerPort: 61616
name: openwire
protocol: TCP
- containerPort: 9404
name: jmx
protocol: TCP
- containerPort: 5445
name: hornetq
protocol: TCP
- containerPort: 5672
name: amqp
protocol: TCP
imagePullPolicy: Always
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 400m
memory: 1012Mi
securityContext:
capabilities:
add:
- NET_ADMIN
- NET_RAW
restartPolicy: Always
imagePullSecrets:
- name: my-registry...
最佳答案
对连接器使用0.0.0.0
无效。实际上,关于它的日志中应该有一个WARN
级别的消息。使用这样的配置,您的群集将无法正确形成。您需要使用其他主机可以用来访问广播它的代理的主机名或IP地址。这就是broadcast-group
的全部要点-告诉其他可能正在侦听他们如何连接到它的经纪人。
关于kubernetes - 无法从kubernetes中的另一个Pod连接到Artemis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63759027/
kubernetes的新手,希望了解使用不同kubernetes对象的最佳实践,并且很难理解“Pods”和“Static Pods”在功能上的主要区别(如果有)吗? 主要问题如下: 问题1:如果有功能
以下是 pods 文件的截图,其中不包含 AFNetworking 库。当我在终端中运行命令 pod install 时,它安装了 AFNetworking 库版本 3.0.1。我无法理解为什么会这样
在通过 pod lib create projectName 创建的目录中执行 pod init 是否受支持?它似乎对我不起作用,但否则如何指定他们正在创建的 pod 的上游依赖项? pod inst
我正在尝试制作一个 Pod::Simple::HTML 的简单子(monad)类用于 Pod::Simple::HTMLBatch .我希望使用 POD::Weaver 对所有 POD 进行预处理.但
根据定义here , POD 是一个简单的类,没有用户定义的构造函数、非静态成员,并且只包含简单的数据类型。 问题是,下面这两个类是否等同于 POD 类型(就内存占用而言): class pod {
使用 Airflow 在 AWS EKS 上运行 KubernetesPodOperator 获取 kubernetes.client.rest.ApiException: (400),指出版本\"v
据我了解,当 POD 与服务对话时,IP 表已由 CNI 提供商更新(这可能特定于某些但不是所有 CNI 提供商)。 iptables 基本上提供了一个虚拟 IP,然后循环或分发(以某种方式)到后端临
我有一个 pod 需要将数据持久保存到 pod 外部的位置。我认为persistentVolume 是一个好主意。名为 writerPod 的 pod 需要对该卷进行读写访问。 多个其他 Pod(我称
我想知道,如果 HPA 考虑一个 pod 中多个容器的 CPU 利用率的平均值,以便向上/向下扩展数量。 pod 。例如,如果我为具有 2 个容器的部署(pod)指定如下所示的 HPA。为了让 HPA
我有以下情况: 我有几个微服务,现在只有两个是相关的。 - Web 套接字服务 API - 调度服务 我们有 3 个用户,我们将分别称为 1、2 和 3。这些用户将自己连接到我们后端的 Web 套接字
我已经注意到,当使用kubectl时,您几乎可以互换使用 pod 和 pods 。是否有任何实例可以使用一个实例而不是另一个实例来获得不同的结果,或者您可以只使用其中一个而不用担心呢? 例如: kub
我尝试使用命令 pod update 更新我的 podfile但它需要永远。 我也按照这个问题做了所有的步骤 cocoapods - 'pod install' takes forever但什么都没有
我正在设置一个 Kubernetes 主节点。 只是主节点,暂时没有工作节点。 使用 this tutorial. 完成设置,没有任何问题现在, $kubectl get pods -o wide -
是否可以在 pod install 期间让一个 Pod 保持不变和pod update ? pod update 不是一个选项。 最佳答案 您实际上可以使用pod update [NAMES...]来
基本上,我有一个部署,它创建了 3 个自动扩展的容器:PHP-FPM、NGINX 和包含应用程序的容器,所有这些都设置了 secret 、服务和入口。该应用程序还在 PHP-FPM 和 NGINX 之
在为Kubernetes创建/添加节点时,我们还必须创建Canal pod。 当前,kubernetes在尝试调度Pod之前不会等待Canal Pod准备就绪,从而导致失败(错误如下) Error s
我正在寻找一个选项来从部署/复制中删除 pod 而不删除它。我找到了一个很好的解决方案 using selector and labels here ,但在我的情况下这是不可能的,因为我不是 pod/
来自 PodInterface两个操作Delete和 Evict似乎具有相同的效果:删除旧 Pod 并创建一个新 Pod。 如果两个操作效果一样,为什么删除一个Pod并创建一个新的Pod需要两个API
Kubernetes版本1.12.3。 kubectl排水是先移开 pods 还是先创建 pods 。 最佳答案 您可以在节点上执行维护(例如内核升级,硬件维护等)之前,使用kubectlrain安全
有没有办法通过主机名访问 pod? 我有一个主机名:my-pod-1需要使用主机名连接到另一个 pod:my-pod-2 . 在没有服务的情况下实现这一目标的最佳方法是什么? 最佳答案 通过您的描述,
我是一名优秀的程序员,十分优秀!