Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Enable https connect from server to agent #116

manirajsv ·

Hi Team,

We want to enable https on the agent to connect from the server, so we have generated a keystore on the agent as per below documentation, and now we wanted to enable by running config.sh but unable to run since X11 display is not enabled on the server. Please see the below error. Could you please suggest a way to enable through cli.

Documentation - https://wiki.pmease.com/display/QB14/Protect+QuickBuild+using+SSL

Error -
[whplauto@nuusea1bwhplutlbst2001 ~]$ cd quickbuild/buildagent/bin/
[whplauto@nuusea1bwhplutlbst2001 bin]$ ./config.sh
openjdk version "1.8.0_422"
OpenJDK Runtime Environment (build 1.8.0_422-b05)
OpenJDK 64-Bit Server VM (build 25.422-b05, mixed mode)

Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window. (Window.java:536)
at java.awt.Frame. (Frame.java:420)
at java.awt.Frame. (Frame.java:385)
at javax.swing.SwingUtilities$SharedOwnerFrame. (SwingUtilities.java:1763)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:795)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:757)
at com.pmease.quickbuild.bootstrap.Config.configBuildAgent(Config.java:518)
at com.pmease.quickbuild.bootstrap.Config.main(Config.java:69)

Thank you!

Regards,
Maniraj SV

  • replies 5
  • views 35
  • stars 0
robinshen ADMIN ·

Please run this from your desktop where a GUI environment is available. You can then copy back the generated node.properites back to server.

manirajsv ·

Hi Robinshen,
Thank you for the suggestion and that worked. Now in the QB console under Grid tab, active nodes are showing with SSL tag as like in the attached screen shot. QB-SSL.png
Could you please confirm, if we need to check anything else for the SSL setup of the agents from the QB server.

Thank you!
Regards,
Maniraj SV

robinshen ADMIN ·

QB server and agent will set up two way communications. This means that connection from server to agent will be protected via SSL. You may also want to make sure that QB server is running under https protocol and server url specified in agent node.properties are using that.

manirajsv ·

Hi Robinshen,

Thank you for the confirmation, now we are trying to make QB server also running on the secured port. But when we are generating the keystore using below command, its asking for keystore password but not private key password. Because of which node.properties is not getting updated properly.
Could you please help here?

command - /usr/bin/keytool -keystore keystore -alias QuickBuild -genkey -keyalg RSA -validity 365

Thank you!

Regards,
Maniraj SV

robinshen ADMIN ·

If you are generating self-signed key instead of importing external certificate, you need to specify keystore password as anything you want.