在MacOS / Windows上,Payara Server 5无法通过控制台启动

如何解决在MacOS / Windows上,Payara Server 5无法通过控制台启动

macOS 中,我尝试将Payara ServerNetbeans 12一起使用,并且得到:

Launching Payara Server on Felix platform
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@462c1ddf in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Users/joseluisbz/Documentos/Java/payara5-2020-4/glassfish
#!## LogManagerService.postConstruct : templateDir=/Users/joseluisbz/Documentos/Java/payara5-2020-4/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Users/joseluisbz/Documentos/Java/payara5-2020-4/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Users/joseluisbz/Documentos/Java/payara5-2020-4/glassfish/domains/domain1/config/logging.properties
  Running Payara Version: Payara Server  5.2020.4 #badassfish (build 817)|#]
  Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter|#]
  HV000001: Hibernate Validator 6.1.2.Final|#]
  [192.168.0.11]:4900 [development] [3.12.6] Connection[id=1,/192.168.0.11:49587->/192.168.0.11:5900,qualifier=null,endpoint=[192.168.0.11]:5900,alive=false,type=NONE] closed. Reason: Exception in Connection[id=1,alive=true,type=NONE],thread=hz._hzInstance_1_development.IO.thread-in-0
java.lang.IllegalStateException: Unknown protocol: RFB
    at com.hazelcast.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:107)
    at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:135)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:369)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:354)
    at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:280)
    at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:235)
|#]

然后通过控制台在我的位置(我将payara5目录重命名为payara5-2020-4)。

% pwd
.../payara5-2020-4/glassfish/bin
%

为了解决第一个问题:

% ./asadmin set-hazelcast-configuration --enabled=false
Remote server does not listen for requests on [localhost:4848]. Is the server up?
No such local command: set-hazelcast-configuration.  Unable to access the server to execute the command remotely.  Verify the server is available.
Command set-hazelcast-configuration failed.
%

在我尝试起床之后...

% ./asadmin start-domain domain1
Waiting for domain1 to start ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
No response from the Domain Administration Server (domain1) after 600 seconds.
The command is either taking too long to complete or the server has failed.
Please see the server log files for command status.  
Please start with the --verbose option in order to see early messages.
Command start-domain failed.
%

然后,我正尝试详细说明选项(如建议)...

% ./asadmin start-domain domain1  --verbose
Command start-domain only accepts one operand
...

% ./asadmin --verbose start-domain domain1
Invalid option: --verbose
...

% ./asadmin -v start-domain domain1       
Invalid option: -v
...

% ./asadmin start-domain domain1  -v       
Command start-domain only accepts one operand
...

常见信息

Usage: asadmin [asadmin-utility-options] start-domain
    [-v|--verbose[=<verbose(default:false)>]]
    [--upgrade[=<upgrade(default:false)>]]
    [-w|--watchdog[=<watchdog(default:false)>]]
    [-d|--debug[=<debug(default:false)>]]
    [-n|--dry-run[=<dry-run(default:false)>]]
    [--drop-interrupted-commands[=<drop-interrupted-commands(default:false)>]]
    [--prebootcommandfile <prebootcommandfile>]
    [--postbootcommandfile <postbootcommandfile>] [--domaindir <domaindir>]
    [-?|--help[=<help(default:false)>]] [domain_name]

可悲的是,我坚信Payara是不成熟的产品。

但是,如何解决所有这些错误/错误?

编辑:

我正在使用Windows 10 PRO

