Details
Windows 7 ultimate 32 bit
Java 7
Wildfly 8.2
I have installed WildFly as service successfully using below cmd
service.bat install /controller ip:9990 /user wildfly /password wildfly
But when I am trying to stop with below commands
service.bat stop /controller ip:9990 /user wildfly /password wildfly
service.bat stop
service.bat stop /user wildfly /password wildfly
I have tried removing "CREDENTIALS" from service.bat as mentioned here https://issues.jboss.org/browse/WFLY-3149
and https://developer.jboss.org/thread/238135
even I have set JAVA_HOME in jboss-cli.bat.
But It is not working.
I keep getting below exception in service.log
[2015-07-04 13:50:12] [error] [ 192] Failed to stop 'WildflyS' service
[2015-07-04 13:50:12] [error] [ 192] The service cannot accept control messages at this time.
[2015-07-04 13:50:12] [info] [ 192] Stop service finished.
[2015-07-04 13:50:12] [error] [ 192] Commons Daemon procrun failed with exit value: 6 (Failed to stop service)
[2015-07-04 13:50:12] [error] [ 192] The service cannot accept control messages at this time.
wildflys-stderr.log
The service cannot accept control messages at this time.
Failed to stop servicewildflys-stderr.2015-07-04
Related
We are running Jenkins in Open-shift and its fully up and running. Now, when trying to add a static agents we are getting the 404 not found error.
Agent startup script:
java -jar remoting_dslave.jar -jnlpUrl http://xxx-xxx-xxx.apps.ocp1.uat.dbs.com/computer/xxxxxxxx2a/jenkins-agent.jnlp -secret xxxxxxxxxxxxxxxxxxxxxx -workDir "/dcifent/JenkinsSlaves/ci3_dynamicSlave"
Getting the below error:
WARNING: Connection refused (Connection refused)
Jun 07, 2022 11:17:23 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: http:/xxxxxxxxx.apps.ocp1.uat.dbs.com/ provided port:8080 is not reachable
java.io.IOException: http://xxxxxxxxx.apps.ocp1.uat.dbs.com/ provided port:8080 is not reachable
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:311)
at hudson.remoting.Engine.innerRun(Engine.java:689)
at hudson.remoting.Engine.run(Engine.java:514)
Creted new router in OpenShift for port 8080 updated the startup script as below
java -jar agent.jar -jnlpUrl http://routefor8080.apps.ocp1.uat.dbs.com/computer/xxxxxxxx2a/jenkins-agent.jnlp -secret xxxxxxxxxxxxxxxxx -workDir "/dcifent/JenkinsSlaves/ci3_dynamicSlave"
Getting the different error now.
Failed to obtain http://routefor8080.apps.ocp1.uat.dbs.com/computer/xxxxxxxx2a/jenkins-agent.jnlp?encrypt=true
java.io.IOException: Failed to load http://routefor8080.apps.ocp1.uat.dbs.com/computer/xxxxxxxx2a/jenkins-agent.jnlp?encrypt=true: 404 Not Found
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:517)
at hudson.remoting.Launcher.run(Launcher.java:345)
at hudson.remoting.Launcher.main(Launcher.java:296)
Waiting 10 seconds before retry
How can i connect static agents to dynamic Jenkins, can someone please help?
I have currently installed Keycloak 10.0.2 in domain mode with two servers on Ubuntu 18.04. When running manually as ./domain.sh --host-config=host-master.xml all the services start normally and the system works fine.
I wanted to run Keycloak as a service and followed the steps given in https://medium.com/#hasnat.saeed/setup-keycloak-server-on-ubuntu-18-04-ed8c7c79a2d9. The problem is that the service shows as Active but navigating to the management URL results The site can't be reached error. I checked the generated log file and it seems that the services have started only partially.
2020-06-26 12:53:52,164 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 10.0.2 (WildFly Core 11.1.1.Final) (Host Controller) started in 12675ms - Started 83 of 86 services (28 services are lazy, passive or on-demand)
2020-06-26 12:53:52,238 INFO [org.jboss.as.host.controller] (server-registration-threads - 1) WFLYHC0020: Registering server server-one
Whereas when run manually I see that there are many more services that have started.
[Server:server-one] 13:44:34,349 INFO [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010: Deployed "keycloak-server.war" (runtime-name : "keycloak-server.war")
[Server:server-one] 13:44:34,463 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
[Server:server-one] 13:44:34,475 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 10.0.2 (WildFly Core 11.1.1.Final) started in 30123ms - Started 673 of 979 services (703
services are lazy, passive or on-demand)
Not sure what is going wrong. Need help resolving the issue.
Here are my configuration details:
Service Details
keycloak.service - Keycloak Authentication Server
Loaded: loaded (/etc/systemd/system/keycloak.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-06-26 13:47:12 UTC; 2min 23s ago
Main PID: 116569 (launch.sh)
Tasks: 187 (limit: 9479)
CGroup: /system.slice/keycloak.service
├─116569 /bin/bash /data/keycloak/bin/launch.sh domain domain.xml host-master.xml 0.0.0.0 YES
├─116578 /bin/sh /data/keycloak/bin/domain.sh -c domain.xml --host-config=host-master.xml
/etc/keycloak/keycloak.conf
# The mode you want to run
WILDFLY_MODE=domain
# The configuration you want to run
WILDFLY_DOMAIN_CONFIG=domain.xml
# Host configuration
WILDFLY_HOST_CONFIG=host-master.xml
# The address to bind to
WILDFLY_BIND=0.0.0.0
# Whether this host is a domain controller. If not run with --backup switch
IS_DC=YES
/data/keycloak/bin/launch.sh
#!/bin/bash
WILDFLY_HOME="/data/keycloak"
if [[ "$1" == "domain" ]]; then
if [[ "$5" == "YES" ]]; then
$WILDFLY_HOME/bin/domain.sh -c $2 --host-config=$3
else
$WILDFLY_HOME/bin/domain.sh -c $2 --host-config=$3 --backup
fi
else
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $4
fi
/etc/systemd/system/keycloak.service
[Unit]
Description=Keycloak Authentication Server
After=syslog.target network.target
Before=httpd.service
[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
EnvironmentFile=-/etc/keycloak/keycloak.conf
User=keycloak
Group=keycloak
LimitNOFILE=102642
PIDFile=/var/run/keycloak/keycloak.pid
ExecStart=/data/keycloak/bin/launch.sh $WILDFLY_MODE $WILDFLY_DOMAIN_CONFIG $WILDFLY_HOST_CONFIG $WILDFLY_BIND $IS_DC
StandardOutput=null
[Install]
WantedBy=multi-user.target
I also followed the same Medium tutorial and faced the same issue as you. Turns out that I have to run the service as root user instead of keycloak user. I have no idea why though.
I am trying to start the Kafka Connect component alongside Cloudera and want to wrap the Kafka Connect startup script in a systemd service file such that it can start on boot once the Cloudera services start.
For some strange reason if I start this script outside of systemd it works just fine, but when I start it via systemctl start kafka-connect it just hangs at the following log entry lines.
[Unit]
Description=Kafka Connect - Distributed
After=network.target cloudera-scm-agent
[Service]
Type=forking
ExecStart=/bin/bash -c "/app/cloudera/parcels/KAFKA/lib/kafka/bin/connect-distributed.sh -daemon /app/cloudera/kafka-connect/connect-distributed.properties"
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
2019-07-18 13:40:27,962 INFO (main) [ConnectDistributed(main:69)] Scanning for plugin classes. This might take a moment ...
2019-07-18 13:40:27,992 INFO (main) [DelegatingClassLoader(registerPlugin:184)] Loading plugin from: /app/cloudera/kafka-connect/plugins/splunk-kafka-connect.jar
2019-07-18 13:40:27,993 DEBUG (main) [DelegatingClassLoader(registerPlugin:191)] Loading plugin urls: [file:/app/cloudera/kafka-connect/plugins/splunk-kafka-connect.jar]
2019-07-18 13:40:29,206 DEBUG (main) [VersionUtils(getVersionFromProperties:63)] found git version string=v1.1.0 in version.properties file
2019-07-18 13:40:29,219 INFO (main) [DelegatingClassLoader(scanUrlsAndAddPlugins:207)] Registered loader: PluginClassLoader{pluginLocation=file:/app/cloudera/kafka-connect/plugins/splunk-kafka-connect.jar}
2019-07-18 13:40:29,220 INFO (main) [DelegatingClassLoader(addPlugins:136)] Added plugin 'com.splunk.kafka.connect.SplunkSinkConnector'
2019-07-18 13:40:29,220 INFO (main) [DelegatingClassLoader(addPlugins:136)] Added plugin 'org.apache.kafka.connect.storage.StringConverter'
My next thought was to try something a bit simpler and just create an init.d script at /etc/init.d/kafka-connect which works fine because it is nothing more than a shell script wrapper UNTIL I source in the /etc/init.d/functions file which causes this to be started via systemd again.
Two main questions -
What does systemctl do differently than a regular shell script that would cause this shell script (which in turn launches a java process) to hang at that exact same step everytime.
If my /etc/init.d/kafka-connect script works, is it okay to use on RHEL7? If so, is there a way to load that init.d script on boot of the server?
Thanks in advance!
I have a problem with installing WildFly10. In youtube tutorial here at 8:39 I cannot see "Terminate batch job Y/N?".
If I go to http://localhost:8080/ I can see that my server is running.
My cmd:
C:\wildfly-10.1.0.Final\bin>standalone
Calling "C:\wildfly-10.1.0.Final\bin\standalone.conf.bat"
Setting JAVA property to "C:\Program Files\Java\jdk1.8.0_121\bin\java"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: "C:\wildfly-10.1.0.Final"
JAVA: "C:\Program Files\Java\jdk1.8.0_121\bin\java"
JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman"
===============================================================================
10:28:47,503 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
10:28:47,692 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
*
*
a lot of text
*
*
10:28:49,980 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 2758ms - Started 331 of 577 services (393 services are lazy, passive or on-demand)
So, what should I do to finish tutorial?
As said in youtube link, you need to press Ctrl+c to shutdown server. This will ask you "Terminate batch job Y/N?".
However you can add user without shutting down server.
I am not able to shutdown jboss server with the below command.
Command :
JBOSS_HOME/bin/jboss-cli.sh --connect controller=$SERVER_IP_ADDRESS:$SERVER_PORT command=:shutdown
Each time I was killing the server to restart which is not a good process to do. as we are moving to PROD environment we should use shutdown command to stop the server instead of killing
I am getting the below error. Please help.
Server Log :
jboss#devkopmdmh01.corp.ybusa.net::/usr/local/prod/jboss/jboss-eap-6.1/jboss-as/bin > ./shutdownMDM.sh
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:280)
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at 10.0.15.162:8080
at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:951)
... 8 more
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://10.0.15.162:8080. The connection timed out
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
... 11 more
Caused by: java.net.ConnectException: JBAS012144: Could not connect to remote://10.0.15.162:8080. The connection timed out
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:131)
... 13 more
The JBoss CLI is attempting to connect to the native management endpoint for the running JBoss and send a shutdown command. It looks like it's trying to send to 10.0.15.162:8080 which is not the right port (most likely).
Take a look in your bin/jboss-cli.xml file which should contain the host and port to connect to. For example:
<default-controller>
<host>localhost</host>
<port>9999</port>
</default-controller>