問題一:Ubuntu下啟動Nacos報錯
問題描述
使用命令sh startup.sh -m standalone啟動報錯:
./startup.sh: 78: ./startup.sh:[[: not found./startup.sh: 88: ./startup.sh:[[: not found./startup.sh: 90: ./startup.sh:[[: not found./startup.sh: 96: ./startup.sh:[[: not found/usr/lib/jvm/java-8-openjdk-amd64/bin/java? -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/soft/nacos/logs/java_heapdump.hprof -XX:-UseLargePages -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/lib/jvm/java-8-openjdk-amd64/lib/ext:/data/soft/nacos/plugins/cmdb:/data/soft/nacos/plugins/mysql -Xloggc:/data/soft/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dnacos.home=/data/soft/nacos -jar/data/soft/nacos/target/nacos-server.jar? --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/data/soft/nacos/conf/--logging.config=/data/soft/nacos/conf/nacos-logback.xml./startup.sh: 116: ./startup.sh:[[: not foundnacos is starting,you can check the/data/nacos/logs/start.out
解決方法
改用命令bash -f ./startup.sh -m standalone啟動
問題二:Failed to create database '/data/soft/nacos/data/derby-data'
問題描述
使用命令sh startup.sh -m standalone啟動的時候丢早,出現(xiàn)如下報錯:
Caused by: java.lang.RuntimeException:loadschema.sql error.org.apache.commons.dbcp.SQLNestedException: CannotcreatePoolableConnectionFactory (Failedtocreatedatabase'/data/nacos/data/derby-data', see thenextexceptionfordetails.)atcom.alibaba.nacos.config.server.service.LocalDataSourceServiceImpl.reload(LocalDataSourceServiceImpl.java:110)atcom.alibaba.nacos.config.server.service.LocalDataSourceServiceImpl.init(LocalDataSourceServiceImpl.java:94)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:498)atorg.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)atorg.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307)atorg.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)? ? ...70common frames omitted
解決方法
刪除報錯信息中的'/data/nacos/data/derby-data'目錄姨裸,重新啟動。
需要獲取海量最新BATJ視頻資料加群:676279635 備注(簡書)