1Panel面板版本1.7.0
Halo从2.9.1更新到2.10.0之后无法访问,网站报错 502 Bad Gateway
在1Panel面板里查看容器发现一直在重启
尝试重建无法解决
检查你的端口是否被占用
我也是的,跟你一样
端口一直都是Halo使用的 只是更新版本而已怎么被会其他东西占用,我也看过了端口没问题
这是解决办法,
试试看这个方法行不行,我试了更不行
1Panel 升级 Halo 之后如果出现 No value found for protocol 错误,
需要手动修改 .env 文件参数
从 1Panel 应用商店-已安装页面 进入 Halo 的安装目录
修改 .env 文件
添加以下参数 PANEL_DB_TYPE=“mysql”
然后 ”重建“ Halo 应用
看一下访问日志,里面会有记录 比如nginx的error.log
这个方法不行呢。
日志审计-网站日志-错误日志:
2023/10/13 23:41:25 [error] 71#71: *1139 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 117.140.252.195, server: aczshop.top, request: “GET /console/dashboard HTTP/2.0”, upstream: “http://127.0.0.1:9999/console/dashboard”, host: “aczshop.top”
2023/10/13 23:41:25 [error] 71#71: *1139 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 117.140.252.195, server: aczshop.top, request: “GET /favicon.ico HTTP/2.0”, upstream: “http://127.0.0.1:9999/favicon.ico”, host: “aczshop.top”, referrer:
“https://aczshop.top/console/dashboard”
容器日志:
Usage: java [options] [args…]
(to execute a class)
or java [options] -jar [args…]
(to execute a jar file)
or java [options] -m [/] [args…]
java [options] --module [/] [args…]
(to execute the main class in a module)
or java [options] [args]
(to execute a single source-file program)
Arguments following the main class, source file, -jar ,
-m or --module / are passed as the arguments to
main class.
where options include:
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
--class-path <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-p <module path>
--module-path <module path>...
A : separated list of directories, each directory
is a directory of modules.
--upgrade-module-path <module path>...
A : separated list of directories, each directory
is a directory of modules that replace upgradeable
modules in the runtime image
--add-modules <module name>[,<module name>...]
root modules to resolve in addition to the initial module.
<module name> can also be ALL-DEFAULT, ALL-SYSTEM,
ALL-MODULE-PATH.
--enable-native-access <module name>[,<module name>...]
modules that are permitted to perform restricted native operations.
<module name> can also be ALL-UNNAMED.
--list-modules
list observable modules and exit
-d <module name>
--describe-module <module name>
describe a module and exit
--dry-run create VM and load main class but do not execute main method.
The --dry-run option may be useful for validating the
command-line options such as the module system configuration.
--validate-modules
validate all modules and exit
The --validate-modules option may be useful for finding
conflicts and other errors with modules on the module path.
-D<name>=<value>
set a system property
-verbose:[class|module|gc|jni]
enable verbose output for the given subsystem
-version print product version to the error stream and exit
--version print product version to the output stream and exit
-showversion print product version to the error stream and continue
--show-version
print product version to the output stream and continue
--show-module-resolution
show module resolution output during startup
-? -h -help
print this help message to the error stream
--help print this help message to the output stream
-X print help on extra options to the error stream
--help-extra print help on extra options to the output stream
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:jdwp
see also -agentlib:jdwp=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
HiDPI scaled images are automatically supported and used
if available. The unscaled image filename, e.g. image.ext,
should always be passed as the argument to the -splash option.
The most appropriate scaled image provided will be picked up
automatically.
See the SplashScreen API documentation for more information
@argument files
one or more argument files containing options
-disable-@files
prevent further argument file expansion
--enable-preview
allow classes to depend on preview features of this release
To specify an argument for a long option, you can use –= or
容器一直在重启中
升级完以后halo容器的参数丢失了,我也遇到这个问题
点开应用商店-halo-参数-编辑参数-高级-编辑compose文件,截图看看
networks:
1panel-network:
external: true
services:
halo:
command:
- --spring.r2dbc.url=r2dbc:pool:${PANEL_DB_TYPE}://${PANEL_DB_HOST}:${PANEL_DB_PORT}/${PANEL_DB_NAME}
- --spring.r2dbc.username=${PANEL_DB_USER}
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD}
- --spring.sql.init.platform=${PANEL_DB_TYPE}
- --halo.external-url=${HALO_EXTERNAL_URL}
container_name: ${CONTAINER_NAME}
deploy:
resources:
limits:
cpus: ${CPUS}
memory: ${MEMORY_LIMIT}
healthcheck:
interval: 30s
retries: 5
start_period: 30s
test:
- CMD
- curl
- -f
- http://localhost:8090/actuator/health/readiness
timeout: 5s
image: halohub/halo:2.10.0
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${HOST_IP}:${PANEL_APP_PORT_HTTP}:8090
restart: always
volumes:
- ./data:/root/.halo2
version: “3”
你解决了吗,怎么搞的
把PANEL_DB_TYPE这些参数全替换成你自己的,重建应用
spring.r2dbc.url=r2dbc:pool:${PANEL_DB_TYPE}://${PANEL_DB_HOST}:${PANEL_DB_PORT}/${PANEL_DB_NAME}
其他的参数不改,参考我的
按照你这个还是不行啊,容器一直都是重启中