Plastic scm global client.conf not working - plasticscm

I'm trying to set proxy server in client.conf globally. But it does not working.
I created plastic-global-config repo on cloud, created "allrepo" folder, added client.conf file in it, committed. But after restarting GUIclient, globalconfig folder doesn't appeared in /local/plastic4 folder.
My client.conf file contains:
<?xml version="1.0"?>
<ClientConfigData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Language>en</Language>
<WorkingMode>LDAPWorkingMode</WorkingMode>
<CacheServer>192.168.1.231:9999</CacheServer>
</ClientConfigData>
What am I doing wrong here?

I'm afraid the "client.conf" is a local client file that cannot be globally configured. Please check the following link where we explain all the available files to be globally configured:
https://www.plasticscm.com/documentation/administration/plastic-scm-version-control-administrator-guide

Related

Bypassing the login page in Guacamole 1.2.0

I have set up Guacamole 1.2.0 on Ubuntu server 20.04 which works great. Is it possible to bypass the login page in Guacamole 1.2.0 using the auth-noauth component from a previous Guacamole release? The release notes in 1.2.0 say the older components are compatible. I used guacamole-auth-noauth-0.9.14.tar.gz, but I still get the Guacamole login page come up.
This is what I did.
Downloaded guacamole-auth-noauth-0.9.14.tar.gz
Extracted the .jar file using tar xzf guacamole-auth-noauth-0.9.14.tar.gz
Copied the file guacamole-auth-noauth-0.9.14.jar to /etc/guacamole/[extensions,lib]
Amended my guacamole.properties file to:
guacd-hostname: localhost
guacd-port: 4822
user-mapping: /etc/guacamole/noauth-config.xml
auth-provider: net.sourceforge.guacamole.net.auth.noauth.NoAuthenticationProvider
noauth-config: /etc/guacamole/noauth-config.xml
Created a new noauth-config.xml file with the contents
<configs>
<config name="myconfig" protocol="rdp">
<param name="SVxxxx01" value="rdp-server" />
<param name="port" value="3389" />
</config>
</configs>
I then copied guacamole-auth-noauth-0.9.14.jar to the classpath directory I created cp guacamole-auth-noauth-0.9.14.jar /var/lib/guacamole/classpath
Any advice and tips to bypass the login page will be appreciated.
You should check if the plugin is correctly loaded. The tomcat logs (catalina.out) should write something like
"INFO o.a.g.extension.ExtensionModule - Extension "My guacamole extension" loaded.".
If it is not loaded, check if the location of the plugin is correct. Normally, the plugins are located in GUACAMOLE_HOME/extensions directory. You may see the default values for GUACAMOLE_HOME here: https://guacamole.apache.org/doc/gug/configuring-guacamole.html
I usually create extension directory in ~tomcat/.guacamole/extensions, but you should be fine with any other location specified in the documentation.
Sure enough changing the version of the extension worked! guacamole-auth-noauth-0.9.14.jar is not compatible by default but if you change the .jar extension to .zip, extract, edit guac_manifest.json to replace "0.9.14" with "1.2.0", re-zip (or replace), and optionally rename the whole thing guacamole-auth-noauth-1.2.0.jar (to avoid confusion) you end up with a working extension provided all other standard configuration steps are followed as well.

How to set log4j.property to .jar location

I'm Setting up Log4j2 in a Spring-boot application. I now want to create a /log directory exactly where the .jar file is located.
This is needed as we start the java application from a startup script and the configuration should work on both windows and unix developer machines as well as a server.
I already tried with:
<RollingFile name="FileAppender" fileName="./logs/mylog.log"
filePattern="logs/mylog-%d{yyyy-MM-dd}-%i.log">
which just creates a log folder at the directory where the jar gets started.
then I read i should use .\log/mylog.log as .\ points to the directory of the jar file.
But then it just creates a folder called .\log.
I also tried with configuration with jvm arguments and calling them at the log4j2.xml with: ${logFile}. Now a directory gets created called '${logFile}.
The only ${} command working is the directory of the log4j configuration file. But as this is inside the jar it just gets me a pretty useless folder structure
Thanks in Advance
EDIT: In the End what I did was setting up two configuration files, log4j2.xml and log4j2-prod.xml
The log4j2.xml took the system property as Vikas Sachdeva mentioned, while the prod.xml got the location hard coded.
Not really the solution I was looking for but made it work.
One solution is to pass log directory location through system properties.
Configuration file will look like -
<RollingFile name="FileAppender" fileName="${sys:basePath}/mylog.log"
filePattern="${sys:basePath}/mylog-%d{yyyy-MM-dd}-%i.log">
Now, pass VM argument basePath with absolute path of directory containing JAR file -
java -jar myapp.jar -DbasePath=/home/ubuntu/app

Websphere Liberty: How to specify log4j2 configuration location?

