-
2020-09-14 09:56:56
主要原因是启动时@spring.active@值未解析出来。
起初主要是想做多环境配置,pom如下:
<profiles> <profile> <id>dev</id> <properties> <spring.active>dev</spring.active> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>prod</id> <properties> <spring.active>prod</spring.active> </properties> </profile> </profiles>
application.yml配置:
# Spring配置 spring: profiles: active: @spring.active@
一启动就报错,经分析原因,主要是由于此处@spring.active@值未解析导致,解决方法:
pom里面加入resources标签即可生效,如下配置:
<resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>*.yml</include> <include>application-${spring.active}.yml</include> <include>**/*.xml</include> </includes> </resource> </resources>
大功告成!找错不易,如有帮助请记得点赞转发哦
更多相关内容 -
mysql启动失败active:failed 解决方法
2019-04-23 19:37:05今日,已经在linux服务器运行了一年多的mysql突然挂掉了两次,用navicat连接不上。...但今天下午,又出现了挂掉的情况,不管那么多,还是采用上午的方法,但这次却不管用了,执行命令之后,却报错了,错误显示如下:...今日,已经在linux服务器运行了一年多的mysql突然挂掉了两次,用navicat连接不上。第一次是在早上,发现挂了之后,马上就用mobaXterm登录到腾讯云服务器,输入命令
systemctl restart mysqld.service
即将mysql重新跑起来了。但今天下午,又出现了挂掉的情况,不管那么多,还是采用上午的方法,但这次却不管用了,执行命令之后,却报错了,错误显示如下:
那就按提示输入命令
systemctl status mysqld.service
吧,然后执行,显示如下:
这里还是完全看不出什么错误。。认真回想了一下,最近在这个服务器上部署了几个项目,而且没有做优化的那种,我猜想很有可能是服务器内存不够用,导致mysql挂掉了,而且也启动不起来。
这样想了以后,还是不能确定原因,那还是需要找出具体原因。mysql是有启动日志文件的,查了一下,找到了启动日志文件所在路径,即/var/log/mysqld.log(查找方法,可以看/etc/my.cnf文件,最后一张图片有显示),用cat 命令显示该日志文件,拉到最底,发现了错误原因:
只见显示InnoDB:Cannot allocate memory for the buffer pool,哈哈,原来是内存不足,不够分给缓冲池了。。既然这样,那就好办了,如上图所示,初始化缓冲池需要128m,那就想办法让他小于128m吧。
修改mysql的配置文件,/etc/my.cnf,只修改一个配置参数,即innodb_buffer_pool_size,原本是注释掉的,现在放开注释,而且将值改为100M。命令如图:
重新执行mysql启动命令,即可成功启动mysql。。。。
-
jenkins启动时报错:处于active(exited)状态
2022-04-19 10:57:56用rpm安装jenkins启动时报错:处于active(exited)状态) 错误描述 用命令启动jenkins并查询jenkins启动状态 systemctl start jenkins systemctl status jenkins 发现状态显示如下,并未正常启动,浏览器也无法正常...用rpm安装jenkins启动时报错:处于active(exited)状态)
错误描述
用命令启动jenkins并查询jenkins启动状态
systemctl start jenkins systemctl status jenkins
发现状态显示如下,并未正常启动,浏览器也无法正常访问jenkins:
排错过程:
晚上给出的解决方法,基本是说要给jenkins赋予root权限,是因为这个原因的小伙伴可以移步这里:https://blog.csdn.net/u013302898/article/details/109104549
总得来说,网上的这些方法,要么是给jenkins赋予权限,要么是修改JENKINS_USER=root
,但这些权限我之前已经赋予过了,查错还是得靠自己。
于是:1.查看jenkins错误所在位置
2.查看日志,定位错误原因
3.google报错信息,定位到是8080端口已经被占用
虽然不是这么解决,但思路有了4.修改jenkins配置文件,修改端口
vim /etc/sysconfig/jenkins
重新启动
效果验证
-
启动一个active
2014-04-09 15:44:11启动一个active过程,简单实现android启动功能 -
腾讯云服务器启动lightdm遇到“Active: failed (Result: start-limit)”错误解决方法
2021-08-01 00:15:49我在腾讯云服务器上安装图形界面,在启动lightdm时失败了:[root@VM_0_11_centos gdm]# systemctl start lightdm[root@VM_0_11_centos gdm]# systemctl status lightdm● lightdm.service - Light Display ...我在腾讯云服务器上安装图形界面,在启动lightdm时失败了:
[root@VM_0_11_centos gdm]# systemctl start lightdm
[root@VM_0_11_centos gdm]# systemctl status lightdm
● lightdm.service - Light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit) since Sat 2020-04-04 12:02:18 CST; 6s ago
Docs: man:lightdm(1)
Process: 8495 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Main PID: 8495 (code=exited, status=1/FAILURE)
Apr 04 12:02:17 VM_0_11_centos systemd[1]: Unit lightdm.service entered failed state.
Apr 04 12:02:17 VM_0_11_centos systemd[1]: Triggering OnFailure= dependencies of lightdm.service.
Apr 04 12:02:17 VM_0_11_centos systemd[1]: lightdm.service failed.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: lightdm.service holdoff time over, scheduling restart.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Stopped Light Display Manager.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: start request repeated too quickly for lightdm.service
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Failed to start Light Display Manager.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Unit lightdm.service entered failed state.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: Triggering OnFailure= dependencies of lightdm.service.
Apr 04 12:02:18 VM_0_11_centos systemd[1]: lightdm.service failed.
解决方法:
原因是libdrm版本太低了,所以更新就行了。
[root@VM_0_11_centos ~]# yum update libdrm
[root@VM_0_11_centos ~]# systemctl start lightdm
[root@VM_0_11_centos ~]# systemctl status lightdm
● lightdm.service - Light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-04-04 22:21:33 CST; 6s ago
。。。
我的云服务器实例类型是标准型SA1,centos 7.5 64位系统。
-
jenkins无法启动 active (exited)
2019-05-10 10:48:47由于linux硬盘空间不足,我就清理了一些日志文件,可能删除了jenkins日志目录/var/log/jenkins,然后systemctl start jenkins一直无法启动,而且日志也没有更多的错误信息报出来: [root@jenkins ~]# systemctl ... -
active方式启动程序,vb6.0代码,随系统启动
2010-06-20 01:43:01active方式启动vb6.0示例, "SOFTWARE\Microsoft\Active Setup\Installed Components\" & clsid -
hadoop启动后,Active Nodes节点数是0,没有Active Nodes节点
2020-05-27 17:16:581.启动Hadoop start-dfs.sh start-yarn.sh 2.执行jps 没有nademanager进程 3.解决 进入/usr/local/file/hadoop-2.9.2/etc/hadoop vi yarn-site.xml 在yarn配置文件中增加配置 <property> <name>yarn.... -
spring-boot启动时,指定spring.profiles.active
2020-07-11 20:31:14Maven启动指定Profile通过-P, 如mvn spring-boot:run -Ptest 但这是Maven的Profile。 如果要指定spring-boot的spring.profiles.active, spring-boot 1.x 使用mvn spring-boot:run -Drun.profiles=test, spring-... -
记录springboot 启动时报错:no profiles are currently active
2022-01-04 01:28:06springboot启动报错:If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). -
Springboot 多环境启动报错 Do not use @ for indentation ,active: @profile.name@ 错误解决方法
2021-07-22 12:56:531.idea可能没有识别出来maven, 右键项目中的pom.xml--maven--report 2.或者点击 3.去掉POM文件中的空格,先删除空格然后再按tab键恢复。maven会重新加载。 -
HBase Master启动失败 报 master.HMaster: Failed to become active master 解决方法
2019-07-12 17:53:01ERROR [Thread-21] master.HMaster: Failed to become active master java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper operation during component failures... -
Spring Boot启动 No active profile set, falling back to default profiles: default 异常!
2021-03-07 19:13:02先看看启动完整的异常: 2021-03-07 19:11:22.118 INFO 3195 --- [ restartedMain] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default 2021-03-07 19:... -
jenkins无法启动 状态为:active (exited)
2020-10-15 20:19:50问题出现原因 此问题是以为Jenkins默认程序用户jenkins没有权限创建相关的日志目录导致的。 解决办法 将相关目录的属主属组改为jenkins chown -R jenkins:jenkins /var/lib/jenkins chown -R jenkins:jenkins /var/... -
SpringBoot项目启动失败No active profile set, falling back to default profiles: default
2020-10-16 13:00:201.启动 Spring Boot 失败,但是没有出现多余的异常信息: 2.解决方法,在pom.xml文件添加 spring-boot-starter-web依赖 <dependency> <groupId>org.springframework.boot</groupId> <... -
SpringBoot项目启动异常 :no profiles are currently active
2020-11-30 18:05:52If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). 看了下不是因为数据库连接的问题,再看profile也激活了, 试了各种方式... -
Hadoop集群启动成功,但Active Nodes /Live Node 只有一个节点
2020-12-25 00:04:32Hadoop集群有1个主节点和2个从节点都启动成功了 从节点 主节点 但从UI查看hadoop运行状态,其节点还是只有一个,后来通过了解其hadoop版本为64位或者其他原因需要将防火墙关闭。 小伙伴们可以去试试: 关闭防火墙... -
SpringBoot项目启动报错:No active profile set, falling back to default profiles:default
2020-08-13 16:56:51从Git上拉去新的项目之后,启动SpringBoot,直接报错: No active profile set, falling back to default profiles:default 而且没有其他提示。 之前也遇到过这种情况,无非就是一些配置的问题,时间久了不记得... -
ActiveMessenger服务器端服务启动程序
2009-06-06 14:46:40启动ActiveMessenger的AM服务的小软件,将其复制到AM服务器端的安装目录,其快捷方式放入“启动”菜单中即可。自动检测SQL服务状态,并启动AM服务。 可以解决AM使用SQL数据库时,有时AM服务不能自动启动的问题。 -
springboot项目启动时指定加载的配置文件 spring.properties.active,解决不同部署运行环境配置不同问题
2019-08-03 19:37:44springboot项目 可以通过启动时指定虚拟机参数选择加载的配置文件 虚拟机指定加载配置文件参数 --spring.profiles.active=xxx 例如: //运行 springboot项目 jar包 test.jar 加载配置文件 appli... -
spring cloud项目通过IDEA启动多实例无法通过active profiles指定端口的问题
2020-05-01 09:17:03springcloud项目中,希望通过IDEA的edit configurations中的Active profiles指定端口来启动多实例,结果发现配置一直不生效。配置图如下: 但启动第二个实例时,仍然报端口被占用,可见启动的仍然是application.... -
将linxc-keepalived的active(runing)->active(exited)、docker的active(runing)->active(exited)
2021-12-13 17:35:21在配置文件“vim /lib/systemd/system/docker.service ”中修改“Type=simple”使其以默认的普通方式启动再加上“RemainAfterExit=yes”systemd将该服务保持为活动状态,“Restart=no”使其结束后不必 重启,再设置... -
springboot启动spring.profiles.active和spring.profiles.include影响的区别
2019-01-21 15:22:25spring.profiles.active=test4 pring.profiles.include=test3,test5 version=1 name=Tom application-test2.properties文件内容 pring.profiles.include=test3,test4 version=2 applicatio... -
SpringBoot启动后迅速执行结束: No active profile set, falling back to default profiles: default
2019-05-27 18:15:48由于网络上的其它博文,没能解决我的这个问题,然后就记录一下。或许还有很多其它原因...SpringBoot项目启动后迅速执行结束,控制台打印:No active profile set, falling back to default profiles: default(如下... -
django调试模式导致内存溢出的坑和关闭werkzeug的调试模式的方法(项目启动时出现:Debugger is active!...
2019-08-14 17:30:43修改project_path/management/commands/runserver_plus.py,把Command.inner_run方法调用的run_simple的入参use_debugger改为False。 run_simple( self.addr, int(self.port), handler, use_reloader=use_... -
gradle打包项目并指定配置文件spring.profiles.active=dev和端口启动
2020-03-30 16:48:05项目路径build/libs 启动命令 java -jar demo-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev --server.port=9003 -
rabbitmq开在启动状态activating (start)的解决方法
2022-05-05 11:45:27rabbitmq无法启动 -
kubelet启动失败 ——— Active: failed (Result: start-limit)
2020-08-19 17:22:52kubelet启动失败 ——— Active: failed (Result: start-limit)。 # systemctl status kubelet ● kubelet.service - Kubernetes Kubelet Server Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; ... -
spring boot 服务启动时no active profile set, falling back to default profiles: default的问题
2020-10-22 15:31:561.启动时no active profile set, falling back to default profiles: default 相信有不少细心小伙伴在新启动一个spring boot项目时候会发现这样一条信息no active profile set, falling back to default profiles:...