RHEL 6.3

1,247 views
Skip to first unread message

smovva

unread,
Jan 3, 2013, 12:05:34 PM1/3/13
to car...@googlegroups.com
Has anyone successfully installed Cartodb on RHEL 6.3? 
If so, please provide me any tips or guidance. 

Thanks!

Jeremy Schulz

unread,
Jan 7, 2013, 6:28:34 PM1/7/13
to car...@googlegroups.com
I've done this once with good results....although that was back before CartoDB 2.0.

I've attached the notes I took when I went through the install.  Some of this might no longer be relevant such as the versions as I believe CartoDB 2.0 is based on newer packages.  Hopefully it may help you where you are stuck though.  Let me know if you have any more questions.
CartoDB Installation for RHEL 6.docx

Jeremy Schulz

unread,
Jan 7, 2013, 6:31:12 PM1/7/13
to car...@googlegroups.com
I should also add that I had to download some of the rpms off other websites such as http://rpm.pbone.net/ as they were not available from RedHat.

smovva

unread,
Jan 12, 2013, 6:04:42 PM1/12/13
to car...@googlegroups.com
Thank you. I'll let you know how it goes.

smovva

unread,
Jan 12, 2013, 7:01:07 PM1/12/13
to car...@googlegroups.com
Here are the issues i have so fat.
- I could not find unp for RHEL.
- Errors building node-postgres
      Here is the error message: npm WARN cannot run in wd p...@0.8.7-cdb1 node-gyp rebuild || (exit 0)
Thank you very much. Your document if very helpful.


On Monday, January 7, 2013 6:31:12 PM UTC-5, Jeremy Schulz wrote:

Jeremy Schulz

unread,
Jan 13, 2013, 2:40:06 PM1/13/13
to car...@googlegroups.com
As for unp, I think what I had to do was download the software here: http://packages.debian.org/sid/unp

unp is just a perl script, so I think all I did was just copy the unp script to my bin folder so I could execute it.

As for the other command, I couldn't help too much unless I knew the context in which the error occured (i.e. what command were you using)

I also still have every one of my installation files.  If need be, I could tar them all up and send them to you....although we're looking at ~500mb or so, and this was CartoDB 1 not 2.0.   Hope this helps!

Jeremy

smovva

unread,
Jan 13, 2013, 6:39:38 PM1/13/13
to car...@googlegroups.com
Thank you for the response and thanks for offering the tar ball. I'll let you know if I need it.

Jeremy Schulz

unread,
Sep 12, 2013, 1:12:12 PM9/12/13
to car...@googlegroups.com
I've updated my RHEL Install Doc for CartoDB2.0.  These are just the steps I took to get it working for me in my situation.  Hopefully it can help others out if they're also looking to do the same
CartoDB 2.0 Installation for RHEL 6 .docx

Alex C-W

unread,
Oct 17, 2013, 5:45:10 PM10/17/13
to car...@googlegroups.com
Jeremy, thanks so much for this document.

Can you explain how to "run postgis_template_setup.sh as the postgres user you created earlier"? I don't know where that .sh file lives, or how to run it as the postgres user.

Jeremy Schulz

unread,
Oct 20, 2013, 8:18:33 AM10/20/13
to car...@googlegroups.com
Alex, sorry about that. I forgot that I had created that from the Linux commands on the CartoDB read me file. The instructions I wrote we're so whomever tried to manage the server after me could replicate an install so I tried to make it easier for them. For the first command, keep in mind when you copy/paste those quotes should actually be backticks.

#!/usr/bin/env bash
POSTGIS_SQL_PATH='pg_config --sharedir'/contrib/postgis-2.0
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql
psql -d postgres -c \
"UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis'"
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
psql -d template_postgis -f $POSTGIS_SQL_PATH/legacy.sql
psql -d template_postgis -f $POSTGIS_SQL_PATH/rtpostgis.sql
psql -d template_postgis -f $POSTGIS_SQL_PATH/topology.sql
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"

Alex C-W

unread,
Oct 25, 2013, 11:31:00 PM10/25/13
to car...@googlegroups.com
Jeremy, thanks again for your help. I can't emphasize how helpful your document was -- I have something up and running on CentOS! (I'll be installing on RHEL eventually, but I'm trying to get it right first on CentOS.) I have a problem and I was hoping you might know the cause. (If you think it would be better to ask the whole group this question, I'm happy to do so.)

I can't upload any kind of dataset. Seems kind of important... This includes importing the "common data" found in the CartoDB GUI, so I'm pretty sure it's not a problem with the dataset itself. 

