amazon-ec2,tomcat7,vaadin,war,vaadin7 , Deploy vaadin 7 war file in EC2

Deploy vaadin 7 war file in EC2


Tag: amazon-ec2,tomcat7,vaadin,war,vaadin7

I'm trying to deploy a Vaadin 7 example.war file in tomcat 7, using an EC2 server. I upload the file to /var/lib/tomcat7/webapps but then when I go to myIp:8080/example it doesn't find the resource.

Any idea why?




To install the manager:

sudo yum install tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps

To solve the Java Version mismatch, org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/prueba2]]:

On Eclipse:

Preferences >> Java >> Installed JREs

On EC2 server:

sudo yum remove java-1.7.0-openjdk
sudo yum install java-1.8.0

Then reinstall Tomcat7 and restart

Thanks @BlunT for all the help!!


How to automate Amazon aws EC2 for scraping

Hi I'd like to set up some amazon EC2 instances (multiple) to scrape data from arbitrary sites. The way I imagine it being set up is one amazon instance that's a master which will programatically set up other instances to scrape. Right now I have php scripts that can scrape...

AMI for EC2 instance with a MongoDB?

I am running an Amazon EC2 instance with a MongoDB running on it. Since I will need to use it only for some time, I was wondering if it is possible to keep only image of the system for the usage time with Amazon Machine Image. Any idea?

Can't access Ganglia on EC2 Spark cluster

Launching using spark-ec2 script results in: Setting up ganglia RSYNC'ing /etc/ganglia to slaves... <...> Shutting down GANGLIA gmond: [FAILED] Starting GANGLIA gmond: [ OK ] Shutting down GANGLIA gmond: [FAILED] Starting GANGLIA gmond: [ OK ] Connection to <...> closed. <...> Stopping httpd: [FAILED] Starting httpd: httpd: Syntax error on...

Spring Boot War file gets 404 on ec2

I put together a simple Eclipse Spring Boot Rest program. Just a couple of endpoints that return some stings. I am building it with the Eclipse Gradle plug-in. No problems, it runs fine in the Eclipse provided Tomcat instance. I also ran it on a native windows Tomcat. I deployed...

liferay portlet non-liferay JNDI data source null

For a Liferay 6.2 custom portlet accessing a non liferay Oracle database we are running into an issue where the data source returned is null. We have configured the tomcat/conf/context.xml <!-- Adding custom New non liferay datasource --> <Resource name="jdbc/NewPool" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST...

AWS EC2: Migrating from Windows to Linux Server

I am currently using Amazon Web Services EC2 Windows 2012 instance for my application. I want to migrate over to an EC2 Linux server. What's the best way do this? I have been unable to find sufficient resources on this topic. We are currently using Hibernate and Spring frameworks with...

Determine Deployment Group from appspec.yml

