Jboss 7 CLI - unable to start interactive mode but gui mode works - jboss

The jboss CLI does not seem to start when it was working a few hours back. I was using the CLI to setup JNDI data source and setting up two way SSL for certificate based authentication using the elytron framework.
kerth#ubuntu:~/jboss-eap-7.1/bin$ ./jboss-cli.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /]
kerth#ubuntu:~/jboss-eap-7.1/bin$ echo $?
0
Starting the Jboss CLI with -c or --connect also does not enter the interactive mode. It just exits with a exit code 0 without any error.
kerth#ubuntu:~/jboss-eap-7.1/bin$ ./jboss-cli.sh -c
[standalone#localhost:9990 /]
kerth#ubuntu:~/jboss-eap-7.1/bin$ echo $?
0
The gui mode of the CLI(./jboss-cli.sh --gui) however works. Not sure if i am missing something.
Enabling the Jboss CLI logging does not have any ERROR or WARN logs.
Using a freshly downloaded installation zip of jboss 7.1 and trying to start the CLI also does not work(No environment variables set). A freshly downloaded Jboss 7.2 CLI however works.
Any help is appreciated. Thanks
I am using the default interfaces,
Jboss version - 7.1 update 4,
OS - Ubuntu 18

Either your code pasted is wrong or I think you are missing "connect" before you connect you can't work with the CLI.
Execute the cli with ./jboss-cli.sh
type "connect" withouth the quotation marks.
Execute the desired commands
type "exit"
or alternatively you could do ./jboss-cli.sh -c to connect as well.

Related

Cannot complete pgadmin4 setup. Apache web server

I've got problem with completing pgadmin4 installation thru sudo /usr/pgadmin4/bin/setup-web.sh command.
During this process instalator does not recognizing that Apache is running and asks me if I want to start it:
The Apache web server is not running. We can enable and start the web server for you to finish pgAdmin 4 installation. Continue (y/n)? y
Then it just spits some errors:
Too few arguments.
Error enabling . Please check the systemd logs
Too few arguments.
Error starting . Please check the systemd logs
So far I havn't found where the logs are stored.
About my apache, I am quite sure that my server is running, because I can connect to it through browser, phpmyadmin is working properly, and service apache2 status returns * apache2 is running. By my understanding apache2 is just fancy word for httpd service, and there is no other service called simply apache.
PostgreSQL seems to work properly from command line, haven't tested if I can connect to it yet, but this shouldn't be the case right?
I am using
**PostgreSQL:** 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1)
**Ubuntu:** Ubuntu 20.04 LTS
**Server:** Apache/2.4.41 (Ubuntu)
I had the same issue for Debian 10 and Ubuntu 20. The /usr/pgadmin4/bin/setup-web.sh script is using 'uname -a' which doesn't contain "Debian" identifier in the return string. Updating this to read /proc/version will allow APACHE to be specified as the Debian variant of apache2.
Change:
UNAME=$(uname -a)
To:
UNAME=$(cat /proc/version)
I had a similar problem with Ubuntu running inside WSL 2. Managed to resolve it by modifying the /usr/pgadmin4/bin/setup-web.sh script. I moved these lines outside of the conditional:
IS_DEBIAN=1
APACHE=apache2
This allowed the installation to progress beyond the Too few arguments. error. There was still an error however:
System has not been booted with systemd as init system (PID 1). Can't operate.
Error restarting apache2. Please check the systemd logs
I resolved this by running:
sudo service apache2 restart
After this I tried bringing up the admin page by visiting http://127.0.0.1/pgadmin4 from the Windows host. This still didn't work, and had to connect using the Ubuntu machine's ip address (you can find it out via ifconfig) which finally allowed me to see the login page.

Eclipse remote application debug doesn't use specified login shell