In the GUI, it's giving me "Error 2001", which seems like a pretty uninformative error.

In terminal at the same time, I'm getting the following output:
Data provided by Pastebin.com - Download Raw - See Original
  1. 19:35:48 web.1     | Started GET "/api/v1/imports/17" for 127.0.0.1 at 2013-10-25 19:35:48 -0700
  2. 19:35:48 web.1     | Processing by Api::Json::ImportsController#show as JSON
  3. 19:35:48 web.1     |   Parameters: {"id"=>"17"}
  4. 19:35:48 web.1     | [Rollbar] Got unexpected status code from Rollbar api: 403
  5. 19:35:48 web.1     | [Rollbar] Response: {
  6. 19:35:48 web.1     |   "err": 1,
  7. 19:35:48 web.1     |   "message": "access token not found: null"
  8. 19:35:48 web.1     | }
  9. 19:35:48 web.1     | [Rollbar] Details: https://rollbar.com/instance/uuid?uuid=d6cbbe50-7c16-4b12-9dd9-95b9cdee4d3e (only available if report was successful)
  10. 19:35:48 web.1     | (0.000700s) SELECT * FROM "users" WHERE ("username" = 'alex') LIMIT 1
  11. 19:35:48 web.1     | 2013-10-26T02:35:44Z || Getting file from http://cartodb.s3.amazonaws.com/static/TM_WORLD_BORDERS_SIMPL-0.3.zip
  12. 19:35:48 web.1     | 2013-10-26T02:35:46Z || Starting import for /tmp/20131025-64196-di3cv/TM_WORLD_BORDERS_SIMPL-0.3.zip
  13. 19:35:48 web.1     | 2013-10-26T02:35:46Z || Unpacking /tmp/20131025-64196-di3cv/TM_WORLD_BORDERS_SIMPL-0.3.zip
  14. 19:35:48 web.1     | 2013-10-26T02:35:46Z || Importing data from /tmp/20131025-64196-167zfoa/tm_world_borders_simpl-0.3.shp
  15. 19:35:48 web.1     | 2013-10-26T02:35:47Z || Detected encoding WIN1252
  16. 19:35:48 web.1     | 2013-10-26T02:35:47Z || Using database connection with {:adapter=>"postgres", :encoding=>"unicode", :host=>"localhost", :port=>5432, :database=>"cartodb_dev_user_1_db", :username=>"postgres", :user=>"development_cartodb_user_1"}
  17. 19:35:48 web.1     | 2013-10-26T02:35:47Z || ogr2ogr output:    -nlt PROMOTE_TO_MULTI: type not recognised.
  18. 19:35:48 web.1     |
  19. 19:35:48 web.1     | 2013-10-26T02:35:47Z || ogr2ogr exit code: 256
Seems to be a problem with ogr2ogr, a GDAL component.

I was having a lot of trouble with installing GDAL your way, so I actually just installed it using
sudo yum install gdal*
Even so, when it came time to install the python requirements using:
pip install –r python_requirements.txt  
It kept getting tripped up on installing GDAL, throwing errors like these:
Data provided by Pastebin.com - Download Raw - See Original
  1. Downloading/unpacking GDAL==1.10.0 (from -r python_requirements.txt (line 6))
  2.   Downloading GDAL-1.10.0.tar.gz (449kB): 449kB downloaded
  3.   Running setup.py egg_info for package GDAL
  4. Installing collected packages: GDAL
  5.   Found existing installation: GDAL 1.9.2
  6.     Uninstalling GDAL:
  7.       Successfully uninstalled GDAL
  8.   Running setup.py install for GDAL
  9.     building 'osgeo._gdal' extension
  10.     gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.6 -I/usr/lib64/python2.6/site-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.6/extensions/gdal_wrap.o
  11.     extensions/gdal_wrap.cpp:2853:22: error: cpl_port.h: No such file or directory
  12.     extensions/gdal_wrap.cpp:2854:24: error: cpl_string.h: No such file or directory
  13.     extensions/gdal_wrap.cpp:2855:27: error: cpl_multiproc.h: No such file or directory
  14.     extensions/gdal_wrap.cpp:2856:22: error: cpl_http.h: No such file or directory
  15.     extensions/gdal_wrap.cpp:2858:18: error: gdal.h: No such file or directory
  16.     extensions/gdal_wrap.cpp:2859:23: error: gdal_priv.h: No such file or directory
  17.     extensions/gdal_wrap.cpp:2860:22: error: gdal_alg.h: No such file or directory
  18.     extensions/gdal_wrap.cpp:2861:24: error: gdalwarper.h: No such file or directory
  19.     extensions/gdal_wrap.cpp:4625:22: error: gdalgrid.h: No such file or directory
  20.     extensions/gdal_wrap.cpp:2878: error: ‘CPLErrorHandler’ does not name a type
  21.     extensions/gdal_wrap.cpp:2881: error: expected initializer before ‘PythonBindingErrorHandler’
  22.     extensions/gdal_wrap.cpp:2753: warning: ‘swig_module’ defined but not used
  23.     error: command 'gcc' failed with exit status 1
