解决方法

一台机器启用多个微服务的时候可能出现 多个 arthas端口冲突。可以配置为随机端口,或者配置为 -1

1
2
#arthas.telnet-port=-1
#arthas.http-port=-1

并且通过tunnel server来管理使用arthas

错误如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'arthasAgent' defined in class path resource [com/alibaba/arthas/spring/ArthasConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.taobao.arthas.agent.attach.ArthasAgent]: Factory method 'arthasAgent' threw exception; nested exception is java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:637) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]
at top.lingma.lingmaservice.LingmaServiceApplication.main(LingmaServiceApplication.java:10) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.taobao.arthas.agent.attach.ArthasAgent]: Factory method 'arthasAgent' threw exception; nested exception is java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:652) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
... 20 common frames omitted
Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at com.taobao.arthas.agent.attach.ArthasAgent.init(ArthasAgent.java:131) ~[arthas-agent-attach-3.4.8.jar:3.4.8]
at com.alibaba.arthas.spring.ArthasConfiguration.arthasAgent(ArthasConfiguration.java:62) ~[arthas-spring-boot-starter-3.4.8.jar:3.4.8]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_202]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_202]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_202]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
... 21 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_202]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_202]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_202]
at com.taobao.arthas.agent.attach.ArthasAgent.init(ArthasAgent.java:121) ~[arthas-agent-attach-3.4.8.jar:3.4.8]
... 27 common frames omitted
Caused by: java.lang.IllegalStateException: Arthas failed to bind telnet or http port.
at com.taobao.arthas.core.server.ArthasBootstrap.bind(ArthasBootstrap.java:419) ~[na:na]
at com.taobao.arthas.core.server.ArthasBootstrap.<init>(ArthasBootstrap.java:148) ~[na:na]
at com.taobao.arthas.core.server.ArthasBootstrap.getInstance(ArthasBootstrap.java:549) ~[na:na]
... 32 common frames omitted

进程已结束,退出代码1

通过Arthas Tunnel Server/Client 来远程管理/连接多个Agent。

1
2
3
4
1. 下载arthas-tunnel-server-3.4.5-fatjar.jarhttps://github.com/alibaba/arthas/releases
2. 运行windowsjava -jar arthas-tunnel-server-3.4.5-fatjar.jarlinuxnohup java -jar arthas-tunnel-server-3.4.5-fatjar.jar > /dev/null 2>&1 &
3. 登录查看注册上来的应用http://127.0.0.1:8080/actuator/arthas 登陆用户名是arthas密码在arthas tunnel server的日志里可以找到

启动Arthas Tunnel Server:

如何解决arthas-failed-to-bind-telnet-or-http-port问题的更多相关文章

  1. SpringBoot报错:Failed to load ApplicationContext( Failed to bind properties under 'logging.level')

    引起条件: SpringBoot2.0下yml文件配置SLF4j日志输出日志级别 logging: level: debug 解决方法: 指定系统包路径 logging: root: debug 指定 ...

  2. Failed to bind properties under 'spring.datasource' to javax.sql.DataSource

    这是我的配置文件 # 国际化配置文件(包名.基础名) spring.messages.basename=i18n.login server.tomcat.uri-encoding=UTF- sprin ...

  3. Spark2.2出现异常:ERROR SparkUI: Failed to bind SparkUI

    详细错误信息如下: // :: INFO util.log: Logging initialized @5402ms // :: INFO server.Server: jetty-9.3.z-SNA ...

  4. 【elaseticsearch】elaseticsearch启动报错Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to [9300-9400]

    elaseticsearch启动报错 [es1] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupExce ...

  5. failed to bind pixmap to texture

    问题描述:我用的是Ubuntue的操作系统,终端突然挂了.我重启了一下电脑,就进不去系统了. 日志信息:  failed to bind pixmap to texture 原因: 界面管理工具坏了, ...

  6. springBoot配置druid监控报错Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource

    报错信息: Description: Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource ...

  7. SpringBoot升级报错:Failed to bind properties under 'logging.level'

    错误详细信息: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties un ...

  8. springboot项目war包部署及出现的问题Failed to bind properties under 'mybatis.configuration.mapped-statements[0].

    1.修改pom文件 修改打包方式 为war: 添加tomcat使用范围,provided的意思即在发布的时候有外部提供,内置的tomcat就不会打包进去 <groupId>com.scho ...

  9. jasypt-spring-boot提示Failed to bind properties

    1 问题描述 在Spring Boot中使用jasypt-spring-boot进行加密,但是提示: Description: Failed to bind properties under 'spr ...

  10. 【LR11】Error -27796: Failed to connect to server"server:port": [10060] Connection timed out错误解决办法

      场景描述:被测系统是发布在远程服务器上的,假设IP是10.10.10.10,端口是8066,那么访问地址是http://10.10.10.10:8066/,在control机器上我设置了IP欺骗. ...

