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
Apply complete! Resources: 7 added, 0 changed, 0 destroyed._
💻 Code Sample
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.
@bobrich , thanks for the suggestions and are correct.
@aokello SQL syntax error is fixed and merged to master branch now
Related to build failure, we are assuming you are trying to install PacBot from /root directory. Could you please change the directory to /opt or any other location and give a try? Please make sure you are cleaned all the PacBot related resources from your aws account before re-running the installer.
Thanks Bob, I'm still receiving this error: IOError: [Errno 2] No such file or directory: '/tmp/pacman_cloned_dir_1541804101.93/dist/jobs/rule-engine.jar'
How do I make sure the file and/or directory is being made?
I've included the full message below as well.
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_1541804101.93/dist/jobs/rule-engine.jar'
Clone the pacbot to another directory (/opt/) and start installation from there.
Hi @johnakash,
I tried moving the pacbot to another directory (/opt/) and starting the installation there as suggested but received the same error. I even checked the path shown in the IOError statement and didn't see the rule-engine.jar file mentioned.
`ng Pushing Pushing Pushing Pushing Pushed latest: digest: sha256:3559ba542e8c57325bb2da70466b445b00e6424b302cc7967a02553b174bb980 size: 2837 conatiner pushed into repository [ 245459132561.dkr.ecr.us-west-2.amazonaws.com/pacman-api ]
WARNING:python_terraform:error: 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_1542046469.8
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 ;'
[centos@ip-10-0-0-38 tmp]$ ls
hsperfdata_root pacman_cloned_dir_1541804101.93 parallelscatter3511398166687056378n1 parallelscatter432729069263560251n1 tmp.v2ujCAfLJM
pacman_cloned_dir_1541619661.6 pacman_cloned_dir_1542046469.8 parallelscatter3659370143358093497n1 systemd-private-82638f5894a34f01992f63fa3e4a4eaf-chronyd.service-ukh7rV
[centos@ip-10-0-0-38 tmp]$ cd pacman_cloned_dir_1542046469.8/
[centos@ip-10-0-0-38 pacman_cloned_dir_1542046469.8]$ ls
api code_of_conduct.md commons dist emailTemplates installer jobs LICENSE NOTICE.txt pom.xml README.md webapp wiki
[centos@ip-10-0-0-38 pacman_cloned_dir_1542046469.8]$ cd dist/jobs/
[centos@ip-10-0-0-38 jobs]$ ls
data-shipper-jar-with-dependencies.jar pac-managed-rules.jar pacman-aws-inventory-jar-with-dependencies.jar
Hi @johnakash & @bobrich,
I'd tried the install again (in the /opt/ folder) but this time on an Amazon Linux 2 instance and received the same error of: `Started building the jar...............
Traceback (most recent call last):
File "setup_pacman.py", line 213, in
What component ensure's that there's the rule-engine.jar in the directory?
I think this is your issue https://github.com/tmobile/pacbot/pull/48 . The entire dist folder was missing for me because mvn was failing.
However, I still can't get this to install.
Hello @gabel0287, I faced such similar issues in the past and the best option to get rid of those is as follows:
- Destroy your pacbot setup
- Ensure all the resources are removed. For e.g. as of now the destroy do not remove keypair, s3 bucket, CloudWatch logs and IAM roles/policies
- Terminate the instance from which you were running the setup. I hope the instance was just created just for launching Pacbot.
- Start a new CentOS instance (AMI ami-dd3c0f36 works pretty well in Frankfurt) but a similar one for your region should work fine
- Download Pacbot and Start your setup again.
It took a while for me to get Pacbot properly installed. Initially I too tried it installing it from a different location within the same instance but everytime it failed.
Hi @sachin6128,
I tried the install following your suggestions and receive the same error. I've also created a different instance to test building simply the rule-engine.jar and came across this error: "Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact com.tmobile.cloud:batch-commons:jar:1.0.0-SNAPSHOT" The full debug is copied below for your reference. How should I add the batch-commons dependency to the pom file?
`[centos@ip-10-0-0-139 pacman-rule-engine-2.0]$ mvn package -U -X
Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 1.8.0_191, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.3.2.el7.x86_64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /home/centos/.m2/settings.xml
[DEBUG] Using local repository at /home/centos/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /home/centos/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.tmobile.cloud:rule-engine:jar:1.0.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.tmobile.cloud:rule-engine:jar:1.0.0-SNAPSHOT
[DEBUG] Tasks: [package]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pacman-rule-engine 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: com.tmobile.cloud:rule-engine:1.0.0-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [compile, runtime, test]
[DEBUG] Repositories (dependencies): [central (https://repo.maven.apache.org/maven2, releases)]
[DEBUG] Repositories (plugins) : [central (https://repo.maven.apache.org/maven2, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.jacoco:jacoco-maven-plugin:0.7.9:prepare-agent (default)
[DEBUG] Style: Regular
[DEBUG] Configuration:
@aokello We can have a screen-share session to help you. Please let us know your convenient time.
@johnakash That'd be great! Thank you, how does 10:30am PCT tomorrow (Friday December 7th, 2018) sound?
Yes, sure. Let us know when you are available we can have a quick screenshare session.
Hi Akash,
I’m free now if you are? How shall we set up the screen share?
-A. Okello
From: Akash John [email protected] Sent: Friday, December 07, 2018 10:43 AM To: tmobile/pacbot [email protected] Cc: OKELLO, AARON M [email protected]; Mention [email protected] 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=.
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' [email protected]; tmobile/pacbot [email protected] Cc: Mention [email protected] 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 <[email protected]mailto:[email protected]> Sent: Friday, December 07, 2018 10:43 AM To: tmobile/pacbot <[email protected]mailto:[email protected]> Cc: OKELLO, AARON M <[email protected]mailto:[email protected]>; Mention <[email protected]mailto:[email protected]> 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=.
@aokello , I am in another meeting now. Give me 15 min. I will complete it and join.
We are ready to join. Please join in to https://t-mobile.webex.com/join/VVaradh
@aokello , Thanks for working together and closing it out.
Hello Team, I started installing PacBot on ubuntu 20.04 and getting this error "Checking user-attached policies ...................................................... [Not Present]"
I have tried all what i can but still getting the same error. Can someone please help me.
@johnakash I started installing PacBot on ubuntu 20.04 and getting this error "Checking user-attached policies ...................................................... [Not Present]"
I have tried all what i can but still getting the same error. Can someone please help me.