ActiveMQ常见错误

ActiveMQ专题--集群,高可用方案 ActiveMQ集群部署方式 Master-Slave部署方式 Broker-Cluster部署方式 Master-Slave与Broker-Cluster相结合的部署方式 Shared database Master-Slave方式 实战 环境 centos 7 在服务器器部署两个节点,一个是A节点只需要添加配置信息,B节点需要修改相应的端口。 使用数据库进行消息持久化 引入数据库... 阅读详情

目前常用的消息队列组建无非就是MSMQ和ActiveMQ,至于他们的异同,这里不想做过多的比较。简单来说,MSMQ内置于微软操作系统之中,在部署上包含一个隐性条件:Server需要是微软操作系统。(对于这点我并去调研过MSMQ是否可以部署在非微软系统,比如:Linux,只是拍脑袋想了想,感觉上是不可以)。对于ActiveMQ,微软系统和Linux都是可以部署的。从功能方面来说,一般最常用的就是:消息的收/发,感觉差异不大。从性能上来说,一般的说法是ActiveMQ略高。在稳定性上,个人感觉MSMQ更好。如果这两种常用队列都用过的同学,应该来说最大的差异在于:MSMQ如果要访问远程队列(比如机器A上的程序访问机器B上的队列),会比较恶心。在数据量比较大的情况之下,一般来说队列服务器会专门的一台或者多台(多台的话,用程序去做热备+负载比较方便,也不需要额外的硬件成本。简单来说做法可以这样:消息发送的时候随机向着多台队列服务器上发送消息;接受的时候开多个线程去分别监听;热备方面,可以维护一个带状态的队列连接池,如果消息收发失败那么将状态置为不可用,然后起一个线程去定时监测坏的连接是否可用,这个过程一般情况下可以不用加锁,为什么,大家根据各自需要去取舍吧)。最近搞完了短彩信的网关连接服务,这两种队列我均使用了。大致的过程是这样的:上层应用如果要发端彩信,那么将消息直接发送至ActiveMQ(目前用的就是上面说的多台热备+负载,因为实际中下行量非常大5千万条/天以上),然后端彩信网关连接服务部署多套,每套均依赖本机的MSMQ。为什么呢?用ActiveMQ的原因是:上层应用程序和网关连接服务彼此独立,消息需要跨机访问。用MSMQ的原因是:ActiveMQ中的数据是一条不分省的大队列,网关连接服务需要按省流控,所以端彩信网关连接服务:首先把消息从ActiveMQ取出来,然后存至本机上的分省MSMQ,这样做另外的一个好处就是:ActiveMQ不至于过多挤压,他的数据会分摊到N台短彩信网关连接服务所部署的机器上的MSMQ之中,也就说MSMQ可以起到分摊数据和缓冲的作用。

 

     在之前的随笔中,已经介绍过MSMQ,现在先介绍一下ActiveMQ一些配置,目前好像ActiveMQ配置上的介绍还比较少。以下是自己总结一些相关资料,贴出来给大家共享

 

一)问题分析和解决

1)KahaDb和AMQ Message Store两种持久方式如何选择?

官方:

From 5.3 onwards - we recommend you use KahaDB - which offers improved scalability and recoverability over the AMQ Message Store.

The AMQ Message Store which although faster than KahaDB - does not scales as well as KahaDB and recovery times take longer.

 

非官方:

kaha文件系统实际上上是一个文件索引系统,有两部分组成,一个是数据文件系统,由一个个独立的文件组成,缺省文件大小是32M大(可配置),另外一个是索引文件系统,记录消息在数据文件中的位置信息以及数据文件中的空闲块信息。数据文件是存储到硬盘上的,索引文件是缓存在内存中的。所以这个存储系统对大消息存储有利,象我们的memberId之类的文本消息,实际上是浪费,索引比消息还大,哈。

 

我方分析:

推荐: Amq持久方式

理由:虽然官方推荐使用KahaDB持久方式,但其提到的优势:可伸缩性和恢复性较好,对于我们实际的应用意义不大。从我们自己的使用经验来看,KahaDB持久方式,Data文件是一个大文件(感觉文件过大后,造成队列服务瘫死的可能性会增大),从官网的相关配置(附录1)也找不到哪里可以设置数据的文件的最大Size。)而Amq持久方式可以设置Data文件最大Size,这样可以保证即时消息积压很多,Data文件也不至于过大。

 

 

