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

/scripts/functions.sh: line 261: /opt/geoserver/data_dir/cluster/instance_ip-xx-xx-xx-xx.us-east1.compute.internal/broker.xml: No such file or directory #559

Closed
ze-ahmed opened this issue Aug 25, 2023 · 3 comments · Fixed by #567

Comments

@ze-ahmed
Copy link

ze-ahmed commented Aug 25, 2023

What is the bug or the crash?

Hello,

I'm getting the following error:

/scripts/functions.sh: line 261: /opt/geoserver/data_dir/cluster/instance_ip-xx-xx-xx-xx.us-east1.compute.internal/broker.xml: No such file or directory

when starting my container (Please note that I'm using AWS ECS and data_dir is in EFS Volume), the container starts but is not loading corectly all the env variables. For example: EMBEDDED_BROKER is set to disabled but it is started, also HOST variable is not loaded with the desired and passed value

Please note that after testing on docker locally I found that some folders and files under data_dir are owned by root and this is perhaps the origin of the issue

Thanks for helping

Steps to reproduce the issue

Deploy geoserver on ECS and use EFS for data_dir by updating the env variable GEOSERVER_DATA_DIR

Versions

kartoza/geoserver:2.23.1

Additional context

No response

@ze-ahmed
Copy link
Author

ze-ahmed commented Sep 7, 2023

After investigation, the issue is related to EXISTING_DATA_DIR env variable. In start.sh we have the following line
# setup clustering if it's not already defined in an existing data directory if [[ -z "${EXISTING_DATA_DIR}" ]]; then cluster_config broker_config fi

As it is a boolean, we can use true or false but in the test if we use false, the cluster setup is not performed.

@NyakudyaA
Copy link
Collaborator

I think a much more better test is to check if cluster.properties is contained in the data dir. if it's not defined then we skip setting it up.

We would also have to extract the cluster folder name as it's used in the Java opt.

Or alternatively skip checking if cluster config already exists and always force to create directory

@ze-ahmed what are your thoughts

NyakudyaA added a commit that referenced this issue Sep 15, 2023
@NyakudyaA NyakudyaA mentioned this issue Sep 15, 2023
@ze-ahmed
Copy link
Author

You just need to test for cluster.properties after cluster configuration

NyakudyaA added a commit that referenced this issue Sep 21, 2023
* fix #559

* add clustering tests - a bit fragile cz of community plugin

* fixes #514

* Add option to check for an existing data dir in cluster init

* add info to readme
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

Successfully merging a pull request may close this issue.

2 participants