wildfly cli connect fails, running as windows service - wildfly

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.

Related

Postgres pgAdmin Docker Compose: Unable to connect to server connection to server, timeout expired

I'm running a simple Docker Compose script to instantiate Postgres and pgAdmin for local development.
It works fine on Windows via Power Shell as administrator, but in Linux I'm getting this error:
Unable to connect to server connection to server at '172.18.0.3' port 5432 failed: timeout expired
How to solve it?

Perforce client error: Connection refused

So I had been successfully running Perforce on a dedicated Ubuntu 20.04 LTS cloud server for many months. I recently however moved to a different house and now I cannot connect to the server anymore through P4Admin and P4V, and neither can the other users. I've been getting this error in P4Admin:
Connect to server failed; check $P4PORT.
TCP connect to 81.169.151.191:1666 failed.
connect: 81.169.151.191:1666: WSAECONNREFUSED
And get this error when connected to the server in Putty as root user:
p4 info
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to 81.169.151.191:1666 failed.
connect: 81.169.151.191:1666: Connection refused
Has something gone wrong with the server? Anything I can do to restore the connection? My apologies in advance, I'm not an advanced user and have just been trying whatever the tutorials suggest.

Connect to a remote host from terminal works but not from deployment

I was trying to connect to a remote server from the terminal (PyCharm IDE in Mac), and it works.
I tried to connect to the same remote host from Deployment to see the files on the server, and I am getting the error
"host not found"
connecting from tools->deployment->brows remote host error

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

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

set up Apache2 virtual hosts and now MongoDB connection refused

I'm running Ubuntu 14.04 on an AWS EC2 instance with Apache2. This morning I upgraded my Apache2 settings to allow multiple virtual servers following these instructions: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
Just now I tried to access my MongoDB instance, but I cannot do it either through the PHP MongoDB driver or through the shell. I get this error when attempting to connect with a PHP MongoClient():
Failed to connect to: localhost:27017: Connection refused'
and I get this error when trying to run the mongo shell:
2015-06-03T19:23:57.307+0000 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-06-03T19:23:57.308+0000 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Everything was running fine just last night, and I haven't directly modified MongoDB settings. What can I do to fix this? How do Apache2 settings relate to MongoDB? I've been trying to look through the MongoDB docs, but I don't see anything that looks relevant.
You need to setup Security Group for your EC2 instance. And allow Inbound connection for the mongodb port, in your case 27017.
When I went through the logs, I saw a message that there was insufficient room for "journal file." I rebooted my AMI on an EC2 instance with more storage and reinstalled Mongo. That did the trick. I had uploaded a few files to the instance after updating my Apache2 settings, so those few more files must have pushed the instance past what Mongo could tolerate. Too bad the error message wasn't more helpful, but I should have checked the logs sooner. It would also be nice if the logs had a more explicit message.