timsbiomed / tims-ts

TIMS instance of HAPI FHIR.
http://20.119.216.32:8888/
0 stars 0 forks source link

Build failed #2

Closed joeflack4 closed 1 year ago

joeflack4 commented 1 year ago

Overview

I tried following the steps to start up a server, but I failed on the first step, sh bin/start-ts.sh.

Error

Short err: Exception: Maven build failed with exit code 1. See log files.

Logs:

  1. inside logs/: 2022.12.08_23.00.17_log.txt
  2. inside hapi-extensions/logs/: 2022.12.08_23.00.17_log.txt

Long err:

(tims-ts) sh bin/start-ts.sh
WARNING: Skipping setup-servers as it is not installed.
Actions.PostgresDockerAction: Started PostgreSQL on localhost:50540 from directory: /Users/joeflack4/projects/tims-ts/postgres.
Actions.PostgresDockerAction: Docker UUID: 14e596c985e7b9e150acf07886145b295cedef73f6e8fa361ab530957fffa038
beep
Traceback (most recent call last):
  File "/Users/joeflack4/projects/tims-ts/.venv/bin/setup-servers", line 8, in <module>
    sys.exit(commands())
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/clickactions/__init__.py", line 123, in invoke
    super(Commands, self).invoke(ctx)
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    rv.append(sub_ctx.command.invoke(sub_ctx))
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/setupservers/command/hapi_jpa_starter.py", line 104, in command
    hapi.run()
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/setupservers/command/hapi_jpa_starter.py", line 146, in run
    self._hapi_start()
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/setupservers/command/hapi_jpa_starter.py", line 161, in _hapi_start
    self._hapi_build()
  File "/Users/joeflack4/projects/tims-ts/.venv/lib/python3.10/site-packages/setupservers/command/hapi_jpa_starter.py", line 295, in _hapi_build
    raise Exception(f'Maven build failed with exit code {completed.returncode}. See log files.')
Exception: Maven build failed with exit code 1. See log files.

Additional info

ShahimEssaid commented 1 year ago

The log has this at the end: ...WAR: Problem creating war: Execution exception: Java heap space

This appears to happen during the Spring Boot repackaging of the WAR.

I did not have this problem on my machine. I'll need to set and increase the JVM memory and see what happens. I think the default is some percentage of the host's (i have 64GB) if nothing is specified.

I'll add a CLI option and use it here: https://github.com/ShahimEssaid/setup-servers/blob/22425c491aaddd29a57f3931c8a4ad433819d542/src/setupservers/command/hapi_jpa_starter.py#L194

joeflack4 commented 1 year ago

Your solution to increase the allocated memory fixed, thanks!