-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
docker启动失败 #5005
Comments
🤖 您好 @JohnngSong, 我是一个可以帮助您解决问题、回答问题并成为贡献者的机器人。在等待人类维护者的同时,我在这里为您提供帮助。 关于您的问题,"无法访问jarfile apollo-configservice.jar"的错误通常发生在系统无法在预期的位置找到指定的.jar文件时。在您分享的上下文中,startup.sh脚本在当前目录或者如果存在的话,在名为"current"的目录中寻找名为服务名(在这种情况下,为"apollo-configservice.jar")的.jar文件。 脚本首先检查当前目录中是否有以服务名开头并且不以"-sources.jar"结尾的.jar文件。如果找到了,它将设置为.jar文件的路径。如果没有找到并且存在名为"current"的目录,它将切换到那个目录并重复该过程。 如果脚本仍然找不到.jar文件,并且环境变量APOLLO_RUN_MODE设置为"Docker",它将尝试直接在当前目录中执行.jar文件,如果.jar文件不存在,这将失败。 因此,您应确保apollo-configservice.jar文件存在于startup.sh脚本的同一目录或该目录中名为"current"的目录中。如果.jar文件不在这两个位置中的任何一个,您将需要修改您的Dockerfile或您的构建过程,以确保它被复制到正确的位置。 此外,我还找到了一个类似的已解决问题,建议检查是否有另一个服务器在8080端口上运行,使用命令 希望这些信息对您有所帮助。如果您有任何其他问题或需要进一步的澄清,请随时告诉我。 参考资料:
Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
哎,latest版本是真的坑,没有jar包 |
可以参考下 #4848 |
@nobodyiam 可以了,不过有个新的问题,portal 的docker启动后8070口无法访问,没看到错误,请看完整日志: :: Spring Boot :: (v2.6.8) 2023-11-03 14:11:32.810 INFO 1 --- [ main] c.c.f.apollo.portal.PortalApplication : Starting PortalApplication v2.1.0 using Java 1.8.0_342 on 9f6ebbdff348 with PID 1 (/apollo-portal/apollo-portal-2.1.0.jar started by root in /apollo-portal) 2023-11-03 14:11:41.974 INFO 1 --- [erviceLocator-1] c.c.f.a.p.e.PortalMetaDomainService : Located meta server address [http://configservice-dev-ha:8080] for env [DEV] 2023-11-03 14:11:42.281 INFO 1 --- [erviceLocator-1] c.c.f.a.p.e.PortalMetaDomainService : Located meta server address [http://configservice-prod-ha:8080] for env [PROD] |
使用官方给的docker配置启动apolloconfig/apollo-configservice失败,提示Error: Unable to access jarfile apollo-configservice.jar
docker run -p 8080:8080
-e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8"
-e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword
-d -v /tmp/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice:${version}
The text was updated successfully, but these errors were encountered: