forgerock openam ssoadm STS configuration error while running create-sub-cfg - single-sign-on

I am getting the following exception while running ssoadm's create-sub-cfg on forgerock openam13 version. I would appreciate any leads or hints to resolve this. Thanks
Command:
create-sub-cfg --servicename RestSecurityTokenService --subconfigname "test" --realm myrealm --datafile mydir1/my_realm_sts_attrs.properties
Exception:
Executing class, com.sun.identity.cli.schema.AddSubConfiguration.
com.sun.identity.cli.CLIException: Message:Unable to add subConfig test
at com.sun.identity.cli.schema.AddSubConfiguration.addSubConfigToRealm(AddSubConfiguration.java:150)
at com.sun.identity.cli.schema.AddSubConfiguration.handleRequest(AddSubConfiguration.java:103)
at com.sun.identity.cli.SubCommand.execute(SubCommand.java:296)
at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:217)
at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:139)
at com.sun.identity.cli.CommandManager.serviceRequestQueue(CommandManager.java:576)
at com.sun.identity.cli.CommandManager.<init>(CommandManager.java:173)
at com.sun.identity.cli.CommandManager.main(CommandManager.java:150)
Caused by: Message:Unable to add subConfig test
at com.sun.identity.sm.ServiceConfig.addSubConfig(ServiceConfig.java:343)
at com.sun.identity.cli.schema.AddSubConfiguration.addSubConfig(AddSubConfiguration.java:228)
at com.sun.identity.cli.schema.AddSubConfiguration.addSubConfigToRealm(AddSubConfiguration.java:131)
... 7 more
Unable to add subConfig test
Command process exited with value 127

You might want to have a look at OPENAM-8006
You probably need to replace:
--subconfigname "test"
with
--subconfigid "test"

Related

Failed to read postmaster.pid file while running embedded-postgres

My Spring application uses yandex-qatools/postgresql-embedded for executing Unit Tests.
While executing them, I am constantly getting the below error :
ERROR 75847 --- [ Test worker] r.y.q.embed.postgresql.PostgresProcess : Failed to read PID file (File '/var/folders/sh/xr6l_7bs1_z9v1jfsyctc45w0000gp/T/postgresql-embed-b05c213f-7416-4200-a586-a3afb3263478/db-content-4f285249-22ea-4625-b771-156adbf5851f/postmaster.pid' does not exist)
java.io.FileNotFoundException: File '/var/folders/sh/xr6l_7bs1_z9v1jfsyctc45w0000gp/T/postgresql-embed-b05c213f-7416-4200-a586-a3afb3263478/db-content-4f285249-22ea-4625-b771-156adbf5851f/postmaster.pid' does not exist
There is a warning popped up before the exception, but for now, let's ignore it.
WARN 75847 --- [ Test worker] r.y.q.embed.postgresql.PostgresProcess : Possibly failed to run initdb:
no data was returned by command ""/private/var/folders/sh/xr6l_7bs1_z9v1jfsyctc45w0000gp/T/postgresql-embed-b05c213f-7416-4200-a586-a3afb3263478/pgsql-10.3-1/pgsql/bin/postgres" -V"
The program "postgres" is needed by initdb but was not found in the
same directory as "/private/var/folders/sh/xr6l_7bs1_z9v1jfsyctc45w0000gp/T/postgresql-embed-b05c213f-7416-4200-a586-a3afb3263478/pgsql-10.3-1/pgsql/bin/initdb".
Check your installation.
I verified that no other instance of Postgress is running on my local machine using
ps -ef|grep postgres
Followed this thread as well, but it doesn't help.
Ran out of options to fix this, can anyone please suggest how to resolve it.
OSX version: 12.1
Thanks in advance
In my case, besides your error, I also could see the following error:
r.y.q.embed.postgresql.PostgresProcess : Possibly failed to run initdb:
initdb: invalid locale settings; check LANG and LC_* environment variables
This message led me to the solution. I just added the below environment properties to my .zshrc file:
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"

Could not find or load main class org.h2.tools.Console

I want to connect to h2 console. I have build the code source of keycloak and now I'm under bin repository and i taped the following command
java -cp jar org.h2.tools.Console -url "$url" -user sa -password ""
to connect to h2 console but I get the following error
Error: Could not find or load main class org.h2.tools.Console
Caused by: java.lang.ClassNotFoundException: org.h2.tools.Console
I would use this approach instead, it should resolve the resolution of the class:
java -cp h2-1.4.200.jar org.h2.tools.Console
This would launch the console. Please adapt accordingly with regards to the directory you're launching java from.
Please keep in mind the console requires you to enter credentials in the console webapp.

while start the bro the error is coming "error occurred while trying to send mail: send-mail: SENDMAIL-NOTFOUND not found"

I've installed the Bro IDS but when I try to start the service an error is coming that :
Error: error occurred while trying to send mail: send-mail: SENDMAIL-NOTFOUND not found
starting ...
starting bro ...
bro terminated immediately after starting; check output with "diag"
I've already used broctl install and broctl update but still got the same error.
Kindly help
I've checked the configuration file i.e. node.cfg under /nsm/bro/etc and change the default interface eth0 with my system interface.
now bro has started
Bro can run without sendmail present but you may have been hit by a bug in Bro where it failed to include the Sendmail location in the config files. Whilst it says the bug was supposed to be fixed I've also seen the problem in Bro-2.5. So an easy fix is to do as suggested in the bug report and add the SendMail = /usr/sbin/sendmail to /usr/local/bro/etc/broctl.cfg and then rerun the deployment command:
sudo /usr/local/bro/bin/broctl deploy

Error CREATEing SolrCore ... Specified config does not exist in Zookeeper:default

I used the following command:
./solr -e cloud -z localhost:2181 -noprompt
The final message is the following:
{
"responseHeader":{
"status":0,
"QTime":1616},
"failure":{
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'gettingstarted_shard2_replica1': Unable to create core [gettingstarted_shard2_replica1] Caused by: Specified config does not exist in ZooKeeper:default",
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'gettingstarted_shard1_replica1': Unable to create core [gettingstarted_shard1_replica1] Caused by: Specified config does not exist in ZooKeeper:default",
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'gettingstarted_shard2_replica2': Unable to create core [gettingstarted_shard2_replica2] Caused by: Specified config does not exist in ZooKeeper:default",
"":"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'gettingstarted_shard1_replica2': Unable to create core [gettingstarted_shard1_replica2] Caused by: Specified config does not exist in ZooKeeper:default"}}
Confirmed zookeeper is running
[zk: localhost:2181(CONNECTED) 0]
I looked almost everywhere and cannot overcome. Can anyone help?
I recently downloaded and installed solr 4.10.3, was going through the official Quick Start using the command:
bin/solr start -e cloud -noprompt
and encountered the same looking exceptions as you:
"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'gettingstarted_shard2_replica2': Unable to create core [gettingstarted_shard2_replica2] Caused by: Specified config does not exist in ZooKeeper:default"
Looking up in the bash I also saw the error line:
bin/solr: line 1085: jar: command not found
This was the reason for the exceptions, the "jar" command was not in the current path. After putting the "jar" command inside my path, these exceptions do not show up. It might be the same reason why you are getting the exceptions.
I am on a Fedora machine, and used the following guide to set up jar, java, javac etc. via the alternatives command (but I think you could just add the java/bin directory to your current path to solve the issue):
https://ask.fedoraproject.org/en/question/59412/cannot-find-oracle-jdk-on-fedora-21/

Liferay ant deploy failed

I am trying to deploy my first "hello-world"-portlet for Liferay
but I get a "BUILD FAILED" when deploying it.
My folders look like this:
D:\[Code Home]\bundles\liferay-portal-6.2-ce-ga2
and
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets
My build.[username].properties file contains this:
app.server.portal.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\tomcat- 7.0.42\\webapps\\ROOT
app.server.lib.global.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\lib\\ext
app.server.deploy.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\tomcat-7.0.42\\webapps
app.server.type = tomcat
app.server.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\tomcat-7.0.42
When deploying the portlet I get this:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets>ant deploy
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; sup
port was removed in 8.0
Buildfile: D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets\build.xml
deploy:
BUILD FAILED
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common-plugins.xml:57: The
following error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:1387: The follow
ing error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:1392: The follow
ing error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:235: The followi
ng error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:993: The followi
ng error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:299: The followi
ng error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:1766: The follow
ing error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:175: D:\[Code Ho
me]\bundles\liferay-portal-6.2-ce-ga2\lib\ext does not exist.
Total time: 0 seconds
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets>
any idea where the problem is?
Seems you are missing auto.deploy.dir value.
Here is my build.properties values.
app.server.type=tomcat
app.server.parent.dir=/home/maleen/workspace/liferay
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.40
app.server.tomcat.deploy.dir=${app.server.tomcat.dir}/webapps
app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext
app.server.tomcat.portal.dir=${app.server.tomcat.dir}/webapps/ROOT
auto.deploy.dir=${app.server.parent.dir}/deploy
Hope this helps.
The error message says
D:\[Code Home]\bundles\liferay-portal-6.2-ce-ga2\lib\ext does not exist.
Does it? If not: You need to either create it (e.g. unzip a bundle at that location) or configure your build.username.properties - what's this?
Look at build.properties - you'll find many values configured in there. Just like with other property files in Liferay, you should identify the value that you want to change from the default, create a file named build.username.properties (replace with your actual username) and override the value that you'd like to change - e.g. app.server.parent.dir is a good candidate to point to your unzipped bundle.
Note that Java8 is not yet officially supported by Liferay: This is a portal that runs on so many existing application server that it's a bit slower in adopting new environments. That's not to say that it won't work - only if you run into Java8 related problems, you might want to try Java7, and be slow to adopt the new features so that you can easily backport.