I am using the elb scripts from to remove my ec2 instances from the load balancer before I do my code updates. I need to define the load balancer in the ELB_LIST variable of the bash script. This load balancer will be different for each environment (or deployment...

MongoDB on Amazon EC2 - Configuring Mongo Client for Php

I am pretty new to Amazon EC2. I followed the instructions given in mongodb official site for installing mongodb on Amazon Linux. I have a Yii-2(basic) project to host on my amazon Linux server. mongoDB is already installed in the and even I Imported some dumps over there. But when...

Tomcat support for HTTP/2.0?

Does anyone know what is the lowest version of Tomcat that supports HTTP/2.0? I've been looking everywhere on their site and I cannot find any details regarding this.

Data access Spark EC2

After following instruction to install cluster via ec2 script, i'm not able to correctly launch my .jar because they don't find the data file which i put on /root/persistent-hdfs/ on the master and slave nodes. I read on an other post that i need to prefix the file location with...

Tomcat v7.0 Server at localhost failed to start (Only with specific WebApp)

I get the above error when I'm trying to start the server. Important note, for any other Web Apps the server starts just fine. It's just this particular Web App that does not work. Here is the complete stack trace: SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed...

Apache tomcat issue with Eclipse dynamic web module 3.0

I created Spring MVC project with default configurations it was working/running on the server but when I changed Project Facets to J2EE 6 as following : now when I run the project I get following message UPDATE Please see this project structure : is @Controller public class HomeController {...

How to route traffic by proximity from Route 53 to closest NGINX server?

I'm trying to set up a web server stack in the following way: Use Route 53 for my DNS Serve static content with Cloudflare from S3 buckets Route API calls to nearest NGINX server that sits in front of some Nodejs servers. So all static content is done easily enough...

EC2ResponseError: 401 Unauthorized using Saltstack boto_vpc module

I'm trying to create a vpc using Saltstack and boto_vpc module. This is my state: vpc_create: - name: boto_vpc.create - cidr_block: '' - vpc_name: 'myVpc' - region: 'us-east-1' - key: 'ADJJDNEJFJGNFKFKFKIW' - keyid: 'SJDJNFNEJUWLLLCLCLENNRBFLGSLSLKEMFUHE' The keys that I'm using are correct but I got this error: [INFO ] Running...

How can I access Mule ESB Community edition via browser?

I am trying to access it via browser, I had no issue with EE but CE is proving difficult. On Putty I have it saying: Mule is already running. And when I go to it won't load properly. I do have the port 8585 open for inbound traffic as...

access tomcat deployed application (aws) by domain name (

I am new to aws hosting, please help me out in pointing the domain name to tomcat hosted application. During configuration following steps are taken- 1- I have created ec2 ubuntu instance. Configured with java, tomcat. Deployed my war files on tomcat. I am able to access the application successfully....

SQLite3 Unable to write to database file on Amazon AWS but only in certain instances

I have setup and EC2 instance on AWS and as part of this instance I am using a SQLite3 database to handle certain data. All of the database operations are routed through a single PHP file, with a single connection: function dataQuery($query) { // establish database connection try { $dbh...

Microservices and cloud resource limitations

I am at the beginning of a large migration from a single monolithic web service to a collection of microservices using Spring Cloud/Spring Cloud Netflix. Through my research of microservices I understand that the lines of demarcation between services should mirror the separations of concerns between them. An additional factor...

Timeout when submitting jobs to EC2 cluster

I've been trying to make this work with no luck thus far. I launch a cluster with ./spark-ec2 -k keyname -i ~/.keys/key.pem --region=us-east-1 -s 5 launch "my test cluster" Then I submit a job with bin/spark-submit --verbose --class --master spark:// --deploy-mode cluster --conf spark.executor.memory=5g /Users/ --outputPath,s3n://my-bucket/my-name/ec2-spark-test/ Where outPutPath is...

AWS EC2 Container Service / Elastic Beanstalk Docker Container Port udp binding

According to the documentation of ECS task definitions, this is how we define port mappings. "portMappings": [ { "containerPort": integer, "hostPort": integer } ... ] By default this is binding port over tcp. How to achieve udp port bindings to docker containers running in AWS Elastic Beanstalk (Multi-container) or with...

SSH aws ec2 elastic beanstalk without keypair

I have a running instance that was created without a keypair, as I understand is not possible to apply a keypair to a running instance, I need to ssh connect to the instance to get some logs, how can I do that? Right click on the instance -> Connect, shows...

Ruby aws-sk: undefined method

Trying to get ruby working with the ruby AWS sdk, but keep getting the following error: aws.rb:10:in <main>': undefined methodinstances' for # (NoMethodError) From other postings on StackOverflow, v2 of the aws-sdk changed from AWS to Aws. I also tried require 'aws-sdk' ec2 = access_key_id: 'mudd', secret_access_key: 'butt',...

Eclipse & Tomcat - Class loading

I have recently migrated a Java Client project to a Java Server project, using Tomcat, I have found that project library dependencies may be broken. Ordinarily I include the Libraries into the Java Build Path via the Eclipse menu option. I store the Libraries in the project \lib folder. When...

Amazon EC2 Storage lacks

I have launched Amazon EC2 instance of "m3.large" type. According to this page, m3.large should have 2vCPUs, 7.5GiB Memory and 1x32GB SSD Storage. But df -ah returns following results. It seems that the instance lacks the volume. Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 797M 6.7G 11% /...

How to transfer files from iPhone to EC2 instance or EBS?

I am trying to create an iOS app, which will transfer the files from an iPhone to a server, process them there, and return the result to the app instantly. I have noticed that AWS offers an SDK to transfer files from iOS app to S3, but not to EC2...

Enabling SSL on an AWS EC2 instance

On an EC2 instance that services multiple domains via Virtual Hosts, I have set up a Load Balancer that forwards HTTPS traffic from port :443 to :8443 for one of the domains, in part following this example: My working httpd.conf Virtual Hosts look like this: NameVirtualHost *:80 <VirtualHost *:80>...

Loop through list of AWS-instances shows only first item

I am working on a simple customer frontend for AWS. I want a list of all the users machines for start/stopping the EC2s. While the logic works I can only show the first of the machines in my view. I guess it's related to the AWS APIs pageable response format,...

Using Java web service on Amazon cloud

I want to make a web service in java which will take arguments and do processing and return a json response. I am not been able to figure out how to deploy this service on amazon ie (on ec2 or some where else) . what will be the url to...

AWS CLI for EBS snapshots

I am trying to get AWS CLI going to backup my EC2 instances. I can't see why AWS don't make it easy to schedule this via the console but they don't so I am pushing ahead with CLI. I installed on one of my instances. Problem 1, it won't work...

How to set a variable using dynamic inventory using Ansible

I am looking for method to set a variable in ansible playbook using inventory information received from dynamic inventory. For example if we have a sample playbook like --- - hosts: localhost connection: local tasks: - set_fact: rds_hostname="{{ rds_mysql }}" #set rds endpoint from - debug: var=rds_hostname I am...

View EC2 Instance Server Files in AWS Console

Is it possible to browse server files (.php, etc.) inside the AWS Console (in the browser) and not via a SSH or FTP client? For example; view files just like in CPanel on a regular web host. I am working on a EC2 instance of a Debian OS that was...

How to find Unused Security Groups of all AWS Security Groups?

How to find all the used security groups attached with all the aws resources using Boto? Currently the following script which is giving only ec2 instances- sec_grps = ec2_conn.get_all_security_groups() for group in sec_grps: print group, " Instances attached ", group.instances() Is there any way to get all security groups which...

How can I know the database url of AWS EC2 MySQL?

I would like to import gtfs files into mysql by using a tool from github, runing the follwoing command: gtfsdb-load --database_url <db url> <gtfs file | url> How can I get the database_url of mysql located in AWS EC2?...

Is it possible to enable CloudWatch on a running EC2 instance?

It looks like Amazon has a ready-built IAM role to grant instances CloudWatch write access. ( A more restrictive one could also be created if necessary) But it appears you cannot attach an IAM role to a running instance. Am I missing something? Do I really have to re-instantiate my...

Except homepage, the requested URL was not found on this server (AWS EC2 wordpress)

I host two wordpress on AWS EC2 (say site1 and site2). The site1 works perfectly, but the site2 can only access the homepage, for other pages, encountering the following error: Not Found The requested URL /just-for-test/ was not found on this server. Apache/2.4.7 (Ubuntu) Server at Port 80 Both...

Amazon DynamoDB table w/ Elastic Beanstalk not setting up correct parameters

I have an example Dynamodb project from Amazon that when uploaded to an instance of Elastic Beanstalk environment, generates a Dynamodb table. Howevever, after generating the table is missing a few parameters. Here is the code to the Elastic Beanstalk instance: /* * Copyright 2010-2013, Inc. or its affiliates....

Timeout using SSTableloader for Cassandra Aws Instance

I'm trying to use sstableloader to load SSTable (.db) files into a Cassandra Cluster running on an AWS EC2 instance. This error occurrs: Established connection to initial hosts Opening sstables and calculating sections to stream Streaming relevant part of C:\Users\SNCUser\dataquest\CassandraLoader\WrDir\beed5b97-0b52-45d7-be5d-fbbac00ac607\device_data\blob\device_data-blob-ka-1-Data.db to [/172.*.*.*] ERROR 16:08:36 [Stream #1114a0d0-1054-11e5-9ccc-65ee5fdd8902] Streaming error occurred

SQS: Publish a message when an EC2 instance starts?

Is there a way to automatically publish a message on SQS when an EC2 instance starts? For example, could you use Cloudwatch to set an alarm that fires whenever an instance starts up? All the alarms on Cloudwatch appear to be related to a specific EC2 instance, rather than the...

Tomcat 7 PermGen Space or Failed to Create JVM

I'm currently searching for any help about this. I'm trying to start a Tomcat 7 server, but I only get PermGen Space exception. I tried to change the XXMaxPermSize value, but when I change it, I get a Pop Up at launch of my Eclipse : "Failed to Create the...

Installing latest version of vsftpd on an ec2-linux AMI

I installed vsftpd on my Amazon ec2-linux AMI using sudo yum install vsftpd. However, it installs version 2.2.2. How do I install version 3.0.2? I downloaded the tar file from, extracted it, and followed the instruction from the INSTALL file. However, when I try to run the "make" command,...

How do I SSH into EC2 with .pub?

When I create a new Elastic Beanstalk environment it asked me if wanted to create a new keypair. I say yes, and it created two file in my .ssh folder locally called app and Normally to ssh into an instance I use a app.pem file. i.e ssh -i app.pem...

Rails scheduled task behind a load balancer

I was wondering how to properly schedule a task for a rails application that sits behind an elastic load balancer. This task is an automated weekly email that is to be sent out every Monday from the application. We currently have multiple EC2 instances that sit behind a LB. I...

Missing Perl dependencies not actually missing

I'm trying to install OTRS Help Desk on an EC2 instance of Amazon Web Services. I'm following the installation instructions here. But when I try to install otrs, I get the following errors: Error: Package: otrs-4.0.8-02.noarch (/otrs-4.0.8-02.noarch) Requires: perl(Archive::Zip) Error: Package: otrs-4.0.8-02.noarch (/otrs-4.0.8-02.noarch) Requires: perl(Template) You could try using --skip-broken...

WebSocket connection failed: WebSocket opening handshake was canceled

I have recently setup an EC2 instance (in a VPC with no load balancer) and admittedly the configuration is a bit odd, but it is what is required for the web application we're running. The web server (in Haskell) is running on port 4433 (standard ports are reserved for an...

Is there a way to cluster different machines running Tomcat instances

I have setup multiple tomcat instances in a single machine to launch more threads, however, if I have to make use of 10 EC2 instances with Tomcat installed as a cluster, how would I achieve this. Any good resources to look at?

Error when i try to install npm with putty

here is what i get when i try to execute this command (the 3rd command - in ec2 amazon) The next step is to install NPM(Node package manager). Type the following commands: 1. git clone 2. cd npm **3. sudo make install** and here is the error i get:...

SSHFS MacOs Read Only Issue

I've mounted an EC2 instance to my Mac using SSHFS and FUSE. The command I'm using to mount is: sshfs [email protected]_ADDRESS:/ ~/ec2Server/ It works fine, and I get the FUSE drive and I can see all the files. However, it's read only. How can I give myself read and write...

Tomcat, enable DELETE method

This question is asked before How to make Apache Tomcat accept DELETE method, but the solution it provides doesn't work for me. I've added <init-param> <param-name>readonly</param-name> <param-value>false</param-value> </init-param> to web.xml and my <servlet> setting looks like this: <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>debug</param-name>...

Multithreading in Ruby in EC2 causing weird behavior

I have the following code that I run in a rake task in rails: 10.times do |i| do puts "#{i}" end end When I run this locally, I get the following: 0 3 5 1 7 8 2 4 9 6 (with new lines) However, when I run the...

AWS RDS on Eclipse

I know this question seems a repeat, but it's not and I have tried all the solutions I could find PROBLEM: I am running an AWS RDS instance for the database. It works fine when I connect to it using AWS EC2 instance(uses linux) but when I try it with...