I'm trying to add a user to ActiveMQ Artemis on Windows. I have created an instance and started it. Then I run command:
artemis user add --user admin --password admin --user-command-user another_admin --user-command-password another_admin --role admin --url tcp://localhost:61616
The command fails with message:
The system cannot find the path specified.
The syntax of the command is incorrect.
Connection brokerURL = tcp://localhost:61616
Failed to add user another_admin. Reason: AMQ229220: Failed to load user file: /C:/Program%20Files/apache-artemis-2.26.0-instance1/etc/artemis-users.properties
How to fix?
There is a bug related to how the broker deals with spaces in the path to the user/role files. I've sent a PR to resolve the problem. The fix should be in 2.27.0.
In the mean-time you can work-around the issue by putting the broker instance on a path which has no spaces.
Related
I'm forwarding my IBM MQ v9.1 error logs using splunk forwarder to a centralized cluster to see trends on common error occurring across my distributed messaging systems.
However I'm unable to parse the required fields, since the format of MQ error logs are varying i.e. the severity of the messages could be error, warning, informational, severe and termination and each have different set of fields in itself and are not consistent.
Please let me know if anyone have used regex in splunk for parsing the fields of IBM MQ error logs for v9.1.
I have tried few regex patterns but it wasn't parsing as expected.
I have already referred below link, but that is for v8 and there is a different in format of error logs for v9,
https://t-rob.net/2017/12/18/parsing-mq-error-logs-in-splunk/
Also the splunk user is unable to access the error logs. I have updated below stanza in qm.ini
Filesystem:
ValidateAuth=No
also set chmod -R 755 to /var/mqm/qmgrs/qmName/errors folder.
Though the permissions for the ERROR logs doesn't change whenever it gets updated, when the logs rotate the permissions are revoked and splunk user is not able to read the logs.
Please let me know how to overcome this without adding splunk user to mqm group
I would suggest enabling JSON logging and forward those logs to Splunk which should be able to parse this format.
In IBM MQ v9.0.4 CDS release IBM added the ability to log out to a JSON formatted log, MQ will always log to the original AMQERR0x.LOG files even if you enable the JSON logging. This is included in all MQ 9.1 LTS and CSD releases.
The IBM MQ v9.1 Knowledge Center Page IBM MQ>Configuring>Changing IBM MQ and queue manager configuration information>Attributes for changing queue manager configuration information>Diagnostic message logging>Diagnostic message service stanzas>Diagnostic message services has information on the topic. You can add the following to your qm.ini to have it output the log information to a JSON formatted file called AMQERR0x.json in the standard queue manager errors directory:
DiagnosticMessages:
Service = File
Name = JSONLogs
Format = json
FilePrefix = AMQERR
As noted by the OP the JSON formatted logs do not contain the EXPLANATION or ACTION portion that you see in the normal logs.
In IBM MQ v9.1 you can use the mqrc command to convert the JSON format to the familiar format you see in AMQERR01.LOG.
One simple example is below:
cat <<EOL |mqrc -i json -o text -
{"ibm_messageId":"AMQ9209E","ibm_arithInsert1":0,"ibm_arithInsert2":0,"ibm_commentInsert1":"localhost (127.0.0.1)","ibm_commentInsert2":"TCP/IP","ibm_commentInsert3":"SYSTEM.DEF.SVRCONN","ibm_datetime":"2018-02-22T06:54:53.942Z","ibm_serverName":"QM1","type":"mq_log","host":"0df0ce19c711","loglevel":"ERROR","module":"amqccita.c:4214","ibm_sequence":"1519282493_947814358","ibm_remoteHost":"127.0.0.1","ibm_qmgrId":"QM1_2018-02-13_10.49.57","ibm_processId":4927,"ibm_threadId":4,"ibm_version":"9.1.0.5","ibm_processName":"amqrmppa","ibm_userName":"johndoe","ibm_installationName":"Installation1","ibm_installationDir":"/opt/mqm","message":"AMQ9209E: Connection to host 'localhost (127.0.0.1)' for channel 'SYSTEM.DEF.SVRCONN' closed."}
EOL
The output will be:
02/22/2018 06:54:53 AM - User(johndoe) Program(amqrmppa)
Host(0df0ce19c711) Installation(Installation1)
VRMF(9.1.0.5) QMgr(QM1)
Time(2018-02-22T11:54:53.942Z)
RemoteHost(127.0.0.1)
CommentInsert1(localhost (127.0.0.1))
CommentInsert2(TCP/IP)
CommentInsert3(SYSTEM.DEF.SVRCONN)
AMQ9209E: Connection to host 'localhost (127.0.0.1)' for channel
'SYSTEM.DEF.SVRCONN' closed.
EXPLANATION:
An error occurred receiving data from 'localhost (127.0.0.1)' over TCP/IP. The
connection to the remote host has unexpectedly terminated.
The channel name is 'SYSTEM.DEF.SVRCONN'; in some cases it cannot be determined
and so is shown as '????'.
ACTION:
Tell the systems administrator.
----- amqccita.c : 4214 -------------------------------------------------------
You can also use mqrc with just the error message from the JSON, for example AMQ9209E, you can run the command like this:
mqrc AMQ9209E
The output will be:
536908297 0x20009209 rrcE_CONNECTION_CLOSED
536908297 0x20009209 urcMS_CONN_CLOSED
MESSAGE:
Connection to host '<insert one>' for channel '<insert three>' closed.
EXPLANATION:
An error occurred receiving data from '<insert one>' over <insert two>. The
connection to the remote host has unexpectedly terminated.
The channel name is '<insert three>'; in some cases it cannot be determined and
so is shown as '????'.
ACTION:
Tell the systems administrator.
You could take it further and specify the inserts from the JSON:
Exmple portion of the JSON log:
"ibm_messageId":"AMQ9209E","ibm_arithInsert1":0,"ibm_arithInsert2":0,"ibm_commentInsert1":"localhost (127.0.0.1)","ibm_commentInsert2":"TCP/IP","ibm_commentInsert3":"SYSTEM.DEF.SVRCONN"
In the command below each ibm_arthInsert is specified with a proceeding -n flag in order following by each ibm_commentInsert with a proceeding -c flag:
mqrc AMQ9209E -n 0 -n 0 -c "localhost (127.0.0.1)" -c "TCP/IP" -c "SYSTEM.DEF.SVRCONN"
The output is below:
536908297 0x20009209 rrcE_CONNECTION_CLOSED
536908297 0x20009209 urcMS_CONN_CLOSED
MESSAGE:
Connection to host 'localhost (127.0.0.1)' for channel 'SYSTEM.DEF.SVRCONN'
closed.
EXPLANATION:
An error occurred receiving data from 'localhost (127.0.0.1)' over TCP/IP. The
connection to the remote host has unexpectedly terminated.
The channel name is 'SYSTEM.DEF.SVRCONN'; in some cases it cannot be determined
and so is shown as '????'.
ACTION:
Tell the systems administrator.
I'm trying to create a jdbc-connection-pool using payara on the console. Using ./asadmin on Payara_Server/bin/
It is Running on Linux and the credentials for the database are user=jc and password=hola123 (dummies), It is for sure this credentials work. I tried them on Mariadb.
I create a connection pool using ./asadmin on Payara, it looks like this:
./asadmin create-jdbc-connection-pool --datasourceclassname org.mariadb.jdbc.MariaDbDataSource
--restype javax.sql.DataSource --property user=jc:password=hola123:DatabaseName=cinev2:ServerName=localhost:port=3306 cinePool
Now, when I try:
./asadmin ping-connection-pool
I get an error like this:
remote failure: Ping Connection Pool failed for cinePool.
Connection could not be allocated because:
Access denied for user 'jc'#'localhost' to database 'cinev2' Please check the server.log for more details.
Command ping-connection-pool failed.
What would be the causes of this Issue other than Credentials? I have checked if the credentials are right and they are, So I've no clue on the issue.
Since it works when locally connecting to the DB it probably really is an access issue.
Please check if you did all steps outlined here: Access denied for user 'root'#'localhost' (using password: YES) after new installation on Ubuntu
I have recently installed GlassFish v4.1.1 on my computer (Windows 8.1).
When I execute my GlassFish Server and enter in the administration webpage(http://localhost:4848/common/index.jsf from the NetBeans project), I obtain:
When, when I press the button "Create New JDBC Resource" or "Create new JDBC Connection Pool" the following error appears:
I really do not understand what is going on. Could you help me please ?
Thank you so much for your help.
I'm facing the same issue and I found a solution: instead of creating the connection pool using my IDE (Netbeans), I used the command line:
My DB username is root with an empty password and I'm working on my localhost.
My table is named tmpDb and the pool myPool3.
Here is the used command
$> cd "c:\Program Files\glassfish4\bin"
$> asadmin create-jdbc-connection-pool --restype javax.sql.DataSource --datasourceclassname org.apache.derby.jdbc.ClientDataSource --validationmethod table --validationtable DUAL --property User=root:Password="":ServerName=localhost:tmpDb --ping true myPool3
Does this work for you?
I am having a problem with my server and so far couldn't find any solution for this. When I try to add a server from a server manager (windows server 2012) I can see only the kerberos security error. Both servers are in the same domain(i have tried from several servers from domain and got the same error).
The strange thing is when I unjoin the problematic server from domain and rejoin it with another name it works normally. But the problem is to make it work with existing name. Anyhelp will be highly appreciated
thanks in advance.
Late reply, but I've just encountered the same error and hope this solution proves useful to others.
Situation: I had to wipe and reinstall a virtual server on which I'd previously had to set some Service Principal Names, and some SPNs for a service account. Turns out the SPNs were still there for the old server/account and I had to remove them.
I recommend checking for and removing rogue SPNs to resolve this. Use the following commands in an elevated command prompt:
setspn -l <servername/username>
In my case I had problems with MBAM, the Bitlocker admin tool, so for example I used:
setspn -l mbam01
Which gave me the output (changed names to protect the innocent):
Registered ServicePrincipalNames for CN=MBAM01,OU=Member Servers,DC=corp,DC=domainname,DC=com:
termserv/mbam01.corp.domainname.com
termserv/mbam01
http/mbam01.corp.domainname.com
http/mbam01
HOST/MBAM01
HOST/mbam01.corp.domainname.com
This will list the SPNs associated with the server or user account. Then you remove the errant SPNs with this command:
setspn -d <listed service> <servername/username>
In my case it turned out the mbamapppool user had http/mbam01 and http/mbam01.corp.domainname.com associated with it, causing Server Manager to fail to poll the server. I removed the http/ refs from the user and then added them to the server with the following commands:
setspn -d http/mbam01 corp\mbamapppooluser
setspn -d http/mbam.corp.domainname.com corp\mbamapppooluser
setspn -s http/mbam01 mbam01
setspn -s http/mbam01.corp.domainname.com mbam01
I then refreshed Server Manager and it polled the server successfully, and the Kerberos Security Error had gone.
I am having trouble with my Oracle instance.
I get the following error when I run lsnrctl stat in command prompt. I even confirmed Oracle services running.
The listener supports no services.
I assume the platform is Windows and the Oracle version is 11g.
When an Oracle database instance starts, it tries to register itself to the default listener or to the listener registered in the init parameters as the local_listener. What you can do is
make sure that your local_listener parameter points to your listener
make sure that your listener runs on localhost port 1521 (using the listener.ora file)
This is when the database is using a dynamic listener. You could also make the listener a static one by entering the instance details in the listener.ora file. Docu about the listener.ora is found here Oracle Net Listener Parameters (listener.ora)
when the listener is created after creation of database,we need to explicitly register our instance.
try:
starting database by doing startup and check the listerner status by lsnrctl status and it your instance is running it means pmon has done registering your instance with the listener itself.
A solution is very simple for this error, first, let's understand why this error occurs. It basically has two reasons which are:
1) Your database and service name is not properly set in Oracle environment it should be same everywhere check below parameter values
-ORACLE_SID in oracle environment.
-Check Database Instance name.
-SID_NAME in tnsnames.ora file.
-SERVICE_NAME in listener.ora file.
2) Host name/IP address is missing, not correct or spelling mistake, so please check the below.
-Check the IP ADDRESS in /etc/hosts file.
-It should be same in listener.ora and tnsnames.ora file
-And it should be able to ping from the local and remote server.
Now see I've also faced the same problem and resolved:
please visit this StackOverflow link:
https://stackoverflow.com/a/45065640/6332029
I hope it will help, thanks!
In my case it was easy - for some reason, after restarting my laptop, services stopped working.
So, Run > services > start OracleService helped to start the listener
I had this problem with the latest Oracle 19c version with CentOS 8 installation.
So there is a bug with this Oracle DB instance.
What happens: When you install the ORACLE DB, it automatically creates the listener with an instance. The problem exist in the Hierarchy File System of Linux and how the permission is distributed between the Sudo User group and the non-oracle User.
What you have to do :
Okay to solve this, you have to open your bash profile
***nano ~/.bash_profile***
this is equivalent to environment variables in Windows.
write text in editor: export ORACLE_HOME=/u01/app/oracle/product/{oracle-version}/dbhome_1
Save & Exit
Execute: export ORACLE_HOME=/u01/app/oracle/product/{oracle-version}/dbhome_1
test the environment variable :
Echo $ORACLE_HOME -- should display result
execute chmod 777 /home
execute chown -R oracle /home
open terminal su oracle && cd /u01/app/oracle/product/{oracle-version}/dbhome_1/bin
with oracle account execute ./lsnrctl start -- it should run with no services still
execute: su {root account} && sudo ./dbstart
it should run run with 1 or 2 error.. its fine as long as it doesn't say "ORACLE_HOME is not set"
go back to execute: su oracle && ./lsnrctl status with non root account
That's it.. it should now connect with your service and handler, should give the instance of your db name to connect with. You can use the sys as sysdba and password during installation to log into the database.
After starting the listener service I had to wait 60 seconds before the services would show up as running. So if you enter "lsnrctl stop" followed by "lsnrctl start" you might have to wait a minute before "lsnrctl status" will show your listener services.
I did check all the things but could not find the cause. So I re-installed the Oracle and using that now.