I assumed since it was trying to install GDAL 1.1.0 that I was fine to ignore these errors. I uncommented out GDAL 1.1.0 in the python_requirements.txt file, and it worked okay.

There were a few other problems during the install, but GDAL seems to be the likely suspect. 
If you have any ideas, I'd really appreciate it!

Lorenzo Planas

unread,
Oct 26, 2013, 1:03:02 AM10/26/13
to car...@googlegroups.com
Hi Alex:

I can confirm your problems importing files are related to the GDAL version. Note we require > 1.10, and that 1.10 > 1.1.0  :D

Kind regards,

Lorenzo

Prabu Raja

unread,
Oct 29, 2013, 2:15:40 AM10/29/13
to car...@googlegroups.com
I couldn't locate "python_requirements.txt " and I get the following error.

Could not open requirements file: [Errno 2] No such file or directory: 'python_requirements.txt'

Please help.

Sandro Santilli

unread,
Oct 29, 2013, 7:10:27 AM10/29/13
to car...@googlegroups.com
On Mon, Oct 28, 2013 at 11:15:40PM -0700, Prabu Raja wrote:
> I couldn't locate "python_requirements.txt " and I get the following error.
>
> Could not open requirements file: [Errno 2] No such file or directory:
> 'python_requirements.txt'

Where did you get the code from ? The python_requirements.txt file should
be in the main directory of the source tree.

--strk;

Jeremy Schulz

unread,
Oct 29, 2013, 2:15:44 PM10/29/13
to car...@googlegroups.com
Alex,

Sorry for taking so long to get back to you.  I'd be curious if you can run ogr2ogr manually from the command line.  This would pinpoint if it was an issue with CartoDB or with that specific command.  What errors were you getting with the GDAL install?  I don't recall any major issues with the install with GDAL.

If you could run the ./configure and make again, and let me know if you come across any errors, that might spark something.

Thanks!

Jeremy

Prabu Raja

unread,
Nov 1, 2013, 3:22:48 AM11/1/13
to car...@googlegroups.com
Thanks strk. I found and installed. But stuck at "#<NoMethodError: undefined method `email=' for #<User @values={}>>" error when running "sh script/create_dev_user [mysubdomain]" command. For mysubdomain I gave "carto".

carto_db_development, carto_db_test database's created without any user records.

When I run the same command again, getting "#<Sequel::DatabaseError: PG::Error: ERROR:  syntax error at or near "ALL"
LINE 1: REVOKE ALL ON ALL SEQUENCES IN SCHEMA public FROM PUBLIC"
, one more database "cartodb_dev_user_1_db" created and one role "development_cartodb_user_1".

Then I started the server using following command "bundle exec foreman start –p 3000".

Now I am getting login page when accessing http://IPAddress:3000/, but couldn't login.

any idea what goes wrong?

Sandro Santilli

unread,
Nov 1, 2013, 6:43:03 AM11/1/13
to car...@googlegroups.com
On Fri, Nov 01, 2013 at 12:22:48AM -0700, Prabu Raja wrote:
> Thanks strk. I found and installed. But stuck at *"#<NoMethodError:
> undefined method `email=' for #<User @values={}>>"* error when running *"sh
> script/create_dev_user [mysubdomain]"* command. For mysubdomain I gave *
> "carto"*.

I usually run that script with no arguments. It'll prompt me for args.
Try it, Just in case it's a bug in the script.

> *carto_db_development*, *carto_db_test* database's created without any user
> records.
>
> When I run the same command again, getting *"#<Sequel::DatabaseError:
> PG::Error: ERROR: syntax error at or near "ALL"
> LINE 1: REVOKE ALL ON ALL SEQUENCES IN SCHEMA public FROM PUBLIC"* , one
> more database "*cartodb_dev_user_1_db*" created and one role
> "development_cartodb_user_1".

Which PostgreSQL version are you running ?

--strk;

Prabu Raja

unread,
Nov 1, 2013, 2:00:58 PM11/1/13
to car...@googlegroups.com
On Fri, Nov 1, 2013 at 4:13 PM, Sandro Santilli <st...@vizzuality.com> wrote:
On Fri, Nov 01, 2013 at 12:22:48AM -0700, Prabu Raja wrote:
> Thanks strk. I found and installed. But stuck at *"#<NoMethodError:
> undefined method `email=' for #<User @values={}>>"* error when running *"sh
> script/create_dev_user [mysubdomain]"* command. For mysubdomain I gave *
> "carto"*.