2)错误:Channel was inactive for too long

解决方法:

在建立连接的Uri中加入: wireFormat.maxInactivityDuration=0

 

参考资源:

http://jinguo.iteye.com/blog/243153

 

You can do the following to fix the issues:

1) Append max inactivity duration to your Uri in the format below: wireFormat.maxInactivityDuration=0

2) Use the same Uri at the client side as well as at the server side

Regards,

 

如果不这样设置,对应的错误会出现:

2008-05-07 09:22:56,343 [org.apache.activemq.ActiveMQConnection]-[WARN] Async exception with no exception listener: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616

org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: localhost/127.0.0.1:61616

ActiveMQ的tcp url:tcp://localhost:61616后面要加入?wireFormat.maxInactivityDuration=0 这样的参数,否则当一段时间没有消息发送时会抛出 "Channel was inactive for too long"异常

 

3)错误:Wire format negotiation timeout: peer did not send his wire format.

解决方法:

1)关闭ActiveMqLog4j

打开:conf/log4j.properties

将:log4j.rootLogger=INFO, console, logfile

修改为:log4j.rootLogger=OFF

 

2)在建立连接的Uri中加入: maxInactivityDurationInitalDelay=30000

 

例如北京的测试环境连接Uri:

tcp://192.168.199.80:61616?wireFormat.maxInactivityDuration=0&maxInactivityDurationInitalDelay=30000&connection.AsyncSend=true

 

参考资源:

http://activemq.apache.org/javaxjmsjmsexception-wire-format-negociation-timeout-peer-did-not-send-his-wire-format.html

 

If you get exception like this,it can mean one of three things:

1. You're connecting to the port not used by ActiveMQ TCP transport

Make sure to check that you're connecting to the appropriate host:port

 

2. You're using log4j JMS appender and doesn't filter out ActiveMQ log messages

Be sure to read How do I use log4j JMS appender with ActiveMQ and more importantly to never send ActiveMQ log messages to JMS appender

 

3. Your broker is probably under heavy load (or network connection is unreliable), so connection setup cannot be completed in a reasonable time

If you experience sporadic exceptions like this, the best solution is to use failover transport, so that your clients can try connecting again if the first attempt fails. If you're getting these kind of exceptions more frequently you can also try extending wire format negotiation period (default 10 sec). You can do that by using wireFormat.maxInactivityDurationInitalDelay property on the connection URL in your client.

For example

tcp://localhost:61616?wireFormat.maxInactivityDurationInitalDelay=30000

will use 30 sec timeout.(貌似有问题!!!)

 

4)错误:Out of memory

解决方法:

1)  设置Java最大内存限制为合适大小:

Bin/activemq.bat 中ACTIVEMQ_OPTS=-Xmx512M(默认是512)

2)Activemq.xml配置节:systemUsage/ systemUsage配置大小合适,并且特别注意:大于所有durable desitination设置的memoryUsage之和。

 

备注:

1)尖括号:“>”代表通配符

2)ACTIVEMQ_OPTS的配置〉=memoryUsage中配置〉=所有durable desitination设置之和

 

 

 

3)SystemUsage配置设置了一些系统内存和硬盘容量,当系统消耗超过这些容量设置时,amq会“slow down producer”,还是很重要的。

 

 

参考资料:

http://m.oschina.net/blog/26216