I'm trying to use Eclipse CDT to debug my application. I've got it set to use SSH to connect to the local machine, but the setting for the login shell isn't working. Regardless of what I set the login shell to, it just uses bash and nothing else.
I'm using Eclipse CDT Version: Oxygen.3a Release (4.7.3a), Build id: 20180405-1200
Here's the settings I have for the Run Configuration. Also see the screenshot.
Configuration type: C/C++ Remote Application
Connection: Localhost (the one described below)
Remote Absolute File Path: /usr/local/bin/myApplication (Eventually I'm going to add something to copy it here even when debugging. That's not important right now.)
Commands to execute before application: ps (To see what shell is really running.)
Here's the settings I have for the connection named "Localhost". Also see the screenshot.
Host: 127.0.0.1
User: the main user I'm logged in to the machine as
Public key-based authentication, no password.
Use login shell: Yes
Login shell command: /bin/csh (I'm not actually interested in csh, it's just a test to verify that this setting has some effect.)
When I run, I get this output:
Last login: Fri May 11 19:22:36 2018 from localhost
ps;/usr/local/bin/myApplication;exit
[dyaw#localhost ~]$ ps;/usr/local/bin/myApplication;exit
PID TTY TIME CMD
35794 pts/7 00:00:00 bash
35844 pts/7 00:00:00 ps
-bash: /usr/local/bin/myApplication: No such file or directory
logout
So, as process 35794 says, it's definitely running bash, not csh, as the shell.
Is there some setting I need to set in order for this setting to take effect? Is there some global Eclipse setting, or perhaps something with my SSH config?
Note: I'm tagging this as both eclipse and eclipse-cdt because I'm using CDT, but I believe the run dialog is the same as in regular Eclipse.

Not able to access Fuse Admin console

I have started server using fuse_home/bin/start. Server is appearing as started but not able to access Admin console.
It is showing hawtio screen instead.
Appreciate any direction.
Try creating a fabric first, by using the fabric:create command.
Fuse can be started in two ways one is using ./fuse script from bin dir
Another starting in background ./start and connect using ./client
./client connect to running fuse karaf console
[kkakarla#kkakarla bin]$ ./start
[kkakarla#kkakarla bin]$ ./status
Running ...
[kkakarla#kkakarla bin]$ ./client
Logging in as admin
Open a browser to http://localhost:8181 to access the management console
Create a new Fabric via 'fabric:create'
or join an existing Fabric via 'fabric:join [someUrls]'
Hit '' or 'osgi:shutdown' to shutdown JBoss Fuse.
JBossFuse:admin#root>
Please make sure you uncommented last line user.properties file before starting the fuse server. Fuse provides access to fuse management console using HOWTIO. Since you are starting fuse by using /.start you may not be able to create fabric directly until you connect to client, in that case you can connect to fuse server using SSH #localhost -p8101, then you can run fabric: create. Otherwise you can /.stop the server and start using ./fuse or ./karaf then you can run fabric commands directly. If still issue not resolved we have to check logs.

Can't stop or restart JBoss AS 4.2.3 as a service in Fedora

i have a little issue with a Jboss AS 4.2.3 . I'm developing an application in Seam so i'm using Jboss as server. In the client company they have a Jboss AS 4.2.3 installed on Fedora and configured as a service, so it starts automatically on boot machine with PostgreSQL. So, if i run chkconfig --list i can see Jboss here as a service.
But the problem is when i try to restart, stop or start this service (i have root permissions) using this command:
service jboss stop/restart
But i don't know what happens that looks like it doesn't find the Jboss AS instance that's running because i get this message:
JOBSS_CMD_START = cd /opt/java/jboss/bin; /opt/java/jboss/bin/run.sh -c default
No JBossas is currently running
But it's running because if i enter localhost:8080 on a browser it loads the Jboss page. The server admin of the company doesn't know also why the service can't restart or stop or start and only i know that he followed this tutorial to install and configure JBoss AS:
thewiki4opentech.org/index.php/How_to_install_JBoss_AS_in_CentOS_/RedHat/_Fedora
Also, i tried with
/etc/init.d/jboss stop
And i get the same output. If i use
/opt/java/jboss/bin/start.sh -c default
It tries to start a second instance of Jboss AS but it gives me errors because is trying to use the same ports as already started Jboss instance.
And it's difficult to me because i'm connecting remotely using Teamviewer and i want to deploy an EAR but i can't because i can't restart the service to extract the ear. So i wanna ask you for help if you know why the Jboss AS that's running can't be stopped or started using service jboss stop.
As aditional info, i'm using the config to access Jboss apps from other machines (using 0.0.0.0) and the server has a static IP. The config of my hosts file is this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.106 entertechserver.localdomain entertechserver
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Regards.
Well, i think that i found the answer. The server admin copy the script run.sh to /etc/init.d/ but we saw that there's another script named jboss_init_redhat.sh that i think is optimized for redhat/fedora systems, so we used this script to copy to /etc/init.d/ and it works!! Now when i stop it gives me the next output:
JBOSS_CMD_START = cd /opt/java/jboss/bin; /opt/java/jboss/bin/run.sh -c default -b 0.0.0.0
waiting for processes to stop
Really i haven't seen the difference between both scripts yet but it will be intersting to take a look.
Regards.

jboss-5.1.0.GA auto start on boot

I was given the task of installing jboss-5.1.0.GA on a remote ubuntu 10.4 Lts server. With all those resources out there I was able to run jboss successfully but my problem was that I wasn't able to get auto start on boot work so that jboss would be running on the server.
I followed a couple of tutorials that said me create a separate user called jboss and to copy the jboss_init_Redhat.sh to the /etc/init.d/jboss (jboss home, java path ,jboss user and the binding to 0.0.0.0 is all set) and used /etc/init.d/jboss start
but I can't get to see the Jboss page at the Ip on a browser.,
If i do a ./run.sh -b 0.0.0.0 ==> the server is up ...
Can some body shed some light on this issue????
If you want to run JBoss AS on given interface using jboss_init_redhat.sh script look at these line:
#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b $JBOSS_HOST"}
You should just define new variable before these line:
JBOSS_HOST="0.0.0.0"
You should also check shutdown command (especially when you run your server on some other address then 127.0.0.1 or 0.0.0.0), it should know how to find your server:
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown -s jnp://${JBOSS_HOST}:1099"}