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

WEB 管理页面的服务器列表为空 Server list is empty in manage page #242

Open
Lyqqt opened this issue Jul 5, 2023 · 1 comment

Comments

@Lyqqt
Copy link

Lyqqt commented Jul 5, 2023

你的问题是什么?

大大你好,我使用 docker 将项目跑起来后,管理页面的服务器列表是空的。

出现问题的情况是怎么样的?

我的环境

  1. 使用自己的nginx服务
    并添加配置:
# v2ray-web-manager
server {
  listen      6666 ssl http2;
  listen [::]:6666 ssl http2;
  server_name xxx;

  # root /opt/jar/web;
  root /var/lib/docker/volumes/v2ray-manager-web/_data; # docker volume - v2ray-manager-web

  location /api {
    proxy_pass http://127.0.0.1:7777/;
  }
}
  1. 使用自己的 v2ray 服务
    在原有可用配置上添加官网的流量统计相关配置,以及HandlerService、LoggerService

修改的文件(仅列出改动部分)

  1. admin.yaml
admin:
  email: 管理员邮箱
  password: 管理员密码

proxy:
  authPassword: 'PROXY密码'

server:
  port: 7777
  1. proxy.yaml
proxy:
  authPassword: 'PROXY密码'
  localPort: 我自己的V2ray的端口

manager:
  address: http://127.0.0.1:7777
  1. 替代 run.sh 的 custom.sh
# cp /opt/conf/v2ray-mng.conf /etc/nginx/sites-enabled/default
nohup java -jar -Xms40m -Xmx40m -XX:MaxDirectMemorySize=100M -XX:MaxMetaspaceSize=180m /opt/jar/admin.jar --spring.config.location=/opt/conf/admin.yaml >> /opt/admin.log &
nohup java -jar -Xms40m -Xmx40m -XX:MaxDirectMemorySize=100M -XX:MaxMetaspaceSize=180m /opt/jar/v2ray-proxy.jar --spring.config.location=/opt/conf/proxy.yaml >> /opt/proxy.log &
# nginx -g 'daemon off;'

echo "v2ray-web-manager run success";

# pause
tail -f /dev/null
  1. 启动命令
docker run -d --name v2ray-manager --net=host -v /opt/v2ray-web-manager:/opt/conf --mount source=v2ray-manager-web,target=/opt/jar/web greatbody/v2ray-web-manager:0.0.19 /bin/bash -c "/opt/conf/custom_run.sh"

相关日志 java服务日志位于/opt/jar/logs

  1. admin.log
