I'm trying to install Nexus (the repository manager for Maven) in a machine behind a proxy. When I execute the server it tries to connect to the default repositories (https://repository.apache.org:443, https://repo1.maven.org:443 and https://nexus.codehaus.org:443) but it fails with a "network is unreachable" message (because of the proxy, I assume).
I tried adding additional JVM parameters to the jsw/config/wrapper.conf file to configure the proxy but it doesn't seem to work:
wrapper.java.additional.4=-Dhttp.proxyHost=10.104.1.7
wrapper.java.additional.5=-Dhttp.proxyPort=8080
wrapper.java.additional.6=-Dhttps.proxyHost=10.104.1.7
wrapper.java.additional.7=-Dhttps.proxyPort=8080
Anyone know how I can get this to work?
There is a section in the Nexus Admin UI to configure proxy settings. It is located under Administration --> Server. See section 6.1.5 of the Nexus Documentation.
The answer above works if the Nexus application is already running and you are then trying to configure the proxy. I had to install Nexus on a machine without internet connection. During activation of license it tries to contact licensing.sonatype.com for which you will either need a direct internet connection or will need to ssh port forward it through another open to internet box. This little nuance gave me a hard time.
>nexus.exe /run -Dhttps.proxyHost=10.104.1.7 -Dhttps.proxyPort=8080
Related
To load some code, I need a clean local AEM Author instance running on my laptop. I start it using CLI like :
bash$ java -jar aem-author-p4502.jar -nointeractive
Default user/password is then admin/admin to access AEM on http://localhost:4502. I'm ok with that but I've tested from another computer and port 4502 is open from full local network.
I'd like to limit access only from localhost, maybe by configuring listener address to 127.0.0.1 only. How ?
Recent AEM versions uses Apache Felix Lightweight HTTP Service as HTTP Server. I found how to bind it to 127.0.0.1 when it is embedded in AEM.
Configuration file is crx-quickstart/launchpad/config/org/apache/felix/http.config. I added last line :
:org.apache.felix.configadmin.revision:=L"1"
org.apache.felix.http.session.timeout=I"10"
org.apache.felix.https.jetty.protocols.excluded=[ \
"SSLv3", \
]
org.apache.felix.proxy.load.balancer.connection.enable=B"true"
service.pid="org.apache.felix.http"
org.apache.felix.http.host="127.0.0.1"
Now AEM Author is available only from localhost.
Maybe you can try to add an exception on your firewall to the port 4502 and only enable connections from your local and deny the others.
Regards,
I installed Java on my Windows 10 machine and downloaded Metabase.jar, and ran it.
Now I could access metabase at localhost:3000
But I'm unable to setup my SQL Server Database as Data reference.
I'm either getting:
Couldn't connect to the database. Please check the connection details.
or
Timed out after 5000 milliseconds.
Anyone who has done Metabase - SQL Server connection successfully?
Currently, as of Metabase version 0.30.x the answer depends on if you can use a user configured directly on SQL Server or not:
The easier option to setup is with a user configured directly on SQL Server. Then config is just Name: (anything), Host: (full name), Database Name, Username, Password as you would expect. (I believe you should NOT fill in the Windows domain).
On Windows only you can also use native integrated authentication with sqljdbc_auth.dll, just specify integratedSecurity=true connection property (and optionally authenticationScheme=NativeAuthentication). I found if I dropped the x64 sqljdbc_auth.dll in my <java path>\jre\bin folder it was picked up. Metabase config as in the screenshot below, apart from dropping authenticationScheme=JavaKerberos
The cross platform authenticationScheme=JavaKerberos option to use Windows Authentication with a domain user is still doable, but harder. It's these steps:
Create a krb.conf and verify login works with <Java path>\bin\kinit.exe [user]. Here's a template edited to match the Metabase database setup in the screenshot below.
Start the Metabase.jar file with parameters to load the krb.conf. It works for me with java -Djava.security.krb5.conf=c:/<path>/kerberos/krb.conf -jar metabase.jar.
Now configure the database settings in Metabase according to the screenshot below
Moment of truth! ...
Optional: Still not working? Maybe your SQL Server isn't configured for Kerberos? Maybe you need SPN setup? Maybe you need to specify a java.security.auth.login.config (I have not experienced any of that myself, only thing I can offer is you scroll to the bottom of this post and dive in then edit your question with where you got to and what config you have)
Metabase SQL Server setup using Kerberos:
For background, current (August 2018) very long :| sum up with lots of links of how to connect to SQL Server is here in a Metabase discussion topic Note: In v0.30.0 an issue with dynamic port handling (particularly for people using named instances) was fixed.
Related: A neat StackOverflow answer on Kerberos on a Mac
If you are connecting to a "Named Instance" ({SERVER_NAME}/{INSTANCE_NAME}) instead of "Default Instance" ({SERVER_NAME}), your server may be configured to use Dynamic Port.
A quick dirty fix is you can find the current port with below scripts and then use it on Metabase connection parameters. But this port most probably will change when service restart occurs.
SELECT DISTINCT
local_tcp_port
FROM sys.dm_exec_connections
WHERE local_tcp_port IS NOT NULL
or
USE master
GO
Xp_readerrorlog
(look for "Server is listening on ..." line)
A Cleaner way is setting port for your instance by "SQL Server Configuration Manager" - "SQL Server Network Configuration" - "TCP/IP" - Right Click properties - "TCP Dynamic Ports" (There should be 0 and it should be deleted) and "TCP Port" (New default port should be set here). And also "SQL Server Browser" service should run. A more detailed explanation is here
Downloaded and unpacked Websphere Liberty Profile wlp-javaee7-8.5.5.9.zip. I am behind a firewall and I was trying to install the adminCenter, but got the error:
CWWKF1219E: The IBM WebSphere Liberty Repository cannot be reached. Verify that your computer has network access and firewalls are configured correctly, then try the action again. If the connection still fails, the repository server might be temporarily unavailable.
To solve this I used information from http://viralpatel.net/blogs/http-proxy-setting-java-setting-proxy-java/.
Is there a better method to configure the access of various IBM utils to external repositories?
You can also set http proxy settings for installUtility by putting
proxyHost=my.proxy.server.ibm.com
proxyPort=9080
proxyUser=myname
proxyPassword={aes}AH5NLyd7DfGb12pK17Pw+
in your ${wlp.install.dir}/etc/repositories.properties as described in the Knowledge Center
Note that the password should be encoded with securityUtility
I'm trying to connect JVisualVM, running on my local machine, to a remote machine which is running a WildFly server (version 8.1.0, to be specific.)
I didn't configure the WildFly server myself, and I don't know who did, but I do know that I can log in as an administrative user from my local machine by pointing my browser at:
https://[ip address of the remote machine]:9443/console
Note that it's https, not ordinary http, and that the port for that has been set to 9443 (I think the default is 8080 or 9990 or something... IDK, I saw a lot of port numbers online. I have been explicitly told that http was disabled for this WildFly server).
I can SSH into the remote machine. I can navigate to the bin directory for WildFly and run jboss-client.sh. I have to connect on port 9999 (I think the default is 9990 for that?)
I copied the jboss-client.jar (under bin/client) to my local machine and ran JVisualVM from the command line like this:
.\jvisualvm.exe -cp:a C:\[path to]\jboss-client.jar
It launches fine. File > Add Remote Host: Then I entered the IP. OK. I right clicked on it under Remote in the tree and picked Add JMX Connection. I entered
service:jmx:http-remoting-jmx://[ip]:9999
I checked off that I wanted to use the security credentials and entered the username and password. Checked off to save the security credentials. Left "Do not require SSL Connection" unchecked. Hit OK. It immediately spat out the message
Cannot connect to admin#service:jmx:http-remoting-jmx://[ip]:9999 using service:jmx:http-remoting-jmx://[ip]:9999
I also tried the port 9443, 9990, and 8080 instead. None of those worked. I tried https instead of http in the protocol name. That also didn't work.
What am I missing? How is it that I can access the console, and connect with jboss-client.sh, but I can't use JVisualVM? Is there some log I can use somewhere to see what's wrong? Maybe someone can point out a configuration I've missed somewhere?
Not sure if it's important or not, but my local machine is running Windows 10 with JDK8 installed. The WildFly server is using Java 6 on CentOS 6.3.
You need to add the jboss-client.jar (or jboss-cli-client.jar) to the class path for JVisualVM. The library can be found in the bin/client directory of the WildFly install.
I used the following command to add the library to the class path.
jvisualvm --cp:a ~/servers/wildfly-10.0.0.Final/bin/client/jboss-client.jar
Then I used service:jmx:remote+http://[ip]:[port] and was able to connect.
I don't know if someone else is also (still) having the same issue (Wildfly10 on a remote machine where management console is available at 9443 with HTTPS). The following worked for me.
For ssh connections:
Starting jvisualvm with jboss-client.jar
jvisualvm --cp:a #JBOSS_HOME/bin/client/jboss-client.jar
Using the following connection string:
service:jmx:remote+https://remote-server:9443
NOTE: I used here remote+https
Provide username and password
Hope this helps.
you missed run jstatd command in remote host ,
this little program is RMI server that possible connection from client to remote host though you using jmx connection it used jmxrmi protocol for that connection .
so first in remote host create file name as security.policy with this contain :
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
off course you must in file section for linux put explicit path and then of creation this file put it in bin directory of jdk.home
then you should run this command on remote host
$JAVA_HOME/bin/jstatd -J-Djava.security.policy=path of /security.policy -J-Djava.rmi.server.hostname=remote ip address -J-Djava.net.preferIPv4Stack=true
then you could connect to server off course with correct settings.
Include jboss-cli-client.jar and jboss-client.jar under \lib\visualvm\platform\lib and restart jvisualvm to pickup new jars.
I've deployed some Managed Beans on WebSphere 6.1 and I've managed to invoke them through a standalone client, but when I try to use the application "jconsole" distributed with the standard JDK can can't make it works.
Has anyone achieved to connect the jconsole with WAS 6.1?
IBM WebSphere 6.1 it's supossed to support JSR 160 JavaTM Management Extensions (JMX) Remote API. Furthermore, it uses the MX4J implementation (http://mx4j.sourceforge.net). But I can't make it works with neither "jconsole" nor "MC4J".
I have the Classpath and the JAVA_HOME correctly setted, so the issue it's not there.
WebSphere's support for JMX is crap. Particularly, if you need to connect to any secured JMX beans. Here's an interesting tidbit, their own implementation of jConsole will not connect to their own JVM. I have had a PMR open with IBM for over a year to fix this issue, and have gotten nothing but the runaround. They clearly don't want to fix this issue.
The only way I have been able to invoke remote secured JMX beans hosted on WebSphere has been to implement a client using the "WebSphere application client". This is basically a stripped down app server used for stuff like this.
Open a PMR with IBM. Perhaps if more people report this issue, they will actually fix it.
Update: You can run your application as a WebSphere Application Client in RAD. Open the run menu, then choose "Run...". In the dialog that opens, towards the bottom on the left hand side, you will see "WebSphere v6.1 Application Client". I'm not sure how to start and Application Client outside of RAD.
IT WORKS !
http://issues.apache.org/jira/browse/GERONIMO-4534;jsessionid=FB20DD5973F01DD2D470FB9A1B45D209?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
1) Change the config.xml and start the server.
-see here how to change config.xml: http://publib.boulder.ibm.com/wasce/V2.1.0/en/working-with-jconsole.html
2) start the jconsole with : jconsole -J-Djavax.net.ssl.keyStore=%GERONIMO_HOME%\var\security\keystores\geronimo-default -J-Djavax.net.ssl.keyStorePassword=secret -J-Djavax.net.ssl.trustStore=%GERONIMO_HOME%\var\security\keystores\geronimo-default -J-Djavax.net.ssl.trustStorePassword=secret -J-Djava.class.path=%JAVA_HOME%\lib\jconsole.jar;%JAVA_HOME%\lib\tools.jar;%GERONIMO_HOME%\repository\org\apache\geronimo\framework\geronimo-kernel\2.1.4\geronimo-kernel-2.1.4.jar
[or your version of geronimo-kernel jar]
3) in the jconsole interface->advanced, input:
JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/JMXSecureConnector
user name: system
password: manager
4) click the connect button.
If you want the WebSphere MBeans this one works for me:
The key is to configure the classpath and the security properly.
in one line:
jconsole -J-Dwas.install.root=C:/was61 -J-Djava.ext.dirs=C:/was61/plugins;C:/was61/plugins/com.ibm.ws.security.crypto_6.1.0;C:/was61/lib;C:/was61/java/jre/lib/ext -J-Dcom.ibm.SSL.ConfigURL="file:../../properties/ssl.client.props" -J-Dcom.ibm.CORBA.ConfigURL="file:../../properties/sas.client.props" service:jmx:iiop://host:port/jndi/JMXConnector
where port = bootstrap port ex: (2809)
Be careful when setting the sas and the ssl props.
Robert
I have successfully connected to ActiveMQ and ServiceMix using the JConsole. Does WAS 6.1 use Java Management Extension (JMX) technology? JMX is required for JConsole.
If your path is set correctly it should work fine. On windows you go to System Properties -> Advanced Tab -> Environment Variables. Have your JAVA_HOME System variable set to the path of your JDK or JRE and your Path variable with %JAVA_HOME%/bin added somewhere in there. Then all you need to do is go to Start->Run->JConsole. Select the correct Process Name and your done.
Where are you having problems at? I hope this helps.
Edit:
Here is the Java Doc's on JConsole.
Hmm... I know that WebSphere is kind of hard to configure. Thats part of the reason we used ServiceMix for our ESB. Maybe its not enabled by default in WebSphere and you would have to turn it on in the config somewhere.
Websphere 6.1 does not support the JConsole for some reason even though it fully implements the JMS specs. Seems to be a week area at the moment. Your best bet is to look at the Admin client to implement you own console.
You all seem to be incorrect. I am running Websphere 6.1.041 , using JDK 1.5 , and I just started up Jconsole and used the "simple connect" tab to connect to localhost with port=0 and without a username and password and it works fine.