参考-- http://activemq.apache.org/javalangoutofmemory.html

       对于MQ的内容实用是可管理和可配置的。首先需要判断的是MQ的哪部分系统因内存不足而导致泄漏,是JVM,broker还是消费者、生产者?

       一、内存管理

       JVM内存管理:

       1. 用bin/activemq命令在独立JVM中运行broker。用-Xmx和-Xss命令即可(activemq.bat文件中修改ACTIVEMQ_OPTS选项参数即可);

       2. 默认情况下,MQ用512M的JVM;

       broker内存管理:

       1. broker使用的内存并不是由JVM的内存决定的。虽然受到JVM的限制,但broker确实独立管理器内存;

       2. systemUsage和destination的内存限制与broker内存息息相关;

       3. MQ中内存的关系是:JVM->Broker->broker features;

       4. 所有destination的内存总量不能超过broker的总内存;

       消费者:

       1. 由于消息大小可以配置,prefetch limit往往是导致内存溢出的主要原因;

       2. 减少prefetch limit的大小,会减少消费者内存中存储的消息数量;

       生产者:

       1. 除非消息数量超过了broker资源的限制,否则生产者不会导致内存溢出;

       2. 当内存溢出后,生产者会收到broker的阻塞信息提示;

       二、其他

       将消息缓冲之硬盘:

       1. 只有当消息在内存中存储时,才允许消息的快速匹配与分发,而当消费者很慢或者离开时,内存可能会耗尽;

       2. 当destination到达它的内存临界值时,broker会用消息游标来缓存非持久化的消息到硬盘。

       3. 临界值在broker中通过memoryUsage和systemUsage两个属性配置,请参考activemq.xml;

       4. 对于缓慢的消费者,当尚未耗尽内存或者转变为生产者并发控制模式前,这个特性允许生产者继续发送消息到broker;

       5. 当有多个destination的时候,默认的内存临界值可能被打破,而这种情况将消息缓存到硬盘就显得很有意义;

       6. precentUsage配置:使用百分比来控制内存使用情况;

       多个线程:

       1. 默认情况下,MQ每个destination都对应唯一的线程;

       2. -Dorg.apache.activema.UseDedicatedTaskRunner=false(activemq.bat文件中修改ACTIVEMQ_OPTS选项参数即可),用线程池来限制线程的数量,从而减少内存消耗;

       大数据传输:

       1. destination policies--maxPageSize:控制进入内存中的消息数量;lazyDispatch:增加控制使用当前消费者列表的预取值;

       2. 使用blogMessage或者streamsMessage类型来进行大量文件的传输;

       泄漏JMS资源:

       1. 当session或者producer或者consumer大量存在而没有关闭的时候;

       2. 使用PooledConnectionFactory;

5)采用failover方式连接导致卡死

解决方法:

不采用failover连接

 

分析:

采用failover方式连接,如果所要连接的服务器或者Activemq服务宕了,那么程序会一直处于等待状态,不超时,不报错。

二)附录

1)KahaDB持久配置

property name

default value

Comments

directory

activemq-data

the path to the directory to use to store the message store data and log files

indexWriteBatchSize

1000

number of indexes written in a batch

indexCacheSize

10000

number of index pages cached in memory

enableIndexWriteAsync

false

if set, will asynchronously write indexes

journalMaxFileLength

32mb

a hint to set the maximum size of the message data logs

enableJournalDiskSyncs

true

ensure every non transactional journal write is followed by a disk sync (JMS durability requirement)

cleanupInterval

30000

time (ms) before checking for a discarding/moving message data logs that are no longer used

checkpointInterval

5000

time (ms) before checkpointing the journal

ignoreMissingJournalfiles

false

If enabled, will ignore a missing message log file

checkForCorruptJournalFiles

false

If enabled, will check for corrupted Journal files on startup and try and recover them

checksumJournalFiles

false

create a checksum for a journal file - to enable checking for corrupted journals

Available since version 5.4:

  

archiveDataLogs

false

If enabled, will move a message data log to the archive directory instead of deleting it.

directoryArchive

null

Define the directory to move data logs to when they all the messages they contain have been consumed.

databaseLockedWaitDelay

10000

time (ms) before trying to get acquire a the database lock (used by shared master/slave)

maxAsyncJobs

10000

the maximum number of asynchronous messages that will be queued awaiting storage (should be the same as the number of concurrent MessageProducers)

concurrentStoreAndDispatchTopics

false

enable the dispatching of Topic messages to interested clients to happen concurrently with message storage

concurrentStoreAndDispatchQueues

true

enable the dispatching of Queue messages to interested clients to happen concurrently with message storage

 

2)AMQ持久配置

property name

default value

Comments

directory

activemq-data

the path to the directory to use to store the message store data and log files

useNIO

true

use NIO to write messages to the data logs

syncOnWrite

false

sync every write to disk

maxFileLength

32mb

a hint to set the maximum size of the message data logs

persistentIndex

true

