I am installing presto for first time. I created a single ubuntu instance in amazon ec2 and installed all the dependences required to install presto. I followed https://github.com/facebook/presto .
I did git clone and got the source code then I ran $mvn clean install as per instruction. Then I ran $presto-cli/target/presto-cli-*-executable.jar. while executing query it is showing an error as shown in image below
Please help me in solving this. The same I want to try in cluster containing master and slaves.
while working with ec2 make sure that you have your own AMI, Keypair and security group.
It seems, your server is not running or is hosted on another port number.
Have you started the server using
./presto-server-x.x/bin/launcher.py start
Related
For a college assignment I had to configure gitlab on my virtual machine that’s hosted on google cloud engine and is currently running Ubuntu 20.04.
I tried to install gitlab twice but the install fails (first it got stuck for at least 5 minutes on unpacking github-ce (13.10.2-ce.0) then it failed.
Reconfiguring gets me the same message but without any context, I don’t know where the error is, what is causing it and how to fix it.
I did research this error but the only thing that I found out is that it’s probably related with the config file. Only line in my config line that’s not commented out is the external url and it has a value so I have no idea what to do.
I guess something on the machine is fup. Try the same on a known-good new machine / fresh install.
Ubunut 20.04
Sounds like a fun OS.
I have a nodejs application that is deployed on Amazon ECS. I have setup codepipeline to automatically build and deploy the application. The application is dockerized and is deployed on a ubuntu machine. The application is working fine. However, there is a requirement to run a shell script from within the application. I am calling the shell script using await exec(path/to/shellscript). However, I keep getting the following error:
2021-02-08 17:19:48FAILED: undefined, 4e9d8424-3cfd-4f35-93cb-fac886b1c4918fc9f680cfea45ec813db787f8b8380a
2021-02-08 17:19:48/bin/sh: src/myApp/myScript.bash: not found
I have tried giving it permission using chmod but I keep getting errors still.
Any help is appreciated.
I realized that the script that I am running calls an executable created to run on Ubuntu. However, the docker image is an alpine Linux distribution. The issue has been explained in detail here:
Why can't I run a C program built on alpine on ubuntu?
What's the point of having Node.js and Vue.js installed on my host and then also getting a Node/Vue image for Docker? Every Vue.js tutorial says to install Node and Vue to the host first and then get the Docker image, is this not redundant?
Examples:
https://morioh.com/p/3021edac7ef1
https://jonathanmh.com/deploying-a-vue-js-single-page-app-including-router-with-docker/
https://mherman.org/blog/dockerizing-a-vue-app/
I'm using a Windows 10 host and was trying to avoid installing Node and Vue to Windows if possible, unless there are particular advantages to doing so, which hopefully someone can enumerate. Otherwise, maybe someone can confirm that it's redundant to also install Node/Vue on the host and state why it's silly and redundant.
Like you say, it is redundant but easier. A container is a running instance of an image, an image that was created (probably) using a Dockerfile with the instructions, so how would you go about doing everything from the container?
Would you add the creation of the app to the Dockerfile or would you connect to the container using bash and run the commands from there? If you connect with bash you'll lost everything once you remove the container. Once your app is created inside your container how would you get it out? I mean you need to write your app's code. You could store you data using docker volumes but that gets complicated depending were you are running Docker. For example on Mac a virtual machine is created for Docker, so to find that data you'll need to connect to the virtual machine...
It is just easier to do all of that from your local machine and use docker to host your app.
I'm using AWS Lambda, which involves creating an archive of my node.js script, including the node_modules folder and uploading that to their infrastructure to run.
This works fine, except when it comes to node modules with native bindings (using node-gyp). Because the binding was complied and project archived on my local computer (OS X), it is not compatible with AWS's (Amazon Linux) servers.
How can I cross-compile/install a node module (specifically, node-sqlite3) so when I upload it to another server arch it runs?
While not really a solution to your problem, a very easy workaround could be to simply compile the native addons on a Linux machine.
For your particular situation, I would use Vagrant. Vagrant can create virtual machines and configure them within seconds.
Find an OS image that resembles Amazon's Linux distro (Fedora, CentOS, others that use yum as package manager - see Wiki)
Use a simple configuration script that, when run by Vagrant on machine startup, will run npm install (optionally it might also remove the node_modules folder before to ensure a clean installation)
For extra comfort, the script can also create the zip file for deployment
Once the installation finishes, the script will shutdown the VM to avoid unnecessary consumption of system resources
Deploy!
It might require some tuning if the linked libraries are not at the same place on the target machine but generally this seems to me like the best and quickest solution.
While installing the app using Vagrant might be sufficient in some cases, I have found it necessary to build the app on Linux which is as close to Lambda's Amazon Linux AMI as possible.
You can read the original answer here: https://stackoverflow.com/a/34019739/303184
Steps to make it work:
Spawn new EC2 instance. Make sure it is based on exactly the same image as your AWS Lambda runtime. You can review Lambda env details here: http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html. In our case, it was Amazon Linux AMI called amzn-ami-hvm-2015.03.0.x86_64-gp2.
Install nvm and use it to install the same version of Node.js as on the AWS Lambda. At the time of writing this, it was v0.10.36. You can refer to http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html again to find out.
You will probably need to install git & g++ compiler on the EC2. You can do this running
sudo yum install git gcc-c++
Finally, clone your app to your new EC2 and install your app's dependecies:
nvm use 0.10.36
npm install --production
You can then easily download the node_modules using scp or such.
Same lines as Robert's answer, when I had to work on my MAC in a different OS I use vm ware like Oracle's free virtualizer VirtualBox to get a linux on my mac, no cost to me. Or sign up for a new AWS account, you get a micro for a year free. Use that to get your linux box, do whatever you need there.
AWS has a page describing how to deal with native NPM modules: https://aws.amazon.com/blogs/compute/nodejs-packages-in-lambda/
I am trying to install mongodb on my production instance, following this tutorial.
Everything seems to be fine, im seeing mongo on info.php and the sample connection is working.
But, when i run mongod or service mongod start from command line
i get mongod: unrecognized
service
Also when i run sudo find / -type f -name *mongo* this is what i get.
/home/userName/.npm/mongodb/1.1.3/package/lib/mongodb/responses/mongo_reply.js
/home/userName/.npm/mongodb/1.1.3/package/lib/mongodb/connection/mongos.js
/usr/lib64/php/modules/mongo.so
/usr/share/pear/.registry/.channel.pecl.php.net/mongo.reg
/usr/share/vim/vim72/keymap/mongolian_utf-8.vim
question what am i missing?
Up until now i have been testing locally on a windows machine.
You need to install the database package itself (you have so far installed all the libraries to connect to it, but not the database). Follow the instructions here:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-redhat-centos-or-fedora-linux/
And you will have the appropriate service as needed.