0

I made a Connections 6.5 headless installation which itself works, but couldn't start adminctl in the

# cd /opt/IBM/HTTPServer/bin/
# ./adminctl start
Syntax error on line 7 of /opt/IBM/HTTPServer/conf/admin.conf:
Port must be specified

Line 7 seems like an variable, that doesn't got parsed properly when configuring the IHS

# grep Listen ../conf/admin.conf
Listen @@AdminPort@@

There are also other such @@ variables in the config file:

# grep @@ ../conf/admin.conf
Listen @@AdminPort@@
User @@SetupadmUser@@
Group @@SetupadmGroup@@
ServerName cnx65.internal:@@AdminPort@@

Why are those values not correctly replaced? For example to Listen 8008 (default IHS admin port).

How I configure the IHS

The machine got provisioned using ansible, where the following shell command runs for IHS plugin configuration:

./wctcmd.sh -tool pct -createDefinition -defLocPathname /opt/IBM/WebSphere/Plugins -response /tmp/plugin-response-file.txt -defLocName webserver1

Response file /tmp/plugin-response-file.txt:

configType=remote
enableAdminServerSupport=true
enableUserAndPass=true
enableWinService=false
ihsAdminCreateUserAndGroup=true
ihsAdminPassword=adminihs
ihsAdminPort=8008
ihsAdminUnixUserGroup=ihsadmin
ihsAdminUnixUserID=ihsadmin
mapWebServerToApplications=true
wasMachineHostname=cnx65.internal
webServerConfigFile1=/opt/IBM/HTTPServer/conf/httpd.conf
webServerDefinition=webserver1
webServerHostName=cnx65.internal
webServerOS=Linux
webServerPortNumber=80
webServerSelected=IHS

As you can see, all required variables for substitution were present. So the tool should be able to replace @@AdminPort@@ by the value 8008.

Lion
  • 16,606
  • 23
  • 86
  • 148

2 Answers2

0

wctcmd.sh just creates the WAS definition for the IHS, but doesn't prepare the admin server. We need to do this manually with postinst and setupadm as documented here. This seems not just required for zip installations. My installation was done using Installation Manager and the admin server doesn't work without those steps.

I automated it in Ansible like this:

- name: Check if admin config is properly parsed
  become: yes
  shell: grep @@AdminPort@@ {{ http_server.target }}/conf/admin.conf
  register: admin_conf_check
  # File not found raise rc = 2, rc = 0 found, rc = 1 not found but file exists
  failed_when: admin_conf_check.rc != 0 and admin_conf_check.rc != 1
  changed_when: False

- set_fact:
    admin_conf_is_configured: "{{ admin_conf_check.rc == 1 }}"

- name: Parse IHS admin config
  become: yes
  # plugin_config_file is defined in http-plugin.yml
  shell: |
    ./bin/postinst -i $PWD -t setupadm -v ADMINPORT={{ http_server.admin_port }} -v SETUPADMUSER=nobody -v SETUPADMGROUP=nobody
    ./bin/setupadm -usr nobody -grp nobody -cfg conf/httpd.conf -plg {{ plugin_config_file }} -adm conf/admin.conf
  args:
    chdir: "{{ http_server.target }}"
  environment:
    LANG: "{{ system_language }}"
  register: ihs_setup
  # setupadm returns 90 if it was successfull: "Script Completed RC(90)"
  failed_when: ihs_setup.rc != 90
  when: not admin_conf_is_configured

- name: Create htpasswd for admin config
  become: yes
  shell: ./bin/htpasswd -c conf/admin.passwd adminihs
  args:
    chdir: "{{ http_server.target }}"
    creates: "{{ http_server.target }}/conf/admin.passwd"
  environment:
    LANG: "{{ system_language }}"
  • http_server.target is the IHS base path, e.g. /opt/IBM/HTTPServer
  • http_server.admin_port is the IBM default value 8008
  • plugin_config_file is set to /opt/IBM/WebSphere/Plugins/config/{{ http_server.name }}/plugin-cfg.xml where http_server.name matches the definition name in WAS (webserver1 in my example)
  • system_language is set to en_US.utf8 to make sure that we get english error message for output validation (when required), independent of the configured OS language

After running those configuration tools, we can see that all placeholders were replaced by their corresponding values:

# grep -i listen ../conf/admin.conf
Listen 8008

Running the admin server by executing ./adminctl start in the bin directory now works as expected.

Lion
  • 16,606
  • 23
  • 86
  • 148
  • This is not true, the doc you linked to is a manual procedure that assumes pct/wctcmd has never been run because iit is for the lightweight archive install of IHS/plugin (that maybe you want to mvoe to!). PCT/wctcmd are supposed to call all of the stuff in that page -- it's not doing it, and you are just running what it was supposed to run automatically. – covener Feb 21 '20 at 15:08
0

I heard from folks in the lab at IBM that webServerSelected=IHS is not being regognized and it must be webServerSelected=ihs (lowercase)

https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/tins_pctcl_using.html

webServerSelected
Specifies the web server to be configured
Specify only one web server to configure.

apache22
Apache Web Server Version 2.2
64-bit configuration not supported on Windows

apache24
Apache Web Server Version 2.4
64-bit configuration not supported on Windows

ihs
IBM® HTTP Server
64-bit configuration not supported on Windows

...
covener
  • 17,402
  • 2
  • 31
  • 45
  • I tried it with the lowercase `ihs` and removed my manual calls to `postinst` and `setupadm`. But still got `Listen @@AdminPort@@` in `/opt/IBM/HTTPServer/conf/admin.conf` after the first vanilla deployment, so this doesn't seem to cause the problem. – Lion Mar 20 '20 at 18:40