I usually run that script with no arguments. It'll prompt me for args.
Try it, Just in case it's a bug in the script.

Tried this method, same result.

> *carto_db_development*, *carto_db_test* database's created without any user
> records.
>
> When I run the same command again, getting *"#<Sequel::DatabaseError:
> PG::Error: ERROR:  syntax error at or near "ALL"
> LINE 1: REVOKE ALL ON ALL SEQUENCES IN SCHEMA public FROM PUBLIC"* , one
> more database "*cartodb_dev_user_1_db*" created and one role
> "development_cartodb_user_1".

Which PostgreSQL version are you running ? 

I just realized,  our server running PostgreSQL 8.4. I will upgrade the PostgreSQL and try. Thanks.

--strk;

--

---
You received this message because you are subscribed to a topic in the Google Groups "cartodb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cartodb/xlxtoGtdrbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cartodb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Regards,
Prabu Raja

Prabu Raja

unread,
Dec 3, 2013, 9:21:25 PM12/3/13
to car...@googlegroups.com
I upgraded the postgresql and postgis to 9.3,2.1 respectively, but same result. I am struck here.
Message has been deleted

Jeremy Schulz

unread,
Dec 6, 2013, 12:12:58 PM12/6/13
to car...@googlegroups.com
Prabu, you may want to open Postgres and manually remove all databases associated with CartoDB. Then try running that create user script again. When it was created before with Postgres < 9.1 it looks as though it wasn't created properly.

Prabu Raja

unread,
Dec 6, 2013, 12:23:23 PM12/6/13
to car...@googlegroups.com

Jeremy, I did that three times, but same issue repeating. Any other possible ways to solve this?

On Dec 6, 2013 10:43 PM, "Jeremy Schulz" <scu...@gmail.com> wrote:
Prabu,  you may want to open Postgres and manually remove all databases associated with CartoDB. Then try running that create user script again. When it was created before with Postgres < 9.1 it looks as though it wasn't created properly.

Jeremy Schulz

unread,
Dec 10, 2013, 2:28:21 PM12/10/13
to car...@googlegroups.com
It looks as though others are having this issue as well: https://groups.google.com/forum/#!topic/cartodb/cI_O5FQp5Ro

There's also a bug tracker on it right now.  You'll want to check this out as well: https://github.com/CartoDB/cartodb/issues/259

Hope this helps!

Jeremy Schulz

unread,
Dec 14, 2013, 1:09:07 PM12/14/13
to car...@googlegroups.com
Prabu,

Just got this error tonight during a fresh install.  Doing a rake db:migrate in the cartodb20 directory and then running the script again seemed to work for me.  If you're running the script a second time, you'll likely see errors about some databases already existing, but this is normal.


On Friday, December 6, 2013 10:23:23 AM UTC-7, Prabu Raja wrote:

Prabu Raja

unread,
Dec 19, 2013, 12:49:21 AM12/19/13
to car...@googlegroups.com
Thanks Jeremy, It solved that problem and everything installed properly.

