pacbot: Errors Experienced During Install on CentOS 7

❔ Question

Does anyone know how to resolve the issue below and can help me?

🔦 Context

Currently, I’m attempting to install pacbot but it currently fails during the install and quits. It states that “rule-engine.jar” is not available. I’ve attached both the printed return statement as well as the error components of the log file.

The printed error statement returned:

WARNING:python_terraform:error:
Error: Error applying plan:

1 error(s) occurred:

* null_resource.load_mysql_schema: Error running command 'mysql -u pacmanuser -ppacman123 -h pacmandbinstance.cqwfxlgk2owe.us-west-2.rds.amazonaws.com < DB_With_Values.sql': exit status 1. Output: ERROR 1064 (42000) at line 846: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO cf_AssetGroupDetails (groupId,groupName,dataSource,displayName,group' at line 5


Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.



oss-api  creation completed
Creating  lambda-submit
WARNING:python_terraform:error:
lambda-submit  creation completed
Execution started...............

Cloning the repository...............

Cloned repository to path: /tmp/pacman_cloned_dir_1541619661.6

Uploading Email templates to S3...............

Email templates upload to S3 completed...............

Started building the jar...............

Traceback (most recent call last):
  File "setup_pacman.py", line 213, in <module>
    _access_validation(assignedpolicieslist, user_name, user_arn)
  File "setup_pacman.py", line 190, in _access_validation
    awsterraformbuild._create_aws_resources(accessKey, secretKey, region)
  File "/home/centos/pacbot/installer/awsterraformbuild.py", line 27, in _create_aws_resources
    jsonRead._build_ui_apps(aws_access_key, aws_secret_key, region)
  File "/home/centos/pacbot/installer/jsonRead.py", line 596, in _build_ui_apps
    bucket=_get_s3_bucket_name() + '-' + _get_base_accountid()
  File "/home/centos/pacbot/installer/ui/build_apps.py", line 38, in build_api_and_ui_apps
    self.build_jar_and_ui_from_code(cloned_repo)
  File "/home/centos/pacbot/installer/ui/build_apps.py", line 101, in build_jar_and_ui_from_code
    self.copy_jars_to_upload_dir(working_dir)
  File "/home/centos/pacbot/installer/ui/build_apps.py", line 129, in copy_jars_to_upload_dir
    shutil.copy2(copy_file_from, self.upload_dir)
  File "/usr/lib64/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/tmp/pacman_cloned_dir_1541619661.6/dist/jobs/rule-engine.jar'

The contents of pacman-install.log are below:

_[INFO] Building jar: /tmp/pacman_cloned_dir_1541619661.6/jobs/pacman-rule-engine-2.0/target/rule-engine.jar [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] api-commons … SUCCESS [25.295s] [INFO] commons … SUCCESS [5.738s] [INFO] PacMan Commons Projects … SUCCESS [0.003s] [INFO] admin-service … SUCCESS [31.389s] [INFO] asset-service … SUCCESS [41.810s] [INFO] config … SUCCESS [10.981s] [INFO] compliance-service … SUCCESS [15.418s] [INFO] notification-service … SUCCESS [7.346s] [INFO] statistics-service … SUCCESS [4.544s] [INFO] auth-service … SUCCESS [5.614s] [INFO] PacMan Api Projects … SUCCESS [0.615s] [INFO] inventoryFetch … SUCCESS [1:19.782s] [INFO] data-shipper … SUCCESS [7.865s] [INFO] awsrules … SUCCESS [20.870s] [INFO] pacman-rule-engine … FAILURE [31.102s] [INFO] PacMan Jobs Projects … SKIPPED [INFO] PacBot UI … SKIPPED [INFO] PacMan … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4:59.194s [INFO] Finished at: Wed Nov 07 19:46:14 UTC 2018 Cleaning up unclosed ZipFile for archive /root/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar [INFO] Final Memory: 237M/239M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (build-a) on project rule-engine: Failed to create assembly: Error creating assembly archive jar-with-dependencies: Problem creating jar: Execution exception: Java heap space -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :rule-engine -es-data-shipper" target_id: “” => “pacman-submitBatchjob” aws_lambda_permission.lambda_invoke2: Creating… action: “” => “lambda:InvokeFunction” function_name: “” => “pacman-submitBatchjob” principal: “” => “events.amazonaws.com” source_arn: “” => “arn:aws:events:us-west-2:245459132561:rule/aws-redshift-es-data-shipper” statement_id: “” => “AllowExecutionFromCloudWatch2” aws_lambda_permission.lambda_invoke1: Creation complete after 0s (ID: AllowExecutionFromCloudWatch1) aws_cloudwatch_event_target.target_for_cloudwatch: Creation complete after 0s (ID: AWS-Data-Collector-pacman-submitBatchjob) aws_cloudwatch_event_target.pacman_redshift_for_cloudwatch: Creation complete after 0s (ID: aws-redshift-es-data-shipper-pacman-submitBatchjob) aws_lambda_permission.lambda_invoke2: Creation complete after 0s (ID: AllowExecutionFromCloudWatch2)

Apply complete! Resources: 7 added, 0 changed, 0 destroyed._

💻 Code Sample

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

If you’d like, I’ve set up this webex as well:

https://attcorp.webex.com/join/ma893k

-A. Okello

From: OKELLO, AARON M Sent: Friday, December 07, 2018 10:59 AM To: ‘tmobile/pacbot’ reply@reply.github.com; tmobile/pacbot pacbot@noreply.github.com Cc: Mention mention@noreply.github.com Subject: RE: [tmobile/pacbot] Errors Experienced During Install on CentOS 7 (#44)

Hi Akash,

I’m free now if you are? How shall we set up the screen share?

-A. Okello

From: Akash John <notifications@github.commailto:notifications@github.com> Sent: Friday, December 07, 2018 10:43 AM To: tmobile/pacbot <pacbot@noreply.github.commailto:pacbot@noreply.github.com> Cc: OKELLO, AARON M <ao033u@att.commailto:ao033u@att.com>; Mention <mention@noreply.github.commailto:mention@noreply.github.com> Subject: Re: [tmobile/pacbot] Errors Experienced During Install on CentOS 7 (#44)

Yes, sure. Let us know when you are available we can have a quick screenshare session.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tmobile_pacbot_issues_44-23issuecomment-2D445326615&d=DwMCaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=TBTzoVvMnl3BphurInrG8g&m=BOAcY7hZzHCqIsGHx9Jp4jCO2a8dvitljXmSvLtzBAg&s=tTITnYOXjJM7DqqdOLgH2YLI0Olo7RdlONhXh_ox_6s&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AqxldF5BAapwNHgUHeDXWMHrr2t82MQLks5u2ra9gaJpZM4YTtyE&d=DwMCaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=TBTzoVvMnl3BphurInrG8g&m=BOAcY7hZzHCqIsGHx9Jp4jCO2a8dvitljXmSvLtzBAg&s=1b-8-T6FDm261lMlosLgeQcelyOI6CHPE3yrq4gjgQo&e=.

Two things.

* null_resource.load_mysql_schema: Error running command 'mysql -u pacmanuser -ppacman123 -h pacmandbinstance.cqwfxlgk2owe.us-west-2.rds.amazonaws.com < DB_With_Values.sql': exit status 1. Output: ERROR 1064 (42000) at line 846: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO cf_AssetGroupDetails (groupId,groupName,dataSource,displayName,group' at line 5

The mysql error can be fixed by adding a semicolon at the end of line 846 in the DB.sql file. See https://github.com/tmobile/pacbot/issues/41

Problem creating jar: Execution exception: Java heap space -> [Help 1]

The build error appears to be a heap space issue with Maven. I did a google and found that setting the following before the build may help:

export MAVEN_OPTS=“-Xmx1G”

Of course ensure that the host you’re building on can spare the change.