Netbeans 12 上进行测试
Launching Payara Server on Felix platform
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@586f5c68 in service registry.
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:109)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: A MultiException has 2 exceptions.  They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfish-batch-connector [102]],State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
    implementation=org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector
    name=batch-runtime-configuration
    contracts={org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector,org.jvnet.hk2.config.ConfigInjector}
    scope=javax.inject.Singleton
    qualifiers={org.jvnet.hk2.config.InjectionTarget}
    descriptorType=CLASS
    descriptorVisibility=NORMAL
    metadata=@table-suffix={optional,default\:,datatype\:java.lang.String,leaf},@data-source-lookup-name={optional,@table-prefix={optional,@schema-name={optional,default\:APP,@executor-service-lookup-name={optional,default\:concurrent/__defaultManagedExecutorService,target={org.glassfish.batch.spi.impl.BatchRuntimeConfiguration},Bundle-SymbolicName={fish.payara.server.internal.batch.glassfish-batch-connector},Bundle-Version={5.2020.4}
    rank=0
    loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfish-batch-connector [102]],State = [NEW],1228963996)
    proxiable=null
    proxyForSameScope=null
    analysisName=null
    id=170
    locatorId=0
    identityHashCode=373437697
    reified=false)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2247)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:438)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:457)
    at org.jvnet.hk2.config.DomDocument$InjectionTargetFilter.matches(DomDocument.java:184)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getDescriptors(ServiceLocatorImpl.java:347)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getDescriptors(ServiceLocatorImpl.java:389)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getBestDescriptor(ServiceLocatorImpl.java:397)
    at org.jvnet.hk2.config.DomDocument.buildModel(DomDocument.java:135)
    at org.jvnet.hk2.config.ConfigModel.parseValue(ConfigModel.java:959)
    at org.jvnet.hk2.config.ConfigModel.<init>(ConfigModel.java:875)
    at org.jvnet.hk2.config.DomDocument.buildModel(DomDocument.java:114)
    at org.jvnet.hk2.config.DomDocument.getModelByElementName(DomDocument.java:162)
    at org.jvnet.hk2.config.ConfigParser.handleElement(ConfigParser.java:165)
    at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:101)
    at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:95)
    at org.glassfish.config.support.DomainXml.parseDomainXml(DomainXml.java:271)
    at org.glassfish.config.support.DomainXml.run(DomainXml.java:121)
    at org.jvnet.hk2.config.ConfigurationPopulator.populateConfig(ConfigurationPopulator.java:58)
    at org.glassfish.hk2.bootstrap.HK2Populator.populateConfig(HK2Populator.java:83)
    at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:190)
    at com.sun.enterprise.module.bootstrap.Main.createServiceLocator(Main.java:249)
    at org.jvnet.hk2.osgiadapter.HK2Main.createServiceLocator(HK2Main.java:95)
    at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:95)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishRuntimeDecorator.newGlassFish(GlassFishRuntimeDecorator.java:68)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.newGlassFish(OSGiGlassFishRuntime.java:91)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:125)
    ... 6 more
Caused by: com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfish-batch-connector [102]],State = [NEW]
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:193)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:54)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2239)
    ... 31 more
Caused by: org.osgi.framework.BundleException: Unable to resolve fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0): missing requirement [fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.jbatch.spi) [caused by: Unable to resolve fish.payara.server.internal.batch.payara-jbatch [311](R 311.0): missing requirement [fish.payara.server.internal.batch.payara-jbatch [311](R 311.0)] osgi.wiring.package; (osgi.wiring.package=org.glassfish.weld) [caused by: Unable to resolve fish.payara.server.internal.web.weld-integration [372](R 372.0): missing requirement [fish.payara.server.internal.web.weld-integration [372](R 372.0)] osgi.wiring.package; (&(osgi.wiring.package=org.glassfish.web.deployment.descriptor)(version>=5.2020.0)(!(version>=6.0.0))) [caused by: Unable to resolve fish.payara.server.internal.web.glue [360](R 360.0): missing requirement [fish.payara.server.internal.web.glue [360](R 360.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.catalina)(version>=5.2020.0)(!(version>=6.0.0))) [caused by: Unable to resolve fish.payara.server.internal.web.core [358](R 358.0): missing requirement [fish.payara.server.internal.web.core [358](R 358.0)] osgi.wiring.package; (&(osgi.wiring.package=org.glassfish.web.loader)(version>=5.2020.0)(!(version>=6.0.0)))]]]] Unresolved requirements: [[fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.jbatch.spi)]
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2281)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.startBundle(OSGiModuleImpl.java:227)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:185)
    ... 33 more
Completed shutdown of GlassFish runtime
We are in non-embedded mode,so fish.payara.server.internal.core.glassfish [113] has nothing to do.

解决方法

错误“未知协议:RFB”来自Hazelcast组件,该组件正在尝试发现可能在端口5900上运行的其他群集实例。在某些操作系统中(通常是在Mac上),该端口被VNC占用(远程桌面),以意外方式响应Payara Server。

在Payara知识库中有针对Payara Enterprise用户的解决方案。我可以使用它,并将在此处复制相关部分。

有多种解决方案:

  • 停止占用端口5900的进程(例如,VNC,默认情况下使用该端口)。或者,您可以更改其端口。然后,Payara Server应该开始运行。
  • 配置Payara服务器以使用其他端口进行Hazelcast。如果根据上述解决方案运行Payara Server,则可以运行命令:asadmin set-hazelcast-configuration --startport=5901
  • 直接编辑目录domain.xml中的glassfish/domains/domain1/config,并将端口5900更改为其他端口。然后照常运行Payara Server。
  • 或在启动时更改Payara Server的Hazelcast端口。首先,用一行config.txt创建一个文本文件set-hazelcast-configuration --startport=5901。然后使用asdamin start-domain --postbootcommandfile config.txt启动Payara Server。文档中的更多信息:https://docs.payara.fish/community/docs/5.2020.4/documentation/payara-micro/asadmin/pre-and-post-boot-scripts.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-