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

Rundeck fails to start on H2 #7764

Closed
ktosiek opened this issue Jun 9, 2022 · 3 comments
Closed

Rundeck fails to start on H2 #7764

ktosiek opened this issue Jun 9, 2022 · 3 comments

Comments

@ktosiek
Copy link

ktosiek commented Jun 9, 2022

Note: Bug Reports not following this template may be closed without feedback.

Getting Help
Please use this issue template for reporting identified or suspected bugs only. For support on configuration or troubleshooting please see Getting Help for the appropriate channels.

Describe the bug
After upgrading to RunDeck 4.3 the database is not migrated correctly. It looks a bit like this bug from liquibase: liquibase/liquibase#2362 (this bug was fixed in liquibase 4.8.0).

Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "CREATE TABLE PUBLIC.scheduled_execution (id BIGINT [*]AUTO_INCREMENT NOT NULL, version BIGINT NOT NULL, log_output_threshold VARCHAR(256), do_nodedispatch BOOLEAN, next_execution TIMESTAMP, date_created TIMESTAMP NOT NULL, node_keepgoing BOOLEAN, node_exclude_os_arch VARCHAR(1048576), uuid VARCHAR(255), node_include VARCHAR(1048576), success_on_empty_node_filter BOOLEAN, node_exclude_os_version VARCHAR(1048576), timeout VARCHAR(1048576), node_exclude_precedence BOOLEAN, node_exclude_name VARCHAR(1048576), notify_avg_duration_threshold VARCHAR(1048576), day_of_week VARCHAR(255), node_include_os_version VARCHAR(1048576), node_exclude_os_name VARCHAR(1048576), retry VARCHAR(1048576), ""filter"" VARCHAR(1048576), group_path VARCHAR(2048), scheduled BOOLEAN NOT NULL, orchestrator_id BIGINT, node_threadcount_dynamic VARCHAR(255), node_include_name VARCHAR(1048576), multiple_executions BOOLEAN, time_zone VARCHAR(256), rduser VARCHAR(255), node_include_os_name VARCHAR(1048576), filter_exclude VARCHAR(1048576), node_exclude VARCHAR(1048576), node_rank_order_ascending BOOLEAN, nodes_selected_by_default BOOLEAN, node_include_os_arch VARCHAR(1048576), loglevel VARCHAR(255), node_exclude_os_family VARCHAR(1048576), execution_enabled BOOLEAN, max_multiple_executions VARCHAR(256), node_include_os_family VARCHAR(1048576), last_updated TIMESTAMP NOT NULL, retry_delay VARCHAR(1048576), workflow_id BIGINT, exec_count BIGINT, month VARCHAR(255), hour VARCHAR(255), log_output_threshold_action VARCHAR(256), arg_string VARCHAR(1048576), user_role_list VARCHAR(1048576), total_time BIGINT, node_rank_attribute VARCHAR(255), server_nodeuuid VARCHAR(36), default_tab VARCHAR(256), node_exclude_tags VARCHAR(1048576), seconds VARCHAR(255), exclude_filter_uncheck BOOLEAN, ref_exec_count BIGINT, node_threadcount INT, node_include_tags VARCHAR(1048576), job_name VARCHAR(1024) NOT NULL, schedule_enabled BOOLEAN, year VARCHAR(255), day_of_month VARCHAR(255), node_filter_editable BOOLEAN, log_output_threshold_status VARCHAR(256), description VARCHAR(1048576), minute VARCHAR(255), project VARCHAR(255) NOT NULL, plugin_config VARCHAR(1048576), CONSTRAINT scheduled_executionPK PRIMARY KEY (id))"; expected "ARRAY, INVISIBLE, VISIBLE, NOT, NULL, AS, DEFAULT, GENERATED, ON, NOT, NULL, DEFAULT, NULL_TO_DEFAULT, SEQUENCE, SELECTIVITY, COMMENT, CONSTRAINT, COMMENT, PRIMARY, UNIQUE, NOT, NULL, CHECK, REFERENCES, ,, )"; SQL statement:

My Rundeck detail

  • Rundeck version: 4.3.0.20220602-1
  • install type: deb
  • OS Name/version: ubuntu 20.04
  • DB Type/version: H2

To Reproduce
Steps to reproduce the behavior:

  1. Install RunDeck
  2. Try to start it
  3. Check service.log, notice there's a "Syntax error in SQL statement" error

Expected behavior
Migrations upgrading the database.

Additional context
Add any other context about the problem here.

@padraiglennon
Copy link

padraiglennon commented Jun 15, 2022

I'm getting the same thing

My Rundeck detail

Rundeck version: 4.3.0.20220602-1 (Happening from 4.2+) - Clean install
install type: rpm
OS Name/version: Centos 8
DB Type/version: H2

@MegaDrive68k
Copy link

@ktosiek what is the previous Rundeck version? (before upgrade), please consider this to upgrade your H2 database if your Rundeck version is 4.0 or earlier.

Anyway, the H2 database is only for testing purposes, the main advice is to configure your instance against a "real database" like MySQL or PostgreSQL. Take a look at this.

@padraiglennon I replicated here a clean install following this I can't see that error, let me share my steps here:

  1. Update and install java: yum -y update; yum install java-11-openjdk.
  2. Install the Rundeck repo: curl https://raw.githubusercontent.com/rundeck/packaging/main/scripts/rpm-setup.sh 2> /dev/null | sudo bash -s rundeck.
  3. Install Rundeck: yum install rundeck.
  4. Start the service: systemctl start rundeckd.
  5. Check the service status: tail -f /var/log/rundeck/service.log.

Screen Shot 2022-06-16 at 14 42 01

@ktosiek
Copy link
Author

ktosiek commented Jun 16, 2022

I was upgrading from 3.4, but this database has seen a failed upgrade to an earlier 4.x version too. I've restored the DB from a backup and downgraded to 3.4 for now.

Thank you for pointing out H2 is not supported for production, even for small setups. I'll migrate to PostgreSQL before upgrading Rundeck.

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