Now I have following problem. I have installed on our VPS (which doesn't have any control panels)

I have created one user named "carto", entry in users table of development database "carto_db_development" also exist. But no table was created under test database "carto_db_test".

Started CartoDB with command "bundle exec foreman start -p 3000"

When I hit http://IP-ADDRESS:3000/login  I can see login page, but I couldn't login with correct credentials. URL on browser window changed to "http://IP-ADDRESS:3000/sessions/create" and error message "Your account or your password is not ok" shows next to user name & password fields .

Tried hitting http://carto.domainname.com:3000/login , I can see login page, but I couldn't login. Not getting any error message and no change in url on browser window.

Under "21.CartoDB.js" step,

Currently I have changed all server names to "carto.domainname.com", is this correct? or Should I keep it as "domainname.com"?

I am absolutely new to cartodb, so I dont know where I  am going wrong. Please help me with this.

Thanks,
Prabu Raja


On Sat, Dec 14, 2013 at 11:39 PM, Jeremy Schulz <scu...@gmail.com> wrote:
Prabu,

Just got this error tonight during a fresh install.  Doing a rake db:migrate in the cartodb20 directory and then running the script again seemed to work for me.  If you're running the script a second time, you'll likely see errors about some databases already existing, but this is normal.


On Friday, December 6, 2013 10:23:23 AM UTC-7, Prabu Raja wrote:

Jeremy, I did that three times, but same issue repeating. Any other possible ways to solve this?

On Dec 6, 2013 10:43 PM, "Jeremy Schulz" <scu...@gmail.com> wrote:
Prabu,  you may want to open Postgres and manually remove all databases associated with CartoDB. Then try running that create user script again. When it was created before with Postgres < 9.1 it looks as though it wasn't created properly.

--

---
You received this message because you are subscribed to a topic in the Google Groups "cartodb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cartodb/xlxtoGtdrbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cartodb+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "cartodb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cartodb/xlxtoGtdrbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cartodb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Regards,
Prabu Raja

Jeremy Schulz

unread,
Dec 21, 2013, 2:52:41 PM12/21/13
to car...@googlegroups.com
Prabu,  

Sorry for the confusion on this.  The CartoDB.js at the time pointed to the cartodb.com servers.  I changed this so when I built a visualization on a separate page, it would point to my server.  I'm not sure if this was the proper way to do it or not, but it worked for my project.  It's not needed as part of the CartoDB software install, so I wouldn't worry about it yet.  I suggest just skipping this, and trying to run CartoDB without it.

Jeremy

Prabu Raja

unread,
Dec 30, 2013, 8:27:08 PM12/30/13
to car...@googlegroups.com
Fixed it. Checked the log entries and found "CSRF token authenticity" error.

changing instances of "localhost.lan" to public domain name solved it. Solution found here. Now I have cartoDB running, Thank you so much.

Thanks,
Prabu Raja


On Mon, Dec 30, 2013 at 1:03 AM, Prabu Raja <prab...@gmail.com> wrote:
Jeremy,

It doesn't help, same result. Sadly, I stuck here.

Thanks,
Prabu Raja

Prabu Raja

unread,
Dec 29, 2013, 2:33:36 PM12/29/13
to car...@googlegroups.com
Jeremy,

It doesn't help, same result. Sadly, I stuck here.

Thanks,
Prabu Raja

Prabu Raja

unread,
Jan 2, 2014, 5:03:31 PM1/2/14
to car...@googlegroups.com
Jeremy,

Under CartoDB Windshaft

j. changed sql_*, cartodb_* and tiler_*, I couldn't understand this, Could you please tell in which file what variable needs to be changed?

Also does CartoDB.js folder come under cartodb20 or outside like Windshaft-cartodb & CartoDB-SQL-API?

I can upload shape files, view as table, but couldn't view it map. I am getting following error when selecting map view.

"There is a problem with your connection"


Thanks,
Prabu Raja

Javier Santana

unread,
Jan 3, 2014, 3:57:55 AM1/3/14
to car...@googlegroups.com

On Thu, Jan 2, 2014 at 11:03 PM, Prabu Raja <prab...@gmail.com> wrote:

"There is a problem with your connection"

Could you check the developer tools and see what host is using to fetch the tiles?


--
www.cartodb.com
Map, analyze and build applications with your data

Prabu Raja

unread,
Jan 3, 2014, 7:15:06 AM1/3/14
to car...@googlegroups.com
<img class="leaflet-tile leaflet-tile-loaded" style="height: 256px; width: 256px; transform: translate(Xpx, Ypx);" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">

For all tiles, its showing same source.

Thanks,
Prabu Raja


--

Javier Santana

unread,
Jan 3, 2014, 7:17:04 AM1/3/14
to car...@googlegroups.com
Hi, 

I meant in network tab, you probably will see some red request[s], could you paste here the url that fails?


--
 
---
You received this message because you are subscribed to the Google Groups "cartodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cartodb+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Javier Santana

unread,
Jan 3, 2014, 7:17:41 AM1/3/14
to car...@googlegroups.com
(FYI that src=data... it's a placeholder while tiles are loaded, I will probably remove it because it's useless)

Prabu Raja

unread,
Jan 3, 2014, 7:29:04 AM1/3/14
to car...@googlegroups.com
Below is the error message I get while hitting this url,

{"errors":["missing carto's database_name in redis (try CARTODB/script/restore_redis)"]}


Thanks,
Prabu Raja

Javier Santana

unread,
Jan 3, 2014, 7:31:20 AM1/3/14
to car...@googlegroups.com
Did you try the restore redis ? It's in cartodb repository

Prabu Raja

unread,
Jan 3, 2014, 7:44:11 AM1/3/14
to car...@googlegroups.com
Yes I did. Script run successfully.  But problem not resolved.

I couldn't access SQL API either.

http://carto.localhost.lan:8080/api/v2/sql?q=SELECT * FROM table_name&api_key=d6dc823471c1e8e5410a8b8df5ac845b364a7700

getting below response.

{"error":["Sorry, we can't find CartoDB user 'carto'. Please check that you have entered the correct domain."],"stack":"Error: Sorry, we can't find CartoDB user 'carto'. Please check that you have entered the correct domain.\n    at module.exports.me.getUserDBName (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/lib/carto_metadata.js:81:22)\n    at Function.releaseRedisClient (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/lib/carto_metadata.js:426:17)\n    at next (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/step/lib/step.js:51:23)\n    at try_callback (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/node_modules/redis-mpool/node_modules/redis/index.js:579:9)\n    at RedisClient.return_reply (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/node_modules/redis-mpool/node_modules/redis/index.js:664:13)\n    at HiredisReplyParser.RedisClient.init_parser (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/node_modules/redis-mpool/node_modules/redis/index.js:312:14)\n    at HiredisReplyParser.EventEmitter.emit (events.js:96:17)\n    at HiredisReplyParser.execute (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/node_modules/redis-mpool/node_modules/redis/lib/parser/hiredis.js:43:18)\n    at RedisClient.on_data (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/node_modules/redis-mpool/node_modules/redis/index.js:535:27)\n    at Socket.<anonymous> (/opt/cartodb2.0/CartoDB-SQL-API/node_modules/cartodb-redis/node_modules/redis-mpool/node_modules/redis/index.js:91:14)"}

Thanks,
Prabu Raja

Prabu Raja

unread,
Jan 3, 2014, 8:34:29 AM1/3/14
to car...@googlegroups.com
Below the URL &  post parameters passed with url.

http://carto.localhost.lan:8181/tiles/layergroup?map_key=d6dc823471c1e8e5410a8b8df5ac845b364a7700

{"version":"1.0.1","layers":[{"type":"cartodb","options":{"sql":"select * from table_name","cartocss":"#table_name {\n polygon-fill:#FF6600;\n polygon-opacity: 0.7;\n line-opacity:1;\n line-color: #FFFFFF;\n}","cartocss_version":"2.1.1","interactivity":["cartodb_id"]}}]}

Thanks,
Prabu Raja

Javier Santana

unread,
Jan 3, 2014, 8:38:06 AM1/3/14
to car...@googlegroups.com
Have you created "carto" user? (notice the username it get from subdomain)

Prabu Raja

unread,
Jan 3, 2014, 8:49:31 AM1/3/14
to car...@googlegroups.com
database user only right? I created "carto" subdomain (dbuser) by running "sh script/create_dev_user" inside cartodb directory.

I can login using the below link.

http://carto.localhost.lan:3000/



Thanks,
Prabu Raja

Javier Santana

unread,
Jan 3, 2014, 8:55:39 AM1/3/14
to car...@googlegroups.com
Seems ok, could you paste the result of:

echo "keys rails:users*" | redis-cli -n 5

thanks

Prabu Raja

unread,
Jan 3, 2014, 9:56:58 AM1/3/14
to car...@googlegroups.com
It returns as (empty list or set)



Thanks,
Prabu Raja

Javier Santana

unread,
Jan 3, 2014, 10:12:43 AM1/3/14
to car...@googlegroups.com
That means redis is not updated properly.

Could you execute the restore redis script but before that execute:

redis-cli -n 5 monitor

thansk!

Prabu Raja

unread,
Jan 3, 2014, 11:10:37 AM1/3/14
to car...@googlegroups.com
I removed development database, development users and run script/create_dev_user but no luck.

Here is the output for redis-cli -n 5 monitor

http://pastebin.com/f1q6vTYE

And output for make check in Windshaft-cartodb is below (9 errors)

http://pastebin.com/dAX20kGd

Thanks.

Javier Santana

unread,
Jan 3, 2014, 11:13:42 AM1/3/14
to car...@googlegroups.com
Can't understand why HMSET is being done (it appears in the monitor) and then, when you list the keys with 'echo "keys rails:users*" | redis-cli -n 5' you can't see it 

Do you have more than one redis instance?

Prabu Raja

unread,
Jan 3, 2014, 11:18:44 AM1/3/14
to car...@googlegroups.com
No, I do have only one instance of redis.

Thanks,
Prabu Raja


Javier Santana

unread,
Jan 3, 2014, 11:22:18 AM1/3/14
to car...@googlegroups.com
Oh wait:

- don't do make check after restore_redis and try again
- in order to pass tests you should install imagemagick (probably a nightmare in redhat)


--
 
---
You received this message because you are subscribed to the Google Groups "cartodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cartodb+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Prabu Raja

unread,
Jan 3, 2014, 11:38:53 AM1/3/14
to car...@googlegroups.com
Just found that restore-redis sets up users properly and it being lost again once stop redis.

below sequence of commands run and output.

redis-server # redis started in terminal 1

sh script/restore_redis  # restore redis started and finished successfully in terminal 2

echo "keys rails:users*" | redis-cli -n 5  # out for this in terminal 2  is 1) "rails:users:carto"

Now in terminal 1, I stopped redis by pressing Ctrl+D

echo "keys rails:users*" | redis-cli -n 5  # out for this in terminal 2  is (empty list or set)

Javier Santana

unread,
Jan 3, 2014, 11:44:21 AM1/3/14
to car...@googlegroups.com
Why do you stop redis? probably you stop it before it dumps the data to the disk.

Prabu Raja

unread,
Jan 3, 2014, 11:53:52 AM1/3/14
to car...@googlegroups.com
How long should I wait before stop redis? and how can I confirm it dumps the data? Sorry I never used redis before, so i don't have any idea.

Javier Santana

unread,
Jan 3, 2014, 11:58:24 AM1/3/14
to car...@googlegroups.com
Hi, 

redis should be always  running (the same than postgres) while you're running cartodb


--
 
---
You received this message because you are subscribed to the Google Groups "cartodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cartodb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Prabu Raja

unread,
Jan 3, 2014, 12:12:03 PM1/3/14
to car...@googlegroups.com
That is ok.

I am testing out development environment by starting everything with following command (which starts redis also)
bundle exec foreman start –p 3000

My concern is that if user data get lost every time redis stops then I have to run restore_redis whenever system restarts. How to overcome this?

I am getting following warning while starting redis,

WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

I dont know whether this is problem, but tried running the command 'sysctl vm.overcommit_memory=1' which failed with following message

error: "Operation not permitted" setting key "vm.overcommit_memory"

I am running in a virtual machine and I read somewhere we can't change vm.overcommit_memory in virtual machines.

Thank you so much for all your valuable time on this.

Thanks

Thanks,
Prabu Raja


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "cartodb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cartodb/xlxtoGtdrbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cartodb+u...@googlegroups.com.

Prabu Raja

unread,
Jan 3, 2014, 3:46:33 PM1/3/14
to car...@googlegroups.com

redis-cli save
redis-cli shutdown


running above command after  sh script/restore_redis saved user information in rails.

but still I get error while accessing http://carto.localhost.lan:8181/tiles/layergroup?map_key=3e4e588a686a5a1bda9a5e39d95174e8c4d65c8e


{"errors":["missing carto's database_name in redis (try CARTODB/script/restore_redis)"]}


echo "keys rails:users*" | redis-cli -n 5 # Outputs

1) "rails:users:carto"