use a persistent index for the message logs. If this is false, an in-memory structure is maintained

maxCheckpointMessageAddSize

4kb

the maximum number of messages to keep in a transaction before automatically committing

cleanupInterval

30000

time (ms) before checking for a discarding/moving message data logs that are no longer used

indexBinSize

1024

default number of bins used by the index. The bigger the bin size - the better the relative performance of the index

indexKeySize

96

the size of the index key - the key is the message id

indexPageSize

16kb

the size of the index page - the bigger the page - the better the write performance of the index

directoryArchive

archive

the path to the directory to use to store discarded data logs

archiveDataLogs

false

if true data logs are moved to the archive directory instead of being deleted

 

3)systemUsage配置

property name

default value

Comments

memoryUsage

20M

amq使用内存大小,照amq论坛上说,这个值应该大于所有durable desitination设置的

memoryUsage之和,否则会导致硬盘swap,影响性能。

storeUsage

1G

kaha数据存储大小,如果设置不足,性能会下降到1个1个发

tempUsage

100M

非persistent的消息存储在temp区域

4)其他配置

http://activemq.apache.org/nms/configuring.html

 

4.1)Failover Transport Options

Option Name

Default

Description

transport.timeout

-1

Time that a send operation blocks before failing.

transport.initialReconnectDelay

10

Time in Milliseconds that the transport waits before attempting to reconnect the first time.

transport.maxReconnectDelay

30000

The max time in Milliseconds that the transport will wait before attempting to reconnect.

transport.backOffMultiplier

2

The amount by which the reconnect delay will be multiplied by if useExponentialBackOff is enabled.

transport.useExponentialBackOff

true

Should the delay between connection attempt grow on each try up to the max reconnect delay.

transport.randomize

true

Should the Uri to connect to be chosen at random from the list of available Uris.

transport.maxReconnectAttempts

0

Maximum number of time the transport will attempt to reconnect before failing (0 means infinite retries)

transport.startupMaxReconnectAttempts

0

Maximum number of time the transport will attempt to reconnect before failing when there has never been a connection made. (0 means infinite retries)  (included in NMS.ActiveMQ v1.5.0+)

transport.reconnectDelay

10

The delay in milliseconds that the transport waits before attempting a reconnection.

transport.backup

false

Should the Failover transport maintain hot backups.

transport.backupPoolSize

1

If enabled, how many hot backup connections are made.

transport.trackMessages

false

keep a cache of in-flight messages that will flushed to a broker on reconnect

transport.maxCacheSize

256

Number of messages that are cached if trackMessages is enabled.

transport.updateURIsSupported

true

Update the list of known brokers based on BrokerInfo messages sent to the client.

 

4.2)Connection Options

Option Name

Default

Description

connection.AsyncSend

false

Are message sent Asynchronously.

connection.AsyncClose

true

Should the close command be sent Asynchronously

connection.AlwaysSyncSend

false

Causes all messages a Producer sends to be sent Asynchronously.

connection.CopyMessageOnSend

true

Copies the Message objects a Producer sends so that the client can reuse Message objects without affecting an in-flight message.

connection.ProducerWindowSize

0

The ProducerWindowSize is the maximum number of bytes in memory that a producer will transmit to a broker before waiting for acknowledgement messages from the broker that it has accepted the previously sent messages. In other words, this how you configure the producer flow control window that is used for async sends where the client is responsible for managing memory usage. The default value of 0 means no flow control at the client. See also  Producer Flow Control

connection.useCompression

false

Should message bodies be compressed before being sent.

connection.sendAcksAsync

false

Should message acks be sent asynchronously

connection.messagePrioritySupported

true

Should messages be delivered to the client based on the value of the Message Priority header.

connection.dispatchAsync

false

Should the broker  dispatch messages asynchronously to the connection's consumers.

 

4.3)OpenWire Options

Option Name

Default

Description

wireFormat.stackTraceEnabled

false

Should the stack trace of exception that occur on the broker be sent to the client? Only used by openwire protocol.

wireFormat.cacheEnabled

false

Should commonly repeated values be cached so that less marshalling occurs? Only used by openwire protocol.

wireFormat.tcpNoDelayEnabled

false