I'm trying to tell Websphere Liberty where is located my log4j2.xmlfile, but it isn't working.
In my file jvm.options I configure:
-Dlog4j.configurationFile=file:///${server.config.dir}/log4j2.xml
but it looks like Liberty does not understand the variable ${server.config.dir} in the jvm.options file. The file is in the same directory of the server.xml file.
How would I specify the log4j2.xml location for Liberty?
I think it should be possible by creating a Library entry in your server.xml such as:
<library id="log4jLib">
<folder dir="/opt/log4j2/config"/>
</library>
where the directory specified contains the log4j2 properties or xml file.
Then specify a classloader for your application like this:
<application id="test" name="test" type="ear" location="test.ear">
<classloader commonLibraryRef="log4jLib" />
</application>
The ${server.config.dir} variable is one of the Liberty built-in server config variables, these only apply within the server.xml (and included configurations).
When you run a Liberty server, the user.dir gets set to the same thing as ${server.config.dir}, so you could just specify the relative path to your log4j2.xml file in jvm.options as:
-Dlog4j.configurationFile=log4j2.xml
For Liberty I do the following;
I have a jvm.options file containing:
-Dlog4j.configurationFile=log4j2.xml
I place both files (log4j2.xml and jvm.options) in the server config.
I.e where tour server.xml etc is placed:
usr/servers/<myserver>:
server.xml
jvm.options
log4j2.xml
That does the trick for me.
There are a few ways of configuring log4j in WebSphere. Aside from the library entries method mentioned by pseudonym, you can simply drop the log4j2 configuration file to the global library directory at
wlp/usr/servers//lib/global
If there are files present in above location at the time an application is started, and that application does not have a classloader element configured, the application uses these libraries. If a class loader configuration is present, these libraries are not used unless the global library is explicitly referenced.
You can find more details about the global libraries in this link
WebSphere Liberty Shared Libraries

Log4j2 not loading log4j2.xml

I have a problem concerning log4j2 which does not load the log4j2.xml configuration file in a project.
The project is bundled into an uber jar file. When running the application using java -jar jarfile.jar the application starts but log4j prints the following error to the console:
ERROR StatusLogger No log4j2 configuration file found. Using default
configuration: logging only errors to the console.
I checked the jar and it definitely contains a log4j2.xml file in the root location.
Because I could not figure out why this does not work I debugged to log4j2 bootstrap code. I found out that log4j never tries to read the log4j2.xml. This should happen in org.apache.logging.log4j.core.config.ConfigurationFactory.Factory#getConfiguration.
Unfortunately the list of factories used in this method is empty thus the method always returns null.
Any ideas on this?
If you want to check this clone https://github.com/cryptomator/cryptomator, cd to the main directory in the cloned repo and run mvn clean install -DskipTests -P uber-jar afterwards you will find the jar file in question under main/uber-jar/target.
I suspect this is the same issue as Log4j2 configuration not found when running standalone application builded by shade plugin since it sounds like you are building an uber jar.
I have a similar issue, but not using shade.
I have a jar file, with dependencies in /lib
I have a log4j2.xml file in the same location as the main jar file.
I can (obviously) run the jar file by calling:
java -Dlog4j2.configurationFile=.\log4j2.xml -jar myjar.jar
However, in Windows, it's possible simply to double-click the jar file to load it. Everything loads and works, except that it doesn't find the log4j2.xml file - so no logfile is written.
What I would like to be able to do is have a simple jar file I can hand to someone and have it run on their machine, with the ability to configure logging in the event they run into issues.
EDIT:
To do that, you need to amend your code thus:
public class MyClass
{
static
{
System.setProperty("log4j.configurationFile", "log4j2.xml");
}
private final static Logger LOG = LogManager.getLogger();
//OTHER STUFF HERE
}
Thanks to Load Log4j2 configuration file programmatically for the answer.

tomcat 6: accessing web app without war name in the URL and without overwriting ROOT?

in my war's META-INF/context.xml I have:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/foobar" docBase="my-long-war-name"/>
I deploy my war to the webapps/ directory and I confirm that my contex.xml is in %CATALINA_HOME%\conf\Catalina\localhost with the name my-long-war-name.xml
Now, instead of accessing my REST service through http:/ /localhost:8080/my-long-war-name/contacts/data tomcat should allow http:/ /localhost:8080/foobar/contacts/data
but I can only access my service through the former URL. It's as if it completely ignores the path given above for my web app. I even tried omitting docBase and that didn't work either.
why doesn't this work?! it's supposed to be so basic!
I don't see why you need the <Context>. I never touch that when deploying to Tomcat, and everything works fine.
Why don't you just make the WAR name foobar, deploy it, and be done with it? You seem to be wedded to this idea in spite of the evidence to the contrary about how basic it is.

Resources