Any idea what goes wrong here?

Thanks you so much.

James David Smith

unread,
Jan 6, 2014, 11:30:18 AM1/6/14
to car...@googlegroups.com
Hey all,

Just to say that if someone fancied writing all this up into a blog post or similar I would be hitting the +1 button VERY regularly... :-)

James

Javier Santana

unread,
Jan 7, 2014, 4:01:24 AM1/7/14
to car...@googlegroups.com
Hi, 

could you try: 

echo "hget rails:users:cartodb database_name" | redis-cli -n 5


--
 
---
You received this message because you are subscribed to the Google Groups "cartodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cartodb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Prabu Raja

unread,
Jan 7, 2014, 8:21:27 AM1/7/14
to car...@googlegroups.com
Output is
(nil)


Thanks,
Prabu Raja


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "cartodb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cartodb/xlxtoGtdrbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cartodb+u...@googlegroups.com.

Javier Santana

unread,
Jan 7, 2014, 8:48:36 AM1/7/14
to car...@googlegroups.com
We have something wrong here, in the previous script the database_name was being set (http://pastebin.com/f1q6vTYE) but now when you get the database_name for that user is null.

Please, check that redis is not restarted/stopped between restore_redis and the following commands and do not execute windshaft tests after restore_redis (it clear redis database)

Prabu Raja

unread,
Jan 7, 2014, 9:10:07 AM1/7/14
to car...@googlegroups.com
Just now I did following steps again,

redis-server

redis-cli -n 5 monitor

sh script/restore_redis

echo "keys rails:users*" | redis-cli -n 5 (output below)

1) "rails:users:carto"

