Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu下单应用不能启动 #427

Closed
mark-wk opened this issue Dec 11, 2018 · 7 comments
Closed

ubuntu下单应用不能启动 #427

mark-wk opened this issue Dec 11, 2018 · 7 comments
Assignees

Comments

@mark-wk
Copy link

mark-wk commented Dec 11, 2018

sh startup.sh -m standalone 命令启动报错
startup.sh: 49: startup.sh: [[: not found
startup.sh: 60: startup.sh: [[: not found
/uni/java/jdk1.8/bin/java -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/uni/nacos/logs/java_heapdump.hprof -XX:-UseLargePages -Xloggc:/uni/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dnacos.home=/uni/nacos -jar /uni/nacos/target/nacos-server.jar --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/uni/nacos/conf/ --logging.config=/uni/nacos/conf/nacos-logback.xml
startup.sh: 78: startup.sh: [[: not found
nacos is starting,you can check the /uni/nacos/logs/start.out

日志文件内容:
java.io.FileNotFoundException: /uni/nacos/conf/cluster.conf (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at com.alibaba.nacos.common.util.SystemUtils.readClusterConf(SystemUtils.java:157)
at com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener.logClusterConf(StartingSpringApplicationRunListener.java:129)
at com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener.contextPrepared(StartingSpringApplicationRunListener.java:79)
at org.springframework.boot.SpringApplicationRunListeners.contextPrepared(SpringApplicationRunListeners.java:60)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:331)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265)
at com.alibaba.nacos.Nacos.main(Nacos.java:31)

@mark-wk
Copy link
Author

mark-wk commented Dec 11, 2018

ubuntu16.4 jdk8

@jiangzhuo
Copy link

ubuntu默认使用dash不是bash,[[是bash里才有的

@mark-wk
Copy link
Author

mark-wk commented Dec 12, 2018

@jiangzhuo 改成bash可以了。

@xuechaos
Copy link
Member

@jiangzhuo 👍👍👍

@MaxBill
Copy link

MaxBill commented Jan 4, 2019

@jiangzhuo 我使用的deepin ,默认就是使用bash 但是启动脚本也还是如上面的错误

@MaxBill
Copy link

MaxBill commented Jan 14, 2019

如果是bash 而且启动还是这样的话,bash -f ./startup.sh -m standalone 就可以了

@cjp1016
Copy link

cjp1016 commented Mar 8, 2019

可以修改 startup.sh 头文件,
#!/bin/sh 改成 #!/bin/bash
然后采用 .startup.sh -m standalone &命令

因为ubuntu默认采用bash命令

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants