ActiveMq+zk集群问题

骑着上帝去环游 2017-02-10 12:30:15
环境:win7
启动三个mq实例+三个zk实例
生成者生成10w+条消息,让消费者消费

java程序中启动一个监听器监听消息队列,在处理到2w+的时候报如下错误,消费行为中止
org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
信息: Successfully refreshed JMS Connection
二月 10, 2017 11:50:54 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-apr-8009"]
二月 10, 2017 11:50:54 上午 org.springframework.jms.listener.DefaultMessageListenerContainer handleListenerSetupFailure
警告: Setup of JMS message listener invoker failed for destination 'queue://textQueueMq' - trying to recover. Cause: Could not open JDBC Connection for transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The driver was unable to create a connection due to an inability to establish the client portion of a socket.

This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.

For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system reconfiguration may also be required.

For Windows-based platforms, see Microsoft Knowledge Base Article 196271 (Q196271).
二月 10, 2017 11:50:54 上午 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
信息: Successfully refreshed JMS Connection



目测是因为win环境问题,但是我认为是配置的原因。
请大牛们帮忙看下,给支支招。谢谢!
...全文
328 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
晓风吹雾 2017-02-13
  • 打赏
  • 举报
回复
默认最大5000, win系统修改注册表。 The default maximum number of ephemeral TCP ports is 5000 in the products that are included in the "Applies to" section. A new parameter has been added in these products. To increase the maximum number of ephemeral ports, follow these steps: Start Registry Editor. Locate the following subkey in the registry, and then click Parameters: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters On the Edit menu, click New, and then add the following registry entry: Value Name: MaxUserPort Value Type: DWORD Value data: 65534 Valid Range: 5000-65534 (decimal) Default: 0x1388 (5000 decimal) Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically, ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive. After the release of security bulletin MS08-037, the behavior of Windows Server 2003 was changed to more closely match that of Windows Server 2008 and Windows Vista. For more information about Microsoft security bulletin MS08-037, click the following article numbers to view the articles in the Microsoft Knowledge Base:
showhunter74 2017-02-13
  • 打赏
  • 举报
回复
你报的错是无法jdbc连接异常啊。是不是数据库连接数满了?

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