How do I shutdown JBoss Wildfly when I can't access the CLI tool? - jboss

I"m using Wildfly 10.0.0.CR2 with Java 8. I have Wildfly listening for http connections on port 8080 and in the past have used this command to shut down the server ...
./jboss-cli.sh --connect command=:shutdown
HOwever, occassionally, I'm not able to access this tool, even though the server is still running. Note the interaction below on my Mac ...
Daves-MacBook-Pro-2:bin davea$ ./jboss-cli.sh --connect command=:shutdown
Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0023: Could not connect to http-remoting://localhost:9990. The connection timed out: WFLYPRT0023: Could not connect to http-remoting://localhost:9990. The connection timed out
Daves-MacBook-Pro-2:bin davea$ telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
My question is, what is a foolproof way to shutdown the JBoss server? Note I would prefer a method that does not rely on the CLI tool.

I suspect that it is sometimes unable to connect because I can see on the telnet that localhost is resolving to ipv6 first. have you tried:
./bin/jboss-cli.sh --connect controller=127.0.0.1:9990 command=:shutdown
Short of that you can always just kill the PID:
pgrep -d" " -f "wildfly" | xargs kill;

To stop Wildfly:
$ ./jboss-cli.sh --connect command=:shutdown

Related

wildfly cli connect fails, running as windows service

Wildfly application server is installed and started on windows. I am trying to use the CLI to do a connect which throws the below error. I am able to connect via URL. The jboss-cli.xml is pointing to the 8083 port which I am using. Windows Defender Firewall is off. My question is - Can I connect using CLI when the server is running as a service (It's not launched as standalone). if yes, can someone help me with the error, please?
C:\wildfly\bin> jboss-cli.bat --connect --controller=remote+http://localhost:8083
Failed to connect to the controller:
The controller is not available at localhost:8082:
java.net.ConnectException: WFLYPRT0053: Could not connect to
remote+http://localhost:8082. The connection failed: WFLYPRT0053:
Could not connect to remote+http://localhost:8082. The connection
failed: Connection refused: no further information Press any key to
continue . . .
I also tried the flags --user and --password.

Cant connect with cloud_sql_proxy over tcp

I created a Cloud SQL instance and am trying to connect from my laptop running OSX El Capitan.
I followed the instructions for creating a proxy to run the proxy. I am able to connect if I use a socket file as follows:
sudo ./cloud_sql_proxy -dir=/cloudsql -instances=my-project:us-central1:mysql-instance -credential_file=mycredentials.json
mysql -u root -p -S /cloudsql/my-project:us-central1:mysql-instance
Now I'd like to connect to the Cloud SQL instance from a local python application. So I tried creating the proxy over tcp using =tcp:3306 and testing using the mysql client as follows:
sudo ./cloud_sql_proxy -dir=/cloudsql -instances=my-project:us-central1:mysql-instance=tcp:3306 -credential_file=/web/visi/api/resources/keys/visi-staging-ec040759d57a.json
mysql -u root --host 127.0.0.1 --password
But Im getting this error:
2016/04/06 23:09:58 Got a connection for
"my-project:us-central1:mysql-instance" 2016/04/06 23:09:59
to "my-project:us-central1:mysql-instance" via
111.111.111.111:3307: read tcp 127.0.0.1:3306->127.0.0.1:49518: use of closed network connection ERROR 2026 (HY000): SSL connection error:
error:00000005:lib(0):func(0):DH lib
Try specifying --skip-ssl as an option to your mysql client.
We have a fix for this in progress and should be rolled out in the near future.
The reason this happens is that we reject connections over the proxy that request MySQL SSL. The connection between the proxy and Cloud SQL is already done over SSL so there's no need to use SSL at the MySQL level.

Clearwater IMS Homer & Homestead Module installation error

I have Followed the below path http://clearwater.readthedocs.org/en/stable/Manual_Install/ for installation of Clearwater IMS node-specific modules. But when i was trying to install Homer & Homestead getting as connection refused.
TCP poll failed to 127.0.0.1 9160
nc: connect to 127.0.0.1 port 9160 (tcp) failed: Connection refused
Failed to connect to '127.0.0.1:7199': Connection refused
Due to which i am not able to proceed further.
Can anyone help me here.
the error comes sometimes when your port is not feee or port is using by some other services check once port is free or not

Postgres login via localhost timeout

I've installed Postgres.app and modified the port number to 5466, I've enabled listen_addresses='*'.
I've setup 'trust' in pg_hba.conf.
I can connect through the socket via psql. However, psql -h localhost -p 5466 fails and returns *"server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request."
Port 5466 is mapped to postgresql.
Any help as to why I can connect to the socket, but not to localhost would be appreciated. If i connect on another port an error is returned instantly telling me there is no server there, but when I connect on the correct port the connection hangs and returns the error above.
The problem was a program to monitor internet traffic blocked all ports other than 80: https://github.com/PostgresApp/PostgresApp/issues/169

RMI Connection refused

When I started RMI service and then I tried to connect to it and then an exception happened, which says "connection refused", but I try to telnet to RMI service what can establish the connection. My RMI server running on a Linux machine and client server is a web server.
That sounds like if your RMI-Registry is not running. Usually u can test this if you lookup netstat outputs.
In Linux:
rmiregistry &
You can also test if it is present with
ps aux | grep rmiregistry
Connection refused to what? If it was 127.0.0.1 and you were expecting a remote address, see item A.1 of the RMI FAQ.