P
P
P_Alexander2018-03-12 16:18:00
Java
P_Alexander, 2018-03-12 16:18:00

Why is wildfly not working on the port I need?

Help me figure it out, (OS ubuntu) installed Wildfly 12 final created a user there and a password for him, from the command line via sudo it runs on port 9990, I go to the start page, everything is fine.
In the idea, I added a server, in the standard configuration it deploys on port 8080, changed it to 9990, then I entered the login and password for the server, I start and get this error,

Application Server was not connected before run configuration stop, reason:
Unable to ping server at localhost:8080
who knows tell me please.
Plus, I notice in the logs that I don’t get access to something, that is, I somehow need to get full rights for an idea, how can I do this?
Log in Ideas
/usr/lib/jvm/jdk1.8.0_162/bin/java -Dfile.encoding=UTF-8 -classpath /home/alex/idea/idea-IU-173.4548.28/lib/idea_rt.jar com.intellij.rt.execution.CommandLineWrapper /tmp/idea_classpath com.intellij.javaee.oss.process.JavaeeProcess 35223 com.intellij.javaee.oss.jboss.agent.JBoss71Agent
/opt/wildfly/bin/standalone.sh
Detected server admin port: 9990
Detected server http port: 8080
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/wildfly

  JAVA: /usr/lib/jvm/jdk1.8.0_162/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
  at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:116)
  at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:335)
  at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:288)
  at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:297)
  at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:546)
  at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
  at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:514)
  at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:476)
  at java.util.logging.LogManager$3.run(LogManager.java:399)
  at java.util.logging.LogManager$3.run(LogManager.java:396)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
  at java.util.logging.LogManager.access$800(LogManager.java:145)
  at java.util.logging.LogManager$2.run(LogManager.java:345)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
  at java.util.logging.LogManager.getLogManager(LogManager.java:378)
  at org.jboss.modules.Main.main(Main.java:513)
Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:114)
  ... 17 more
Caused by: java.io.FileNotFoundException: /opt/wildfly/standalone/log/server.log (Отказано в доступе)
  at java.io.FileOutputStream.open0(Native Method)
  at java.io.FileOutputStream.open(FileOutputStream.java:270)
  at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
  at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:151)
  at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:108)
  at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:189)
  at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:119)
  at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:76)
  ... 22 more
[2018-03-12 03:04:57,789] Artifact unnamed: Waiting for server connection to start artifact deployment...
java.util.concurrent.ExecutionException: JBTHR00005: Operation failed
  at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:253)
  at org.jboss.as.server.Main.main(Main.java:108)
  at org.jboss.modules.Module.runMainMethod(Module.java:348)
  at org.jboss.modules.Module.run(Module.java:328)
  at org.jboss.modules.Main.main(Main.java:557)
Caused by: org.jboss.msc.service.StartException in service jboss.as: Failed to start service
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1706)
  at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
  at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
  at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
  at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: WFLYDR0006: Directory /opt/wildfly/standalone/data/content is not writable
  at org.jboss.as.repository.ContentRepositoryImpl.checkDirectory(ContentRepositoryImpl.java:101)
  at org.jboss.as.repository.ContentRepositoryImpl.<init>(ContentRepositoryImpl.java:83)
  at org.jboss.as.repository.ContentRepository$Factory.addService(ContentRepository.java:185)
  at org.jboss.as.server.ApplicationServerService.start(ApplicationServerService.java:145)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
  ... 6 more

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pi314, 2018-03-12
@P_Alexander

These are two DIFFERENT ports! 9990 for administration, and on 8080 the web connector is standardly bound, i.e. the one through which the user will access the web application. In the Idea, nothing needs to be changed - it initially knows the correct server ports needed.
Exception in the server log only says that the process does not have write permissions to the FOLDER (/opt/wildfly/standalone/log/) where it should write logs. The process (the Idea and, accordingly, the JVM in which it launches Wildfly) starts on behalf of the user alex, who in Ubuntu cannot simply write to /opt like this, which is smart and correct. Accordingly, there are two solutions.
1. Deploy the WIldfly development instance in a folder that the user has write access to, such as /home/alex/wildfly . (In /opt, the server is installed by default, because it is supposed to be used as a combat one).
2. Redirect server logs to where they actually belong in production, for example, to /var/log/...
Which way to choose, decide for yourself. The second option, theoretically, is more correct, but since write access to the logs is far from the only aspect of the security settings, there is a lot more to come. So in order to get started with actually developing a JEE application, the first option is simpler and more efficient. For example, this Wildfly working instance can always be beaten, replaced with a clean copy, to make sure that the application deploys correctly on its own, without any once accidentally made and then successfully forgotten server additions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question