当前位置:网站首页>问题:OfficeException: failed to start and connect(二)
问题:OfficeException: failed to start and connect(二)
2022-07-01 06:28:00 【Going_man】
问题:OfficeException: failed to start and connect(二)
场景:重启tomcat服务后,预览系统启动不了
输出日志:启动office组件失败,请检查office组件是否可用
报错:org.artofsolving.jodconverter.office.OfficeException: failed to start and connect
原因二:
因为通过不断地重启发现,其实杀不死也能够让soffice被使用,它会沿用存在的soffice,去执行。
回到原点:
为什么会启动office组件失败,请检查office组件是否可用?
再次寻找原因
在不断重启过程中,我发现了项目运行和tomcat的startup.bat启动,是没有任何问题的。
有问题的情况只有:tomcat服务自启动去启动LibreOffice的时候
①当LibreOffice已启动,去启动是没有问题!
②而但LibreOffice未启动,去启动则会报错!
所以tomcat的startup.bat启动和服务自启动的区别是什么?
启动方式 | 优点 | 缺点 |
---|---|---|
系统服务启动 | 系统开机自启动 | windows系统下导出的线程信息内容不全面 |
startup.bat启动 | 开机后必须再次双击startup.bat启动,关闭命令窗口服务即停止 | 导出的线程信息比较全面 |
而最关键的问题:为什么系统服务启动,会导出线程信息内容不全?
因为通过satrtup.bat启动用户为当前登录账户,而通过服务启动的tomcat用户为system用户,有的是local service用户,导出线程信息时,jstack命令需要添加 -F ,不加会提示:
insufficient memory or insufficient privilege to attach
为什么用户权限不足?
Tomcat服务在启动中的用户名是:LOCAL SERVICE
解析:
①LOCAL SERVICE是windows中的内置账户,权限比普通用户Users更小,在Windows中主要作为系统服务或进程的运行账户。
②以LOCAL SERVICE权限运行的程序无法访问内核驱动程序,无法访问除“系统中断”、“System”和“系统空闲处理器百分比”之外的所有进程。注意:以这个帐户权限运行的服务无法访问Active Directory中的数据,只能访问本地电脑的数据。采用Startup.bat启动的用户名是Administrator
结论二:
tomcat的startup.bat启动和服务自启动,它们的启动用户不同!所以导致了服务启动的用户对于C:\Program Files\LibreOffice权限不够,最终启动不起来!
解决方式二:
在CMD执行sc config Tomcat9 obj=LocalSystem,将tomcat9.exe的执行用户改为System即可
sc config Tomcat9 obj=LocalSystem
边栏推荐
- [ManageEngine Zhuohao] use unified terminal management to help "Eurex group" digital transformation
- SQL学习笔记2
- C语言课设图书信息管理系统(大作业)
- [ManageEngine Zhuohao] helps Huangshi Aikang hospital realize intelligent batch network equipment configuration management
- idea 好用插件汇总!!!
- 【#Unity Shader#自定义材质面板_第一篇】
- Chapter V input / output (i/o) management
- Idea easy to use plug-in summary!!!
- Mongodb: I. what is mongodb? Advantages and disadvantages of mongodb
- mysql约束学习笔记
猜你喜欢
B-树系列
C language course set up library information management system (big homework)
【Unity Shader 描边效果_案例分享第一篇】
SQL学习笔记九种连接2
[network security tool] what is the use of USB control software
[unity shader custom material panel part II]
sci-hub如何使用
C language course design student information management system (big homework)
Mongodb: I. what is mongodb? Advantages and disadvantages of mongodb
C language course is provided with employee information management system (large operation)
随机推荐
【#Unity Shader#自定义材质面板_第一篇】
Redis安装到Windows系统上的详细步骤
Restframework-simplejwt rewrite authentication mechanism
lxml模块(数据提取)
Free trial of self-developed software noisecreater1.1
PAT (Advanced Level) Practice 1057 Stack
绕圆旋转动画组件,拿过来直接用
[self use of advanced mathematics in postgraduate entrance examination] advanced mathematics Chapter 1 thinking map in basic stage
Promise
软件工程复习
Async and await
C语言课设学生选修课程系统(大作业)
C语言课设图书信息管理系统(大作业)
mysql学习
Draw a directed graph based on input
sql中TCL语句(事务控制语句)
【微信小程序】一文解决button、input、image组件
[ManageEngine Zhuohao] helps Julia college, the world's top Conservatory of music, improve terminal security
C#如何打印输出原版数组
H5网页判断是否安装了某个APP,安装则跳转未安装则下载的方案总结