Does not affect the wire format, but provides a hint to the peer that TCP nodelay should be enabled on the communications Socket. Only used by openwire protocol.

wireFormat.sizePrefixDisabled

false

Should serialized messages include a payload length prefix? Only used by openwire protocol.

wireFormat.tightEncodingEnabled

false

Should wire size be optimized over CPU usage? Only used by the openwire protocol.

wireFormat.maxInactivityDuration

30000

The maximum inactivity duration (before which the socket is considered dead) in milliseconds. On some platforms it can take a long time for a socket to appear to die, so we allow the broker to kill connections if they are inactive for a period of time. Use by some transports to enable a keep alive heart beat feature. Set to a value <= 0 to disable inactivity monitoring.

maxInactivityDurationInitalDelay

10000

The initial delay in starting the maximum inactivity checks (and, yes, the word 'Inital' is supposed to be misspelled like that)

 

5)安全配置

1、控制台安全配置,打开conf/jetty.xml文件,找到

    <bean id="securityConstraint" class="org.eclipse.jetty.http.security.Constraint">

        <property name="name" value="BASIC" />

        <property name="roles" value="admin" />

        <property name="authenticate" value="false" />

    </bean>

   将“false”改为“true”即可。用户名和密码存放在conf/jetty-realm.properties文件中。

2、生产者和消费者连接MQ需要密码

   打开conf/activemq.xml文件,在<broker>标签里的<systemUsage>标签前加入:

   <plugins>  

<simpleAuthenticationPlugin>  

<users>  

<authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>  

</users>  

</simpleAuthenticationPlugin>  

   </plugins>

 注意必须在<systemUsage>标签前,否则启动ActiveMQ会报错。

 

用户名和密码存放在 conf/credentials.properties 文件中

ActiveMQ传输协议详解:原理、配置与故障排查 消息中间件是分布式系统解耦与异步通信的核心组件,而传输协议作为Broker与客户端之间的“通信语言”,直接决定了消息传递的效率、稳定性与跨语言能力。ActiveMQ作为主流开源消息中间件,默认采用OpenWire二进制协议以追求极致性能,同时通过TCP/NIO底层通道以及STOMP、AMQP、MQTT等标准协议,覆盖Java生态、异构系统、物联网设备等多样化接入场景。协议选型不仅影响连接数上限与并发表现,更与生产环境故障排查密切相关。本文深入解析ActiveMQ各传输协议的工作原理、核心配置参数与典型踩坑案 阅读详情

相关推荐

【ActiveMQ】启动ActiveMQ报HTTP:503 错误解决方案

【背景】      ActiveMQ——强大的消息总线,安装过程是相对简单的,只需要上传压缩包,解压,然后到bin路径下启动就可以。但是小编这次安装还是出了一些小问题,报了HTTP:503错误。如果使用ActiveMQ的你也遇到了相同的错误,这篇博客也许会给你带来帮助。报错之前的操作:     1.在activemq-5.12.0目录下使用命令启动mq—— bin/activemq start  ...

王璐 2781

[MQ]关于ActiveMQ的配置

目前常用的消息队列组建无非就是MSMQ和ActiveMQ,至于他们的异同,这里不想做过多的比较。简单来说,MSMQ内置于微软操作系统之中,在部署上包含一个隐性条件:Server需要是微软操作系统。(对于这点我并去调研过MSMQ是否可以部署在非微软系统,比如:Linux,只是拍脑袋想了想,感觉上是不可以)。对于ActiveMQ,微软系统和Linux都是可以部署的。从功能方面来说,一般最常...

weixin_30813225的博客 588

ActiveMQ的断线重连机制