2023-07-05 21:11:02.494  INFO 7 --- [main] com.jhl.admin.AdminApplication           : Starting AdminApplication v3.1.4 on hk85 with PID 7 (/opt/jar/admin.jar started by root in /opt/jar)
2023-07-05 21:11:02.503  INFO 7 --- [main] com.jhl.admin.AdminApplication           : No active profile set, falling back to default profiles: default
2023-07-05 21:11:05.949  INFO 7 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2023-07-05 21:11:06.547  INFO 7 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 564ms. Found 15 repository interfaces.
2023-07-05 21:11:08.099  INFO 7 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'appConfig' of type [com.jhl.admin.config.AppConfig$$EnhancerBySpringCGLIB$$4066b6aa] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-07-05 21:11:08.487  INFO 7 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$beb2d8a2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-07-05 21:11:09.976  INFO 7 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 2097 (http)
2023-07-05 21:11:10.096  INFO 7 --- [main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-07-05 21:11:10.097  INFO 7 --- [main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.16]
2023-07-05 21:11:10.137  INFO 7 --- [main] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2023-07-05 21:11:10.493  INFO 7 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-07-05 21:11:10.494  INFO 7 --- [main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 7630 ms
2023-07-05 21:11:11.158  INFO 7 --- [main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-07-05 21:11:11.370  INFO 7 --- [main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2023-07-05 21:11:11.773  INFO 7 --- [main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
        name: default
        ...]
2023-07-05 21:11:11.944  INFO 7 --- [main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.7.Final}
2023-07-05 21:11:11.947  INFO 7 --- [main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2023-07-05 21:11:12.296  INFO 7 --- [main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2023-07-05 21:11:13.248  INFO 7 --- [main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: com.jhl.admin.util.SQLiteDialect
2023-07-05 21:11:13.300  INFO 7 --- [main] o.h.e.j.e.i.LobCreatorBuilderImpl        : HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [2] less than 4
2023-07-05 21:11:15.437  INFO 7 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-07-05 21:11:16.913  INFO 7 --- [main] o.h.h.i.QueryTranslatorFactoryInitiator  : HHH000397: Using ASTQueryTranslatorFactory
2023-07-05 21:11:17.794  WARN 7 --- [main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2023-07-05 21:11:20.945  INFO 7 --- [main] o.s.s.c.ThreadPoolTaskScheduler          : Initializing ExecutorService 'taskScheduler'
2023-07-05 21:11:21.347  INFO 7 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 2097 (http) with context path ''
2023-07-05 21:11:21.356  INFO 7 --- [main] com.jhl.admin.AdminApplication           : Started AdminApplication in 21.478 seconds (JVM running for 23.41)
2023-07-05 21:17:51.100  INFO 7 --- [http-nio-2097-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-07-05 21:17:51.100  INFO 7 --- [http-nio-2097-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-07-05 21:17:51.114  INFO 7 --- [http-nio-2097-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 14 ms
2023-07-05 21:17:51.141  INFO 7 --- [http-nio-2097-exec-1] c.jhl.admin.Interceptor.AuthInterceptor  : //user/login,methodName:login,auth result:true
2023-07-05 21:17:51.784  INFO 7 --- [http-nio-2097-exec-2] c.jhl.admin.Interceptor.AuthInterceptor  : //user/info,methodName:getUserInfo,auth result:true
2023-07-05 21:18:03.728  INFO 7 --- [http-nio-2097-exec-3] c.jhl.admin.Interceptor.AuthInterceptor  : //user/login,methodName:login,auth result:true
2023-07-05 21:20:38.391  INFO 7 --- [http-nio-2097-exec-4] c.jhl.admin.Interceptor.AuthInterceptor  : //user/info,methodName:getUserInfo,auth result:true
2023-07-05 21:20:47.359  INFO 7 --- [http-nio-2097-exec-5] c.jhl.admin.Interceptor.AuthInterceptor  : //server,methodName:findByPage,auth result:true
  1. v2ray-proxy.log
...
2023-07-05 21:11:07.615  INFO 8 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8091 (http)
2023-07-05 21:11:07.778  INFO 8 --- [main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-07-05 21:11:07.779  INFO 8 --- [main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.16]
2023-07-05 21:11:07.831  INFO 8 --- [main] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2023-07-05 21:11:08.186  INFO 8 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-07-05 21:11:08.188  INFO 8 --- [main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5478 ms
2023-07-05 21:11:09.591 ERROR 8 --- [main] com.jhl.proxy.ProxyServer                : netty start exception:{}

java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_242]
        at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_242]
        at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_242]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220) ~[na:1.8.0_242]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:551) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1346) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:503) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:488) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:985) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:247) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:344) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-all-4.1.43.Final.jar!/:4.1.43.Final]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_242]

2023-07-05 21:11:09.621  INFO 8 --- [task thread] com.jhl.service.MonitorService           : TrafficController:0,ReporterQueue:0,ConnectionPool:0,AccountCache:0
2023-07-05 21:11:09.624  INFO 8 --- [task thread] com.jhl.service.MonitorService           : netty是否使用直接内存:true,使用量(-1为无法探知)B:0
2023-07-05 21:11:11.074  INFO 8 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8091 (http) with context path ''
2023-07-05 21:11:11.081  INFO 8 --- [main] com.jhl.V2rayProxyApplication            : Started V2rayProxyApplication in 11.254 seconds (JVM running for 13.135)

期望结果?

应当可以在 web 面板管理我已在使用中的 v2ray 服务器。

辛苦大大看一眼,我的用法是不是正确的。🎇

@miaomangdelang
Copy link

显示端口被占用,
listen 6666 ssl http2;
listen [::]:6666 ssl http2;

这两个配置改一个试一下

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

2 participants