随机推荐

  1. 学会Linux,看完这篇就行了!

    转载请注明出处️ 作者:测试蔡坨坨 原文链接:caituotuo.top/797ab07d.html 你好,我是测试蔡坨坨. 对于测试同学来说,Linux基本属于必学必会内容,招聘要求中基本都会出现L ...

  2. Unity接入微信支付SDK 2022年版安卓篇

    最近1年转了UE开发,博客更新的比较少,技术栈宽了不少,以后有空尽量多更新,也方便总结记忆 Unity接入微信支付整个过程坑比较多,网上之前的教程要么比较老,要么比较零碎,只能东拼西凑摸索,跑通后还是 ...

  3. mysqld_exporter参数信息

    [root@database03 mysqld_exporter]# ./mysqld_exporter --help usage: mysqld_exporter [<flags>] F ...

  4. CentOS 7.x 升级OpenSSH

    升级SSH 存在中断风险,如果SSH 升级失败将会导致终端无法登录,建议在使用本地虚拟机进行测试后对线上生产环境进行升级操作!!! 三级等保评测中对主机进行漏洞扫描发现linux主机存在高危漏洞,查看 ...

  5. 轻松绕过waf,内网技术,Cobalt Strike4.4远控木马绕waf流量监控

    DNS隧道技术可以解决运控木马无法上线的问题,waf,防火墙对tcp,http,https等端口有流量检测,这个时候我们就可以使用隧道技术,让cs木马走DNS隧道,不仅可以检测不到而且也是一种反溯源的 ...

  6. [CG从零开始] 4. pyopengl 绘制一个正方形

    在做了 1-3 的基础工作后,我们的开发环境基本 OK 了,我们可以开始尝试利用 pyopengl 来进行绘制了. 本文主要有三个部分 利用 glfw 封装窗口类,并打开窗口: 封装 shader 类 ...

  7. this硬绑定

    一.this显示绑定 this显示绑定,顾名思义,它有别于this的隐式绑定,而隐式绑定必须要求一个对象内部包含一个指向某个函数的属性(或者某个对象或者上下文包含一个函数调用位置),并通过这个属性间接 ...

  8. Activiti7基本介绍

    官方地址 官方地址 官方最新用户文档-V6.0.0 码云镜像-activiti-7-developers-guide 关于BPMN BPMN(Business Process Model AndNot ...

  9. Redis数据结构(一)-Redis的数据存储及String类型的实现

    1 引言 Redis作为基于内存的非关系型的K-V数据库.因读写响应快速.原子操作.提供了多种数据类型String.List.Hash.Set.Sorted Set.在项目中有着广泛的使用,今天我们来 ...

  10. nginx+keepalived实现主从模式双机热备份

    主从模式就是一台机器提供服务,另一台机器作为备份机,当主机的服务停止时,备份机立刻接替主机的服务. 安装 安装nginx wget http://nginx.org/download/nginx-1. ...