echo "hget rails:users:cartodb database_name" | redis-cli -n 5 (output below)

(nil)

I am not doing any of those (restart/stop redis, execute windshaft tests) after restore_redis. I dont know why it is setting up, but couldn't retrieve.

In the following thread I saw similar problem, but I couldn't understand the solution which worked for him.
Could you please check what he is referring? Thanks a lot for your time on this.
 

Thanks,
Prabu Raja


On Tue, Jan 7, 2014 at 7:18 PM, Javier Santana <jsan...@vizzuality.com> wrote:
We have something wrong here, in the previous script the database_name was being set (http://pastebin.com/f1q6vTYE) but now when you get the database_name for that user is null.

Please, check that redis is not restarted/stopped between restore_redis and the following commands and do not execute windshaft tests after restore_redis (it clear redis database)

Javier Santana

unread,
Jan 7, 2014, 9:20:03 AM1/7/14
to car...@googlegroups.com

On Tue, Jan 7, 2014 at 3:10 PM, Prabu Raja <prab...@gmail.com> wrote:
echo "hget rails:users:cartodb database_name" | redis-cli -n 5 (output below)

Sorry, do:

echo "hget rails:users:carto database_name" | redis-cli -n 5 

(notice the user is carto not cartodb)

Prabu Raja

unread,
Jan 7, 2014, 12:32:30 PM1/7/14
to car...@googlegroups.com
Oh, Sorry I too didn't notice that. Thanks a lot Javier. It works now. For some reason, my older table wasn't loaded (map), I cleared it from database and loaded fresh data. Now everything works fine.

Thanks again for all your help.

Thanks,
Prabu Raja


--

Harin Kodavati

unread,
Feb 5, 2014, 2:44:26 AM2/5/14
to car...@googlegroups.com
can anyone help me out from this error

#pip install -r python_requirements.txt

Could not find a version that satisfies the requirement argparse==1.2.1 (from -r python_requirements.txt (line 2)) (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 1.0.1, 1.0, 1.1)
  Some externally hosted files were ignored (use --allow-external to allow).
Cleaning up...
No distributions matching the version for argparse==1.2.1 (from -r python_requirements.txt (line 2))
Storing debug log for failure in /root/.pip/pip.log

Jeremy Schulz

unread,
Feb 5, 2014, 1:50:27 PM2/5/14
to car...@googlegroups.com
Harin,

It looks like argparse 1.2.1 is available: https://pypi.python.org/pypi/argparse/1.2.1 .  I'm not sure why you're not able to access it. 

Perhaps you could try updating pip: $ sudo pip install --upgrade pip

If not, perhaps what you should do is try to install it manually via the link above. Hope this helps!

Jeremy
Message has been deleted

Harin Kodavati

unread,
Feb 13, 2014, 1:44:04 AM2/13/14
to car...@googlegroups.com
after installing "imagemagick" it rectifies 4 errors ........
after that it shows these errors..............
how can i rectify it?????

✖ 8 of 74 tests failed:

  1) server uses sqlapi to figure source data of query:
     TypeError: Cannot call method 'substring' of undefined
      at Function.checkResponse (/opt/cartodb2.0/Windshaft-cartodb/test/acceptance/server.js:993:29)
      at next (/opt/cartodb2.0/Windshaft-cartodb/node_modules/step/lib/step.js:51:23)
      at IncomingMessage.assert.response (/opt/cartodb2.0/Windshaft-cartodb/test/support/assert.js:256:17)
      at IncomingMessage.EventEmitter.emit (events.js:126:20)
      at IncomingMessage._emitEnd (http.js:367:10)
      at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
      at Socket.socketOnData [as ondata] (http.js:1491:20)
      at TCP.onread (net.js:404:27)

  2) multilayer layergroup with 2 layers, each with its style:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)

  3) multilayer layergroup can hold substitution tokens:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)

  4) multilayer layergroup creation raises mapviews counter:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)

  5) multilayer layergroup creation fails if CartoCSS is bogus:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)

  6) multilayer layergroup with 2 private-table layers:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)

  7) multilayer invalid text-name in CartoCSS:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)

  8) multilayer quotes CartoCSS:
     Error: listen EADDRINUSE
      at errnoException (net.js:770:11)
      at HTTPServer.Server._listen2 (net.js:910:14)
      at listen (net.js:932:10)
      at Server.listen (net.js:1006:9)
      at dns.js:72:18
      at process.startup.processNextTick.process._tickCallback (node.js:245:9)



Thanks!
Reply all
Reply to author
Forward
0 new messages