Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-e UPDATE_HOSTNAME=true causes error /work/start_server.sh: line 15: hostname: command not found #232

Open
covener opened this issue Jan 26, 2021 · 3 comments

Comments

@covener
Copy link
Member

covener commented Jan 26, 2021

Saw this error scroll by

/work/start_server.sh: line 15: hostname: command not found

... while using

docker run --name twasv9 -h twasv9 -v $(pwd)/PASSWORD:/tmp/PASSWORD -p 9043:9043 -p 9443:9443 -e UPDATE_HOSTNAME=true -d ibmcom/websphere-traditional:latest

It seems to be harmless but while waiting for ISC to come up I was afraid it was an issue.

I am using:

ibmcom/websphere-traditional   latest     sha256:76d87075809ed63e764aa47964a87f57af6278063542e088c7b066de40cc1784   6752978e5b0c   5 days ago   1.88GB

It seems like the dockerhub doc no longer has -e UPDATE_HOSTNAME=true in examples, but I stashed it away in a cheatsheet ages ago. I guess it maybe broke under UBI-min or something like that.

@anborg
Copy link

anborg commented Jun 1, 2021

I wanted to bind to a host name so I can use nginx for reverse proxy. Same error 'hostname' not found.

Would be great if you could test with a docker compose like below

version: '3'
services:
  ibm-was:
    image: ibmcom/websphere-traditional:latest
    container_name: ibmwas
    environment:
      UPDATE_HOSTNAME: "true"
      SERVER_NAME: "ibmwas.pkml01.local" #Put the FQDN here.

    volumes: 
      - ./PASSWORD:/tmp/PASSWORD
#    ports:
#      - 9043:9043 # use nginx-proxy-mgr, no need to expose
#      - 9443:9443
    networks:
      - my-org-network

networks:
  my-org-network:
    name: my-org-network

@covener
Copy link
Member Author

covener commented Jun 13, 2022

https://github.com/WASdev/ci.docker.websphere-traditional#how-to-run-this-image still has this variable, latest images still report the hostname problem

@sakerl
Copy link

sakerl commented Jul 11, 2023

I've just had the same problem while attempting to set up a SIBLink between two containers
I'm guessing the problem is in the start_server.sh script in the line:

wsadmin.sh -lang jython -conntype NONE -f /work/updateHostName.py ${NODE_NAME:-"DefaultNode01"} $(hostname)

Hacking this to be ${HOST_NAME} seems to fix things for me, but I don't know whether there's anything else being done with 'hostname' elsewhere in the scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants