pacbot icon indicating copy to clipboard operation
pacbot copied to clipboard

IOError: [Errno 2] No such file or directory: '/home/ec2-user/pacbot/dist/jobs/rule-engine.jar'

Open marcschroeter opened this issue 8 years ago • 24 comments

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

Traceback (most recent call last): File "setup_pacman.py", line 213, in _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/ec2-user/pacbot/installer/awsterraformbuild.py", line 28, in _create_aws_resources jsonRead._build_ui_apps(aws_access_key, aws_secret_key, region) File "/home/ec2-user/pacbot/installer/jsonRead.py", line 760, in _build_ui_apps bucket=_get_s3_bucket_name() + '-' + _get_base_accountid() File "/home/ec2-user/pacbot/installer/ui/build_apps.py", line 37, in build_api_and_ui_apps self.build_jar_and_ui_from_code() File "/home/ec2-user/pacbot/installer/ui/build_apps.py", line 84, in build_jar_and_ui_from_code self.copy_jars_to_upload_dir(self.codebase_root_dir) File "/home/ec2-user/pacbot/installer/ui/build_apps.py", line 113, in copy_jars_to_upload_dir shutil.copy2(copy_file_from, self.upload_dir) File "/usr/lib64/python2.7/shutil.py", line 144, in copy2 copyfile(src, dst) File "/usr/lib64/python2.7/shutil.py", line 96, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/home/ec2-user/pacbot/dist/jobs/rule-engine.jar'

marcschroeter avatar Nov 16 '18 15:11 marcschroeter

Is there a chance someone can help us what we need to change to solve that problem? We are just using a clean AWS Linux 2 AMI and installing the components as in your description

marcschroeter avatar Nov 20 '18 13:11 marcschroeter

@marcschroeter I have similar issue, I believe this issue has to do with Java9, I'm testing out with Java8 to see if it is working...

Leectan avatar Nov 20 '18 16:11 Leectan

@Leectan but it looks like i have Java 8 installed

java -version openjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

marcschroeter avatar Nov 20 '18 19:11 marcschroeter

Hey @marcschroeter , Could you please let us know the machine configuration from which you are trying to install pacbot? The machine need to have at-least 8GB of memory to complete successful build.

johnakash avatar Nov 20 '18 20:11 johnakash

Thank you so much! I could it install now @johnakash

But i am not able to login with default credentials Admin User : [email protected] / pacman Readonly User : [email protected] / user

Authentication Failed. Please check your credentials.

marcschroeter avatar Nov 21 '18 11:11 marcschroeter

@marcschroeter if you could enumerate how you install the pip dependencies and java and maven, and OS you are running on would be great. I'm sure it would be a great help.

Leectan avatar Nov 21 '18 15:11 Leectan

@marcschroeter I get these errors along the way when I tried to install it. Wondering if you experienced the same..

screen shot 2018-11-21 at 11 18 29 am

screen shot 2018-11-21 at 11 19 24 am

Leectan avatar Nov 21 '18 16:11 Leectan

@marcschroeter looks like I have the same issue as you had before... wondering what you did differently here.

screen shot 2018-11-21 at 11 38 33 am

Leectan avatar Nov 21 '18 16:11 Leectan

@Leectan since installer building UI and API jars together on the fly we need to make use an instance with minimum 8GB memory. Please upgrade the machine configuration and give a try.

Before running the installer again, please make sure you have executed destroy command and cleaned all resources created as part of PacBot

  • IAM role and policy
  • S3 bucket
  • RDS
  • Redshift
  • ElasticSearch
  • SecurityGroup
  • ECS
  • Batch

johnakash avatar Nov 21 '18 18:11 johnakash

@johnakash I'm running on Ubuntu 4GB CPU and 16GB memory....

Leectan avatar Nov 21 '18 18:11 Leectan

@johnakash it looks alot like software dependencies are broken to me... especially Java and Maven....

Leectan avatar Nov 21 '18 18:11 Leectan

@marcschroeter Could you please check if you can see tables of oauth_user table in RDS?

johnakash avatar Nov 21 '18 18:11 johnakash

@Leectan Please join on gitter, we can have a quick chat and close it out.

johnakash avatar Nov 21 '18 18:11 johnakash

@johnakash gitter link please

Leectan avatar Nov 21 '18 18:11 Leectan

@johnakash nvm, saw.

Leectan avatar Nov 21 '18 18:11 Leectan

@Leectan this is what i am doing on a Amzaon Linux 2 AMI:

sudo yum install git -y sudo yum install -y epel-release python-pip wget https://raw.githubusercontent.com/tmobile/pacbot/master/installer/requirements.txt sudo pip install -r requirements.txt sudo yum -y install java-1.8.0-openjdk npm docker maven wget unzip mysql sudo amazon-linux-extras install docker sudo systemctl start docker #amazonlinux2 sudo service docker start #amazonlinux wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip unzip terraform_0.11.8_linux_amd64.zip sudo mv terraform /bin/ git clone [email protected]:tmobile/pacbot.git

marcschroeter avatar Nov 21 '18 19:11 marcschroeter

@johnakash how can i connect to the RDS DB? How can i find the credentials?

marcschroeter avatar Nov 21 '18 19:11 marcschroeter

@Leectan this is what i am doing on a Amzaon Linux 2 AMI:

sudo yum install git -y sudo yum install -y epel-release python-pip wget https://raw.githubusercontent.com/tmobile/pacbot/master/installer/requirements.txt sudo pip install -r requirements.txt sudo yum -y install java-1.8.0-openjdk npm docker maven wget unzip mysql sudo amazon-linux-extras install docker sudo systemctl start docker #amazonlinux2 sudo service docker start #amazonlinux wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip unzip terraform_0.11.8_linux_amd64.zip sudo mv terraform /bin/ git clone [email protected]:tmobile/pacbot.git

Could you please check if maven installed in the machine?

johnakash avatar Nov 21 '18 19:11 johnakash

@johnakash when i excecute "mvn versions:display-dependency-updates" i get this. Is this what you need to know?

[INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building PacMan 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- versions-maven-plugin:2.7:display-dependency-updates (default-cli) @ pacbot --- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] api-commons ....................................... SUCCESS [6.859s] [INFO] commons ........................................... SUCCESS [2.874s] [INFO] PacMan Commons Projects ........................... SUCCESS [0.005s] [INFO] admin-service ..................................... SUCCESS [3.177s] [INFO] asset-service ..................................... SUCCESS [36.497s] [INFO] config ............................................ SUCCESS [2.609s] [INFO] compliance-service ................................ SUCCESS [0.444s] [INFO] notification-service .............................. SUCCESS [0.475s] [INFO] statistics-service ................................ SUCCESS [0.394s] [INFO] auth-service ...................................... SUCCESS [0.496s] [INFO] PacMan Api Projects ............................... SUCCESS [0.003s] [INFO] inventoryFetch .................................... SUCCESS [0.227s] [INFO] data-shipper ...................................... SUCCESS [0.008s] [INFO] awsrules .......................................... SUCCESS [0.112s] [INFO] pacman-rule-engine ................................ SUCCESS [0.347s] [INFO] PacMan Jobs Projects .............................. SUCCESS [0.003s] [INFO] PacBot UI ......................................... SUCCESS [0.562s] [INFO] PacMan ............................................ SUCCESS [0.002s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:00.021s [INFO] Finished at: Wed Nov 21 20:58:35 UTC 2018 [INFO] Final Memory: 42M/791M [INFO] ------------------------------------------------------------------------ [ec2-user@ip-10-0-0-95 pacbot]$ mvn versions:display-dependency-updates

marcschroeter avatar Nov 21 '18 20:11 marcschroeter

This looks good and the PacBot is seems to be installed in your account. At the end of installation the Portal URL (to login) and default login details will be printed. Please try to login with those credentials.

johnakash avatar Nov 21 '18 21:11 johnakash