源码编译成功,但启动失败,寻求除错思路
运行环境:
OS为Ubuntu 22.04.4 LTS;资料库为独立部署非容器的MariaDB 10.6.18。
需求:
之前使用容器(映像档为o2oa/o2server:9.1.1)启动并成功运行,
现在想改用下载源码自行编译运行的方式。
问题重现:
1.使用指令docker compose down停止现行O2OA容器运作。
2.使用指令git clone https://gitee.com/o2oa/O2OA.git 并切换到master分支。
3.使用指令chown xxxx:xxxx -R O2OA将源码资料夹拥有者改为现行帐号(非root)。
4.使用指令npm run build_ci:linux编译源码,编译完成产生target目录,过程无错误讯息。
5.复制O2OA容器的config所有设定档到target/o2server/config目录下。
6.使用指令./start_linux.sh启动。
7.显示错误讯息,log内容为:
>>> server directory:/workspace/O2OA/target/o2server
>>> version:9.1.1-3-g327c72fa0b
>>> java:11.0.23
>>> os:Linux
>>> nodeAgent port:20010, encrypt:true
help show usage message.
start|stop start stop all enable server.
start|stop data start stop data server.
start|stop storage start stop storage server.
start|stop center start stop center server.
start|stop application start stop application server.
start|stop web start stop web server.
start init start init server then start all enable server.
setPassword (oldpasswd) (newpasswd) change initial manager password.
version display version.
exit exit after stop all enable server.
ctl -<argument> option system control command, no argument display help.
****************************************
* storage server start completed.
* port: 20040.
****************************************
2024-08-09 09:23:43.652 ERROR com.x.server.console.command.StartCommand - id:12276ca7-cfeb-4564-a4e1-59ec6a3b6420, name:com.x.server.console.command.StartCommand, message:Permission denied, exception:java.net.SocketException.
java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:459) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:448) ~[?:?]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) ~[?:?]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) ~[?:?]
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:345) ~
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310) ~
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234) ~
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~
at org.eclipse.jetty.server.Server.doStart(Server.java:401) ~
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~
at com.x.server.console.server.application.ApplicationServerTools.createServer(ApplicationServerTools.java:129) ~
at com.x.server.console.server.application.ApplicationServerTools.start(ApplicationServerTools.java:74) ~
at com.x.server.console.server.Servers.startApplicationServer(Servers.java:140) ~
at com.x.server.console.command.StartCommand.startApplicationServer(StartCommand.java:94) ~
at com.x.server.console.command.StartCommand.startAll(StartCommand.java:139) ~
at com.x.server.console.command.StartCommand.lambda$static$0(StartCommand.java:52) ~
at com.x.server.console.command.Commands.lambda$execute$2(Commands.java:38) ~
at java.lang.Thread.run(Thread.java:834) ~[?:?]
2024-08-09 09:23:43.749 ERROR com.x.server.console.command.StartCommand - id:724ac2ed-b66a-4c3d-b74c-37ac9f3dcab8, name:com.x.server.console.command.StartCommand, message:null, exception:java.lang.NullPointerException.
java.lang.NullPointerException: null
at com.x.server.console.server.web.WebServerTools.startInApplication(WebServerTools.java:73) ~
at com.x.server.console.server.web.WebServerTools.start(WebServerTools.java:64) ~
at com.x.server.console.server.Servers.startWebServer(Servers.java:132) ~
at com.x.server.console.command.StartCommand.startWebServer(StartCommand.java:110) ~
at com.x.server.console.command.StartCommand.startAll(StartCommand.java:140) ~
at com.x.server.console.command.StartCommand.lambda$static$0(StartCommand.java:52) ~
at com.x.server.console.command.Commands.lambda$execute$2(Commands.java:38) ~
at java.lang.Thread.run(Thread.java:834) ~[?:?]
感觉权限不足的样子,你用root启动的吗?如果非root那要改端口,默认是80,绑定不上的。 启蒙星 发表于 2024-8-9 14:40
感觉权限不足的样子,你用root启动的吗?如果非root那要改端口,默认是80,绑定不上的。 ...
Hi, 启蒙星:
用了太多容器,
确实忘了“1024以下的端口需要系统管理员的权限”,
谢谢回覆啊。
页:
[1]