Setup TFS plugin in Jenkins to access TFS server - ssl

This is just to share my problem and solution to everyone.
I setup the plugin with the instructions from
https://wiki.jenkins-ci.org/display/JENKINS/Team+Foundation+Server+Plugin
First problem:
FATAL: com.microsoft.tfs.core.exceptions.TECoreException: Connection refused
java.lang.RuntimeException: com.microsoft.tfs.core.exceptions.TECoreException: Connection refused
Second problem:
FATAL: com.microsoft.tfs.core.exceptions.TECoreException: Unrecognized SSL message, plaintext connection?
java.lang.RuntimeException: com.microsoft.tfs.core.exceptions.TECoreException: Unrecognized SSL message, plaintext connection?

First problem:
FATAL: com.microsoft.tfs.core.exceptions.TECoreException: Connection refused
java.lang.RuntimeException: com.microsoft.tfs.core.exceptions.TECoreException: Connection refused
This is due to the firewall between my Linux Jenkins server and the Windows TFS server. I had Network team open the port 8080 and 443 from the Jenkins server to the TFS server.
That fixed the first problem.
Second problem:
FATAL: com.microsoft.tfs.core.exceptions.TECoreException: Unrecognized SSL message, plaintext connection?
java.lang.RuntimeException: com.microsoft.tfs.core.exceptions.TECoreException: Unrecognized SSL message, plaintext connection?
This is due to my incorrect URL to the TFS DefaultCollection
I used the https for "Server URL". This will demande a SSL certificate to be install on the Jenkins linux server.
https://swcosvctfs01.wco.int:8080/tfs/DefaultCollection/
After switching to http as below, the error went away, and Jenkins was able to checkout a copy of the TFS sourcecodes successfully.
http://swcosvctfs01.wco.int:8080/tfs/DefaultCollection/

Related

Getting connection error while deploying using Webdeploy

Getting error while deploying:
Verbose: Pre-authenticating to remote agent URL 'https://server:8172/MsDeploy.axd' as 'someuser'.
Error: Could not complete the request to remote agent URL 'https://server:8172/MsDeploy.axd'.
Error: The underlying connection was closed: An unexpected error occurred on a send.
Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Error: An existing connection was forcibly closed by the remote host
Error count: 1.
I can telnet on 8172 port, have installed web management/web deployment services and they are running. Even its not giving authentication error if i give incorrect creds, so assuming its failing before authentication.
Destination Server is 2016 Datacenter
Enable TLS 1.0 and 1.1 on Destination server

Unable to start OHS component

Middleware: Oracle HTTP Server(OHS)
Version: 12.2.1.3
Configured Oracle HTTP Server(OHS) in standalone mode. Node manager is running perfectly. While starting "./startComponent.sh ohs1" i am getting the below error,
"""
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
Error: Error occurred while performing nmConnect : Cannot connect to Node Manager. : Unrecognized SSL message, plaintext connection?
"""
The solution found in internet is to changing the SecureListener to false in Nodemanager properties file.
When i did that i got the below error,
"""
weblogic.nodemanager.NMConnectException: Connection refused (Connection refused). Could not connect to NodeManager. Check that it is running at localhost/XXX.0.X.X:XXXX.
Error: Error occurred while performing nmConnect : Cannot connect to Node Manager. : Connection refused (Connection refused). Could not connect to NodeManager. Check that it is running at localhost/XXX.0.X.X:XXXX.
"""
And the solution for this is Setting the SecureListener to true in node manager properties file.
I am confused. Can someone help in resolving these errors?
Installed Oracle Access Manager(OAM) and OHS on same machine, but installed OHS in Standalone mode in different folder. After that, uninstalled OHS and Installed OHS in the same folder where i installed OAM, It worked.

GnuTLS error -15 on vsftpd

I am using ubuntu server with vsftpd service, connecting over SSL. When connecting using Filezilla randomly getting below error.
Error: GnuTLS error -15: An unexpected TLS packet was received.
Error: GnuTLS error -15: An unexpected TLS packet was received.
Error: Failed to retrieve directory listing
It will be okay after restarting vsftpd service and will again showing after some days. tried reinstalling vsftpd service and regenerated certificate.
Here is my /etc/vsftpd.conf`
rsa_private_key_file=/etc/ssl/private/vsftpd.key
rsa_cert_file=/etc/ssl/private/vsftpd.pem
ssl_ciphers=HIGH
pasv_enable=YES
pasv_max_port=12110
pasv_min_port=12099
port_enable=YES
pasv_address=<ip>
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=NO
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
allow_writeable_chroot=YES
pasv_promiscuous=YES
I have tried both active and passive mode and using ec2 instance and ports are opened on security groups. Tried same time different ISP ips and different location( not a local firewall issue).
Added the line seccomp_sandbox=NO on /etc/vsftpd.conf file solved my issue.

JRuby SSL binding creates broken thread if non SSL connection targets SSL Port

Once I run an SSL server with puma:
bundle exec puma remote-webapp/config.ru -b 'ssl://0.0.0.0:8888?keystore=remote-webapp/keystore.jks&keystore-pass=123456'
And then try to use http instead on the https, the following error occur:
vendor/jruby/1.9/gems/puma-2.9.2-java/lib/puma/thread_pool.rb:56" java.lang.RuntimeException: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
The problem is then the particular thread would become a zombie and never got recycled. Is there anyway I could prevent this from happening?

SSL connection between eDirectory and OpenLDAP

I use a State Machine Driver to connect our eDirectory (Source) to a OpenLDAP Directory (Destination).
Without SSL everything is fine...but only for testing.
Now i need to use SSL.
I activated use-ssl (Driver Configuration -> Driver Parameters) and give the path to a keystore.
I add a self-signed-certificate of the OpenLDAP-Server to the keystore.
After restarting the driver i get (servername replaced by xxxx):
java.net.ConnectException: Connection refused
16:12:15 FFFFFFFFFAA5D700 Drvrs: eDir-OpenLDAP PT:eDir-OpenLDAP: Schema.Schema() - LDAPException: Unable to connect to server xxxx:636 (91) Connect Error
java.net.ConnectException: Connection refused
I used /opt/novell/eDirectory/lib/nds-modules/jre/lib/security/cacerts as keystore.
What could i try next to get the SSL-connection running?
Thank you for reading this question!
The problem is solved.
Port 636 was closed on the destination server.
Thank you for the hint Bruno.