Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geowave-dev] GeoWave Data Store Questions

Andy,

 Thanks so much for all of the help. These instructions are gold. I'm up and running now. Now that I have it running well, I can look at some of the other data ingest types and also try working out my network problems. 

Cheers

Scott

On Sat, Jun 13, 2015 at 11:26 AM, Andy Spohn <andy@xxxxxxxxxxxxx> wrote:
Here's a bit more automated process to install onto the Hortonworks sandbox VM using the GeoServer REST API to do the final configuration of the datastore and layer. You'll have to install Accumulo, copy this script onto the VM and answer a prompt to set a user password.

1.) Log into Ambari http://127.0.0.1:8080/ using admin/admin
2.) Add Accumulo service
   Actions->Add Service and follow the wizard steps to install Accumulo   
   The script expects that the root user will have a password of admin
   Set passwords and accept the defaults for the rest
   Ensure the Accumulo and other services are running
3.) Run the HDP Sandbox GeoWave installation and configuration script
   This version of HDP uses Accumulo 1.7 which we haven't yet tested. This basic example seems to work.
   The script will pause when creating the geowave Accumulo user. Set the password to geowave
4.) When the script completes you'll be able to view content served through GeoServer WMS


geowave-hortonworks-sandbox.sh
------------------------------------------------------

#!/bin/bash
#
# Install GeoWave on Hortonworks Sandbox VM using RPMs and Puppet
# Puppet client is already installed, add Puppet standard libs, configure GeoWave repo and install
#
# Assumptions: 
#   - You have a working Internet connection
#   - Your Accumulo root user account password has been set to admin
#   - When prompted to set the geowave you will set the password to geowave
#
echo -e "\nStep 1 of 5: Installing GeoWave\n---------------------------------------\n"
yum -y --enablerepo=geowave install geowave-puppet
puppet module install puppetlabs-stdlib

# I use port 8993 as it's already configured in the VM port forwarding and not used by default
# If you decide to use the solr service you'll have to pick a new unused port
cat << EOF > /tmp/geowave.pp
class { 'geowave::repo': repo_enabled => 1, } ->
class { 'geowave':
  geowave_version       => '0.8.7',
  hadoop_vendor_version => 'hdp2',
  install_accumulo      => true,
  install_app           => true,
  install_app_server    => true,
  http_port             => '8993',
}
EOF

puppet apply /tmp/geowave.pp

# Configure Accumulo - You will be prompted to create a password for the geowave user. I suggest geowave as the password
echo -e "\nStep 2 of 5: Configuring Accumulo\n---------------------------------------\n"
cat << EOF > /tmp/accumulo-commands
createuser geowave
createnamespace geowave
grant NameSpace.CREATE_TABLE -ns geowave -u geowave 
config -s general.vfs.context.classpath.geowave=hdfs://sandbox.hortonworks.com:8020/apps/accumulo/classpath/geowave/0.8.7-hdp2/[^.].*.jar
config -ns geowave -s table.classpath.context=geowave
exit
EOF

# This is assuming you set admin as the password of the root user when you configured the Accumulo service
accumulo shell -u root -p 'pass:admin' -fv /tmp/accumulo-commands

# Download a small data file and ingest
echo -e "\nStep 3 of 5: Ingesting Sample Data\n---------------------------------------\n"
mkdir /tmp/ingest; unzip -d /tmp/ingest/ /tmp/ne_50m_admin_0_countries.zip
geowave -localingest -b /tmp/ingest -i hdp-accumulo-instance -n geowave.50m_admin_0_countries -f geotools-vector -u geowave -p geowave -z sandbox.hortonworks.com:2181

# Configure GeoServer
echo -e "\nStep 4 of 5: Configuring GeoServer\n---------------------------------------\n"

cat << EOF > /tmp/geowave-datastore.xml
<dataStore>
  <name>geowave.50m_admin_0_countries</name>
  <type>GeoWave Datastore</type>
  <connectionParameters>
    <entry key="ZookeeperServers">sandbox.hortonworks.com:2181</entry>
    <entry key="Password">geowave</entry>
    <entry key="Namespace">geowave.50m_admin_0_countries</entry>
    <entry key="UserName">geowave</entry>
    <entry key="Authorization Management Provider">empty</entry>
    <entry key="Lock Management">memory</entry>
    <entry key="InstanceName">hdp-accumulo-instance</entry>
  </connectionParameters>
</dataStore>
EOF
curl -u admin:geoserver -XPOST -T /tmp/geowave-datastore.xml -H "Content-type: text/xml" http://localhost:8993/geoserver/rest/workspaces/geowave/datastores

cat << EOF > /tmp/ne_50m_admin_0_countries-layer.xml
<featureType>
  <name>ne_50m_admin_0_countries</name>
  <nativeCRS>GEOGCS[&quot;WGS 84&quot;,
  DATUM[&quot;World Geodetic System 1984&quot;,
    SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563, AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],
    AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],
  PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
  UNIT[&quot;degree&quot;, 0.017453292519943295],
  AXIS[&quot;Geodetic longitude&quot;, EAST],
  AXIS[&quot;Geodetic latitude&quot;, NORTH],
  AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</nativeCRS>
  <srs>EPSG:4326</srs>
  <nativeBoundingBox>
    <minx>-180.0</minx>
    <maxx>180.0</maxx>
    <miny>-90.0</miny>
    <maxy>90.0</maxy>
    <crs>EPSG:4326</crs>
  </nativeBoundingBox>
  <projectionPolicy>FORCE_DECLARED</projectionPolicy>
</featureType>
EOF
curl -u admin:geoserver -XPOST -T /tmp/ne_50m_admin_0_countries-layer.xml -H "Content-type: text/xml" http://localhost:8993/geoserver/rest/workspaces/geowave/datastores/geowave.50m_admin_0_countries/featuretypes

echo -e "\nStep 5 of 5: Layer Preview\n---------------------------------------\n"


On Fri, Jun 12, 2015 at 6:08 PM, Scott <sctevl@xxxxxxxxx> wrote:
I'm having some problems with creating a GeoWave data store. I have two GeoServer 2.7 instances - one on CentOS and one on Ubuntu server and they're behaving the same way. I'm using the jar I built from master (0.8.8). 

When I fill in the connection information, it just spins. I also note that it's not possible to get to the GeoServer logs in another tab. I had to restart Tomcat to be able to use the GeoServer pages again. The GeoServer logs don't show any indication of an issue related to GeoWave. 

I see this error in the logs: WARN [zookeeper.ClientCnxn] - Session 0x0 for server 192.168.99.125/192.168.99.125:8080, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Packet len1213486160 is out of range!

It repeats and then there's: WARN [data.store] - Error obtaining new data store
java.io.IOException: Error initializing datastore
......

Caused by: java.lang.RuntimeException: Failed to connect to zookeeper (192.168.99.125:8080) within 2x zookeeper timeout period 30000

I ran nmap against port 2181 to make sure it's open. The error mentions :8080 though. That's Ambari on that server.

Also some questions for clarification:
1) Can the data source name be any arbitrary name?
2) Is there an expected timeout period where a failed connection returns back a message and the spinner on the page stops?
3) Googling the error indicates it may be related to zookeeper not having sufficient resources. I'm on a Hortonworks Sandbox and Zookeeper is green in Ambari. I'm to new with it to know how to troubleshoot well. 

Any ideas on troubleshooting this? Has anyone else seen this before?

Thanks,

  Scott


_______________________________________________
geowave-dev mailing list
geowave-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geowave-dev



_______________________________________________
geowave-dev mailing list
geowave-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geowave-dev



Back to the top