断线重连机制是ActiveMQ的高可用性具体体现之一。 具体就是使用failover方式,使得连接断开之后,可以不断的重试连接到一个或多个brokerURL。 例如:failover:(tcp://127.0.0.1:61616) ,这里可以使用多个url。 默认情况下,如果client与broker直接的connection断开,则client会新起一个线程, 不断的从url参数中获取一

KimmKing的技术博客 5万+

activemq调优

activemq 调优1.jconsole监控vim /usr/local/apache-activemq-5.12.1/conf/activemq.xml #添加useJmx="true" <broker xmlns="http://activemq.apache.org/schema/core" brokerName="interface" dataDirectory="${activemq.d

yanggd1987的专栏 1万+

Go语言集成Ollama本地大模型:gollama库实战指南

在当今的AI应用开发中,大型语言模型(LLM)的集成已成为关键技术。其核心原理是通过API调用,将自然语言处理能力嵌入到各类应用中。从技术价值看,本地化部署的LLM解决了数据隐私、网络延迟和持续成本三大痛点,尤其适合处理敏感数据或对实时性要求高的场景。在工程实践中,开发者常使用专门的客户端库来简化与模型服务的交互,例如通过封装REST API、提供类型安全接口和流式处理支持,从而提升开发效率和代码健壮性。具体到Go语言生态,结合Ollama这一流行的本地大模型运行工具,可以实现完全离线、低延迟的AI功能集成

weixin_28728443的博客 605

车载测试面试题总结

首先确认是什么问题,如果是测试软件的问题就先确定自己的测试方法有没有问题,如果没有问题,那就是测试软件的问题,这时候就需要提bug 进行跟踪,(比如BCM测试的时候,先明确测试的输入,对输入)进行需求分析,然后设计测试用例,进行用例评审,评审完执行测试用例形成最终的版本,台架分为:hil(黑尔)台架,单个控制器的台架、整车台架、车身台架、动力系统台架等,主要验证其功能,或者实车无法满足的测试环境。这个人不可能一直,点击几千次或者多少次几个小时连续点击,人不可能一直在点。因为要模拟一下这个稳定性,

woaxiaoqing的博客 7818

ActiveMq出现HTTP ERROR: 503错误

最近在自己机器上安装Activemq, 但是启动之后, 访问管控台, 出现HTTP ERROR: 503错误 : 于是使用”./activemq stop”停掉服务 . 使用”./activemq console”启动服务, 观察启动日志 . 果然出现下面错误 : 因为我的主机名修改为”mayuan”, 但是却没有在hosts中配置 , 所以应该去修改hosts文件 : vim

梅老板的博客 5358

大学生作业:80C51存储器数据传输实验:基本指令和数据传送

大学生作业:80C51存储器数据传输实验,报价 200 文章目录实验一、80C51存储器数据传输实验实验目的:实验内容一:基本指令实验内容二:数据传送 实验一、80C51存储器数据传输实验 实验目的: 熟悉软件的集成开发环境 掌握单片机软件设计流程,掌握存储器结构及各窗口之间的联系 掌握内部数据存储器、外部数据存储器的数据传送特点和应用; 实验内容一:基本指令 用三种方法实现将累加器A内容改为20H ORG 0000H LJMP MAIN ORG 0030H MAIN: ;方法一使用寄

weixin_54707168的博客 5115

ActiveMQ 503错误

问题描述: 在Linux系统下安装ActiveMQ,启动服务 正常启动后,通过浏览器进行访问 可以正常显示home页面,但是点击其他菜单,如Queues,Topics等,都会出现503错误,如图 问题原因: host文件中的机器名没有映射到IP地址127.0.0.1上 解决方法: 步骤一:先查看机器名 命令是cat /etc/sysconfig/network 一...

weixin_34292287的博客 176

英伟达DeepStream学习笔记7——DeepStream接入USB相机并实现广角摄像头的畸变矫正

deepstream官方提供了一个畸变矫正的例子,包含了鱼眼和普通广角的矫正。我目前准备做一个广角的畸变矫正,我已经使用opencv实现功能,目前增加到deepstream框架中。示例代码在\opt\nvidia\deepstream\deepstream-5.0\sources\apps\sample_apps\deepstream-dewarper-test 中,鱼眼矫正——deepstream官方版 https://developer.nvidia.com/blog/calibration-trans

耶律大石的博客 1602

锐明技术Crocus系统 DeviceState.do SQL注入漏洞复现

锐明技术Crocus系统 DeviceState.do 接口存在SQL注入漏洞,经过身份验证的远程攻击者除了可以利用SQL注入漏洞获取数据库中的信息(例如,管理员后台密码、站点的用户个人信息)之外,甚至在高权限的情况可向服务器中写入木马,进一步获取服务器系统权限。

0xSec 453

Activemq 访问后台出现503错误

嘎嘎 1043

边缘设备部署全攻略——ARM架构设备的OpenClaw优化(2026实测)

本文详细介绍了ARM架构设备上OpenClaw的部署与优化方案。针对边缘计算场景,文章系统分析了三类ARM设备:嵌入式设备(如Raspberry Pi 4、Jetson Nano)、工业设备(如BeagleBone、i.MX8M Plus)和服务器设备(如Marvell Armada、AWS Graviton3),并提供了详细的性能与功耗对比数据。在系统配置方面,重点推荐了Ubuntu ARM、Debian ARM和OpenWRT三种操作系统,包括内核版本、必备软件包和针对边缘环境的优化策略(如CPU频率调

博客 410

apache-activemq启动错误

apache-activemq启动错误: 安装好了apache-acticemq之后启动出现service activemq start 提示: INFO: Loading ‘/etc/default/activemq’ ERROR: Configuration variable JAVA_HOME or JAVACMD is not defined correctly. (JAVA_HOME=’...

qq_36895132的博客 1433

ESP32 DW1000 UWB 室内定位系统

详细介绍ESP32 DW1000 UWB 室内定位系统的设计演示demo。

DT程序员的博客 1662

【kubernetes】kubernetes kubeadm init 错误了 怎么回退?

因为虚拟机设置问题首先报错:然后我根据文章修改了核数。重启后,查看VIP运行所在机器,发现机器没有变化然后重新执行初始化后面报错了根据提供的信息,问题主要集中在 kubelet 未能成功启动控制平面组件,导致初始化过程超时。以下是可能的原因及相应的排查步骤:原因 1:kubelet 未运行或运行状态异常正如错误提示所指出,kubelet 可能未运行或处于不健康状态。请按照提示执行以下命令检查 kubelet 的状态和服务日志:根据输出结果,判断 kubelet 是否正常运行。后续一大堆错误。

九师兄 121

activeMQ启动错误 BeanFactory not initialized

activeMQ启动错误BeanFactory not initialized

焺爅 7283

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

ActiveMQ点击Queues和Topics报503错误

错误如下 可通过查看启动输出错误信息,Ctrl+c可以结束 ./activemq console 通过排查发现是因为主机hosts文件映射不一致 需要将主机名添加到hosts文件中 重新启动一下ActiveMQ就好了 ...

大河向东流的博客 563

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

windows环境下执行activeMq错误

如果执行所对应位数里面的activemq.bat发生错误,首先看看你的计算机名是不是用了中文.其他错误在百度吧

myth_g的博客 467

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

springboot+activemq启动报注解错误问题

springboot+activemq启动报注解错误问题问题解决方案 问题 Description: Field jmsMessagingTemplate in com.haozz.demo.mq.PromoteActProducer required a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' that could not be found. The injection point has the follo

qq5621的博客 605

ActiveMQ第一次运行错误

原文链接:点击打开链接 下载ActiveMQ后解压运行activemq.bat报错 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:MAO_LEI1-5219 5-1468202989150-0:1], java.net.URISyntaxException: Illegal character in hostname a

onepiecer1的专栏 337

ActiveMq常见错误问题

activemq服务挂掉问题总结 activemq出问题时,比较直观的现象就是三台服务器的监控页面都打不开 一、进程不在 检查activemq进程是否还在,若全不在,优先检查磁盘空间。通过一段时间的观察,activemq进程挂掉大部分是由空间不足导致的。 二、进程运行正常 若进...

chengpang4843的博客 2178

关于Ubuntu启动activeMq无效果的错误解决方案

解压tar包到  /opt路径下:     开启服务,显示开启,但 http://127.0.0.1:8161/admin/  --&gt;404     寻其原因: /opt/activemq/bin/activemq console          起初报的是权限不足的问题,我就纳闷了,我是在超级管理员下运行,我在opt下也是我自己定义的全局普通文件夹,也不需要权限。  ...

qq_41204927的博客 4203

ActiveMQ常见错误一: BeanFactory not initialized or already closed - call 'refresh' before accessing beans

ActiveMQ 启动时错误: Caused by: java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.con...

常年被追砍的博客 1183
上一篇: job-oracle定时任务
下一篇: Oracle建立表空间和用户
独黑
博客等级 码龄16年 5粉丝 18原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值