tile urls are not recognized / generated correctly, http://{subdomain}.null:null/tiles

1,197 views
Skip to first unread message

Stephan Meijer

unread,
Jun 22, 2013, 11:54:57 AM6/22/13
to car...@googlegroups.com
Even after a complete re-install the tile urls are still generated incorrectly.

Anybody have an idea how to solve this?

Tile urls (as in for the images) are generated like:  "http://development.null:null/tiles/untitled_table/15/16913/10642.png?cacheparams"

And also the utf-grids in the head section aren't generated correctly: 
<script type="text/javascript" src="http://development.null:null/tiles/untitled_table/15/16912/10642.grid.json?cacheparams" async=""></script>

Would be great if someone can help me out by telling me how to fix the "null:null" part. I don't think it's my config file. See the relevant part of app_config.yml below:
('mydomain.com' is in my file of course replaced by my real domain address)

defaults: &defaults
  debug_assets:       false
  mandatory_keys:     [layer_opts, tiler_domain, tiler_port, sql_api_domain, sql_api_endpoint, sql_api_port, varnish_management, redis]
  session_domain:     '.mydomain.com'
  tiler_protocol:     'http'
  tiler_domain:       'mydomain.com'
  tiler_port:         '8181'
  sql_api_protocol:   'http'
  sql_api_domain:     'mydomain.com'
  sql_api_endpoint:   '/api/v1/sql'
  sql_api_port:       8080
  api_requests_service_url: ''
  developers_host:    'http://dev.mydomain.com'
 
  layer_opts:
    ...
    data:
      kind: "carto"
      options:
        query:              ""
        opacity:            0.99
        auto_bound:         false
        interactivity:      "cartodb_id"
        debug:              true
        visible:            true
        tiler_domain:       "mydomain.com"
        tiler_port:         "8181"
        tiler_protocol:     "http"
        sql_domain:         "mydomain.com"
        sql_port:           "8080"
        sql_protocol:       "http"
        extra_params:       { cache_policy: 'persist' }
        cdn_url:            ""


(ps. I've asked this also in another thread, but I thought to split it up due to archiving and to make it easier to find for others with the same issue) 

Javier Santana

unread,
Jun 24, 2013, 2:55:48 AM6/24/13
to car...@googlegroups.com
Hi Stephan,

After changing the app_config you should restart the server and create a new layer to see if it works. Previously created layer remain with bad param configuration.

Hope it helps


--
 
---
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.
 
 



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

Stephan Meijer

unread,
Jun 24, 2013, 4:55:35 AM6/24/13
to car...@googlegroups.com
Hi Javier,

Rebooting was the first thing I tried. But that didn't fix it.

I also flushed redis, fixed the wrong json in the postgres database (development db, layers table), and used rake to clear the precompiled assets and temp files. After that, I again rebooted, and created a new layer trough the web interface. But this all didn't help.

Am I missing some config file or place somewhere?


Op maandag 24 juni 2013 08:55:48 UTC+2 schreef Javier Santana het volgende:

Javier Santana

unread,
Jun 24, 2013, 4:59:18 AM6/24/13
to car...@googlegroups.com
this is happening in the UI right? please, open develop tools and print "config" object

Stephan Meijer

unread,
Jun 24, 2013, 10:16:43 AM6/24/13
to car...@googlegroups.com
That seems to be the problem. Where is that object getting its data from?

Object {
  1. account_host"mydomain.com"
  2. cartodb_com_hostedfalse
  3. sql_api_domain"development.mydomain.com"
  4. sql_api_endpoint"/api/v1/sql"
  5. sql_api_port8080
  6. sql_api_protocol"http"
  7. tiler_domainnull
  8. tiler_portnull
  9. tiler_protocolnull
  10. ...
  11. }


Op maandag 24 juni 2013 10:59:18 UTC+2 schreef Javier Santana het volgende:

Javier Santana

unread,
Jun 24, 2013, 10:21:12 AM6/24/13
to car...@googlegroups.com
Are you working with develop branch or master branch? 

that config is inside config/app_config.yml

Stephan Meijer

unread,
Jun 24, 2013, 10:25:46 AM6/24/13
to car...@googlegroups.com
I'm using the master branch.


Op maandag 24 juni 2013 16:21:12 UTC+2 schreef Javier Santana het volgende:

Stephan Meijer

unread,
Jun 24, 2013, 10:56:08 AM6/24/13
to car...@googlegroups.com
I'm able to switch to the develop branch by using the code below:

git checkout develop
git submodule foreach git checkout develop
git merge --ff-only origin/develop
git submodule foreach git merge --ff-only origin/develop

rvm use 1.9.2@cartodb --create && bundle install

bundle exec rake db:migrate
bundle exec rake cartodb:db:load_functions
bundle exec rake assets:clean
bundle exec rake tmp:clear

foreman export upstart /etc/init -u root -a cartodb-stack -p 80
start cartodb-stack

This seems to solve the "config" object, as this is now:

    1. account_host"mydomain.com"
    2. cartodb_com_hostedfalse
    3. sql_api_domain"develop.mydomain.com"
    1. sql_api_endpoint"/api/v1/sql"
    2. sql_api_port8080
    3. sql_api_protocol"http"
    1. tiler_domain"mydomain.com"
    2. tiler_port"8181"
    3. tiler_protocol"http"

But I now still don't see any data tiles, this time because of another(?) error: "There is a problem with your connection".

When I'm drawing a new point trough the map interface, and clicking on the "done" button there are three requests fired to the server.

  1. POST to /records that actually saves the point. This one works, the geometry is saved to the database
  2. OPTIONS to http://development.mydomain.com:8181/tiles/layergroup?map_key=...... this one also works, returning GET,POST
  3. POST to http://development.mydomain.com:8181/tiles/layergroup?map_key=...... this request does not work. It's returning a code 400, with the response json: {"errors":["Error:couldnotfetchsourcetables:connectECONNREFUSED"]}
Does this information help you?


Op maandag 24 juni 2013 16:21:12 UTC+2 schreef Javier Santana het volgende:

Javier Santana

unread,
Jun 24, 2013, 10:58:20 AM6/24/13
to car...@googlegroups.com
Hi Stephan, 

take a look to the windshaft configuration and check if the sql api params are ok, I use the following (inside config/environments/development.js):

,sqlapi: {
        protocol: 'http',
        host: 'localhost.lan',
        port: 8080,
        version: 'v1'
    }

Javier Santana

unread,
Jun 24, 2013, 10:58:55 AM6/24/13
to car...@googlegroups.com
BTW we are preparing the 2.1 release for CartoDB in development so you may find it a little bit inestable.

Stephan Meijer

unread,
Jun 24, 2013, 11:13:18 AM6/24/13
to car...@googlegroups.com
Hi Javier,

Thanks for all your help so far.

Your config is the same as mine, except for the domain name.

I've also changed the branch of Windshaft-cartodb to "develop" and pulled all new changes. But unfortunately still without luck.

Hope you have a few suggestions left.



Op maandag 24 juni 2013 16:58:20 UTC+2 schreef Javier Santana het volgende:

Javier Santana

unread,
Jun 24, 2013, 11:48:05 AM6/24/13
to car...@googlegroups.com
And the SQL API is running in that port? you could check with curl http://localhost.lan:8080/api/v1/sql?q=select%201

have you localhost.lan included in your /etc/hosts?

for some reason windshaft can't connect to the sql api to fetch the tables involved in the sql query, that's the problem.

Stephan Meijer

unread,
Jun 24, 2013, 12:29:05 PM6/24/13
to car...@googlegroups.com
Yes it is.

returns: {"time":0.002,"fields":{"?column?":{"type":"number"}},"total_rows":1,"rows":[{"?column?":1}]}
returns a nice looking png with the "point" i placed trough the map interface.

That's the strange thing. Everything seems to work individually. The only request that doesn't work is the request to: http://development.mydomain.com:8181/tiles/layergroup?map_key=9b5953e4ac289934f7af82d4b08c98043d24433b
In my browser it works, but i'm missing the "config" component, I get that. The map view is failing because of the "could not fetch source tables: connect ECONNREFUSED" message.

I indeed added the domain(s) to the host file.


Op maandag 24 juni 2013 17:48:05 UTC+2 schreef Javier Santana het volgende:

Javier Santana

unread,
Jun 24, 2013, 12:39:43 PM6/24/13
to car...@googlegroups.com
just to be sure, you are running sql api  and winshaft with:

node app.js development

Stephan Meijer

unread,
Jun 24, 2013, 12:43:21 PM6/24/13
to car...@googlegroups.com
Yes, I'm sure :)

npm install
node app.js development


Op maandag 24 juni 2013 18:39:43 UTC+2 schreef Javier Santana het volgende:

Javier Santana

unread,
Jun 24, 2013, 12:55:40 PM6/24/13
to car...@googlegroups.com
I don't really know, the problem is clear, windshaft can't connect to the sql api but I don't know what I am missing

Stephan Meijer

unread,
Jun 24, 2013, 1:21:45 PM6/24/13
to car...@googlegroups.com
A last resort? Does this log file help you in any kind?

[Mon, 24 Jun 2013 17:16:04 GMT] - OPTIONS development.mydomain.com:8181/tiles/layergroup?map_key=9b5953e4ac289934f7af82d4b08c98043d24433b 200 11 ms -> text/html; charset=utf-8
[millstone] processing style 'style0'
[millstone] finished processing '/tmp/cdb-tiler-dev/millstone-dev/cartodb_dev_user_1_db/~a1f880b58d47e64812beed582dca039c/base'
ERROR running connecting to SQL API on http://development.mydomain.com:8080/api/v1/sql: Error: connect ECONNREFUSED
[Mon, 24 Jun 2013 17:16:05 GMT] - POST development.mydomain.com:8181/tiles/layergroup?map_key=9b5953e4ac289934f7af82d4b08c98043d24433b 400 44 ms -> application/json; charset=utf-8
Mon, 24 Jun 2013 17:17:00 GMT - RenderCache items: 0/0

Is that url correct? I can't visit it in the browser directly, it's giving me the error below. Because the error speaks about connecting, it is using the http protocol isn't it? So I guess it cannot be a user or role issue on the server side?

The http error message on a GET request:
{"error":["You must indicate a sql query"],"stack":"Error: You must indicate a sql query\n    at handleQuery (/root/CartoDB-SQL-API/app/controllers/app.js:151:37)\n    at /root/CartoDB-SQL-API/app/controllers/app.js:73:67\n    at callbacks (/root/CartoDB-SQL-API/node_modules/express/lib/router/index.js:272:11)\n    at param (/root/CartoDB-SQL-API/node_modules/express/lib/router/index.js:246:11)\n    at param (/root/CartoDB-SQL-API/node_modules/express/lib/router/index.js:243:11)\n    at pass (/root/CartoDB-SQL-API/node_modules/express/lib/router/index.js:253:5)\n    at Router._dispatch (/root/CartoDB-SQL-API/node_modules/express/lib/router/index.js:280:5)\n    at Object.middleware [as handle] (/root/CartoDB-SQL-API/node_modules/express/lib/router/index.js:45:10)\n    at next (/root/CartoDB-SQL-API/node_modules/express/node_modules/connect/lib/http.js:204:15)\n    at Object.bodyParser [as handle] (/root/CartoDB-SQL-API/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:88:61)"}



Op maandag 24 juni 2013 18:55:40 UTC+2 schreef Javier Santana het volgende:

Stephan Meijer

unread,
Jun 24, 2013, 1:56:18 PM6/24/13
to car...@googlegroups.com
I'm a bit further.

If I change the ip of the "module.exports.node_host" to 127.0.0.1 the map window works, and my POINT features show up. The only thing is, I than cannot visit the next url anymore: http://development.mydomain.com:8080/api/v1/sql?q=select%201

The thing I changed is:
 
file: /root/CartoDB-SQL-API/config/environments/development.js
line: module.exports.node_host    = '127.0.0.1'; // my IP was standing here

Does this give you some new insights?



Op maandag 24 juni 2013 19:21:45 UTC+2 schreef Stephan Meijer het volgende:

Stephan Meijer

unread,
Jun 25, 2013, 2:14:44 PM6/25/13
to car...@googlegroups.com
It works... Jeeej :)

The most valuable lesson learned:  never give up :)

So for the ones having the same problem, fix your /etc/hosts file!

I've removed the lines: 127.0.0.1 mydomain.com and replaced them by my external ip. So I now have

173.194.66.139 mydomain.com

instead of the suggested

127.0.0.1 mydomain.com

Don't know why it works, but it does!

Javier, many thanks for your support and patience with me.

Kind regards to everyone.
Stephan

Op zaterdag 22 juni 2013 17:54:57 UTC+2 schreef Stephan Meijer het volgende:

Sunil Sattiraju

unread,
Jul 23, 2013, 9:13:41 AM7/23/13
to car...@googlegroups.com
Hello..

i am having a similar problem 

my hosts file is like this
127.0.0.1       localhost
127.0.0.1       development.localhost.lan
127.0.0.1       localhost.lan

and i can log into the page and upload file, but when i click MapView i get "There is a Problem with your Connection". i have tried the above suggests steps above and for curl http://localhost.lan:8080/api/v1/sql?q=select%201 i get the below error message

i am running the stack using  bundle exec foreman start -p 3000 

Appreciate any help..

[Tue, 23 Jul 2013 13:01:12 GMT] - GET localhost:8080/api/v1/sql?q=select%201 404 19 ms -> application/json; charset=utf-8
EXCEPTION REPORT
Sorry, we can't find this CartoDB. Please check that you have entered the correct domain.
Error: Sorry, we can't find this CartoDB. Please check that you have entered the correct domain.
    at Function.setDBGetUser (/home/cartodb/CartoDB-SQL-API/app/controllers/app.js:185:27)
    at next (/home/cartodb/CartoDB-SQL-API/node_modules/step/lib/step.js:51:23)
    at Function.releaseRedisClient (/home/cartodb/CartoDB-SQL-API/app/models/metadata.js:69:17)
    at next (/home/cartodb/CartoDB-SQL-API/node_modules/step/lib/step.js:51:23)
    at try_callback (/home/cartodb/CartoDB-SQL-API/node_modules/redis/index.js:466:9)
    at RedisClient.return_reply (/home/cartodb/CartoDB-SQL-API/node_modules/redis/index.js:503:13)
    at HiredisReplyParser.RedisClient.init_parser (/home/cartodb/CartoDB-SQL-API/node_modules/redis/index.js:259:14)
    at HiredisReplyParser.EventEmitter.emit (events.js:88:17)
    at HiredisReplyParser.execute (/home/cartodb/CartoDB-SQL-API/node_modules/redis/lib/parser/hiredis.js:43:18)
    at RedisClient.on_data (/home/cartodb/CartoDB-SQL-API/node_modules/redis/index.js:422:27)
[Tue, 23 Jul 2013 13:03:01 GMT] - GET localhost.lan:8080/api/v1/sql?q=select%201 404 8 ms -> application/json; charset=utf-8

steve...@gmail.com

unread,
Aug 16, 2013, 4:48:32 PM8/16/13
to car...@googlegroups.com
i can log into the page and upload file, but when i click MapView i get "There is a Problem with your Connection".

I also had the same problem.
Install the latest tag cartodb 2.1 and windshaft master branch.

Got the HTTP/1.1 400 Bad Request from below request when refreshing on the mapview.
http://mydomain:8181/tiles/layergroup?map_key=5ea9d42f4be3962982d12af8b1195304198885ca

Anyone got any tips to fix this problem?

Sandro Santilli

unread,
Aug 19, 2013, 4:09:54 AM8/19/13
to car...@googlegroups.com
On Fri, Aug 16, 2013 at 01:48:32PM -0700, steve...@gmail.com wrote:
>
> >
> > i can log into the page and upload file, but when i click MapView i get *"There
> >> is a Problem with your Connection"*.
> >>
> >
> I also had the same problem.
> Install the latest tag cartodb 2.1 and windshaft master branch.
>
> Got the HTTP/1.1 400 Bad Request from below request when refreshing on the
> mapview.
> http://mydomain:8181/tiles/layergroup?map_key=5ea9d42f4be3962982d12af8b1195304198885ca
>
> Anyone got any tips to fix this problem?

You need to use a third level domain name to identify the user.
Using http://localhost.lan:8080/api/v1/sql?q=select%201 would look for
a user named "localhost", which probably doesn't exist in your setup.

--strk;

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

~~ http://strk.keybit.net


>
>
> On Tuesday, July 23, 2013 6:13:41 AM UTC-7, Sunil Sattiraju wrote:
> >
> > Hello..
> >
> > i am having a similar problem
> >
> > my hosts file is like this
> > 127.0.0.1 localhost
> > 127.0.0.1 development.localhost.lan
> > 127.0.0.1 localhost.lan
> >
> > and i can log into the page and upload file, but when i click MapView i
> > get *"There is a Problem with your Connection"*. i have tried the above

steve...@gmail.com

unread,
Aug 19, 2013, 2:00:28 PM8/19/13
to car...@googlegroups.com
Thank you for your reply.

But I am using the third level domain name and still getting the "there is a problem with your connection" when I click on the MapView.
Everything works fine except I cannot get the data display on the map and I tried every solution in the cartodb discussion forum. :(

Any tips will be useful, Thanks!

The followings are all my configs:
I am using ubuntu 12.04 server and pgbouncer have the following settings in my etc/hosts:
127.0.0.1       localhost
192.168.3.43 cartodb.steve.van cartodb

And for my  
defaults: &defaults
  debug_assets: true
  mandatory_keys:     [layer_opts, sql_api_domain, sql_api_endpoint, sql_api_port, varnish_management, redis, session_domain]
  session_domain:     '.steve.van'
  secret_token:       '71c2b25921b84a1cb21c71503ab8fb23'
  account_host:       'cartodb.steve.van:3000'
  account_path:       '/account'
  tiler:
    private:
      protocol:      'http'
      domain:        'steve.van'
      port:          '8181'
    public:
      protocol:      'http'
      domain:        'steve.van'
      port:          '8181'
  sql_api_protocol:   'http'
  sql_api_domain:     'steve.van'

  sql_api_endpoint:   '/api/v1/sql'
  sql_api_port:       8080
  api_requests_service_url: ''
  developers_host:    'cartodb.steve.van:3000'
  google_analytics:
    primary:          ''
    embeds:           ''
    domain:           ''
  varnish_management:
    critical: true
    host: '127.0.0.1'
    port: 6082
    purge_command: 'purge'
    retries: 5
    timeout: 5
  redis:
    host: '127.0.0.1'
    port: 6379
  mixpanel:
    api_key: xxx
    api_secret: xxx
    token: xxx
  superadmin:
    username: "superadmin"
    password: "monkey"
  importer:
    # OSM imports require osm2pgsql and this tool doesn't
    # play well with pgbouncer.
    osm2pgsql_port: 5432
  layer_opts:
    public_opts: ["type", "active", "query", "opacity", "auto_bound",
                  "interactivity", "debug", "visible", "tiler_domain",
                  "tiler_port", "tiler_protocol", "sql_domain", "sql_port",
                  "sql_protocol", "extra_params", "cdn_url", "table_name",
                  "user_name", "style_version", "tile_style", "query_wrapper"]
    default_tile_styles:
      point: "{\n  marker-fill: #FF6600;\n  marker-opacity: 0.9;\n  marker-width: 12;\n  marker-line-color: white;\n  marker-line-width: 3;\n  marker-line-opacity: 0.9;\n  marker-placement: point;\n  marker-type: ellipse;\n  marker-allow-overlap: true;\n}"
      geometry: "{\n // points\n [mapnik-geometry-type=point] {\n   Â marker-fill: #FF6600;\n   Â marker-opacity: 1;\n   Â marker-width: 12;\n   Â marker-line-color: white;\n   Â marker-line-width: 3;\n   Â marker-line-opacity: 0.9;\n   Â marker-placement: point;\n   Â marker-type: ellipse;marker-allow-overlap: true;\n  }\n\n //lines\n [mapnik-geometry-type=linestring] {\n   Â line-color: #FF6600; \n   Â line-width: 2; \n   Â line-opacity: 0.7;\n  }\n\n //polygons\n [mapnik-geometry-type=polygon] {\n   Â polygon-fill:#FF6600;\n   Â polygon-opacity: 0.7;\n   Â line-opacity:1;\n   Â line-color: #FFFFFF;\n   }\n }"
      polygon: "{\n  polygon-fill:#FF6600;\n  polygon-opacity: 0.7;\n  line-opacity:1;\n  line-color: #FFFFFF;\n}"
      multipolygon: "{\n  polygon-fill:#FF6600;\n  polygon-opacity: 0.7;\n  line-opacity:1;\n  line-color: #FFFFFF;\n}"
      multilinestring: "{\n  line-color:#FF6600;\n  line-width:1;\n  line-opacity: 0.7;\n}"

    data:
      kind: "carto"
      options:
        query:              ""
        opacity:            0.99
        auto_bound:         false
        interactivity:      "cartodb_id"
        debug:              false
        visible:            true
        tiler_domain:       "steve.van"
        tiler_port:         "8181"
        tiler_protocol:     "http"
        sql_domain:         "steve.van"

        sql_port:           "8080"
        sql_protocol:       "http"
        extra_params:       { cache_policy: 'persist' }
        cdn_url:            ""
        tile_style_history: []
        style_version:      "2.1.1"
      infowindow:
        template_name:      "table/views/infowindow_light"
    background:
      kind: "background"
      options: { color: '#ffffff' }
    base:
      kind: "tiled"
      options:
        visible:      true
        type:         "Tiled"
        urlTemplate:  "https://maps.nlp.nokia.com/maptiler/v2/maptile/newest/normal.day/{z}/{x}/{y}/256/png8?lg=eng&token=A7tBPacePg9Mj_zghvKt9Q&app_id=KuYppsdXZznpffJsKT24"
        name:         'Nokia Day'
        className:    "nokia_day"
        attribution:  "©2012 Nokia <a href='http://here.net/services/terms' target='_blank'>Terms of use</a>"
    gmaps:
      kind: "gmapsbase"
      options:
        base_type: "roadmap"
        style: ""
  cartodb_com_hosted: true
  cartodb_central_domain_name: 'cartodb.com'
  aws:
    s3:
      access_key_id: "test"
      secret_access_key: "test"
  assets:
    s3_bucket_name: "tests"
    max_file_size: 10485760 # 10.megabytes
development:
  <<: *defaults
  varnish_management:
    critical: false
    host: '127.0.0.1'
    port: 6082
    purge_command: 'purge'
    url_purge_command: 'url.purge'
    retries: 5
    timeout: 5
test:
  <<: *defaults
staging:
  <<: *defaults
production:
  <<: *defaults

And for my development.js in Windshaft-cartodb
var config = {
     environment: 'development'
    ,port: 8181
    ,host: '0.0.0.0'
    ,maxConnections:128
    ,socket_timeout: 600000
    ,enable_cors: true
    ,cache_enabled: false
    ,log_format: '[:date] :req[X-Real-IP] :method :req[Host]:url :status :response-time ms -> :res[Content-Type] (:res[X-Tiler-Profiler])'
    ,postgres_auth_user: 'development_cartodb_user_<%= user_id %>'
    ,postgres: {
        type: "postgis",
        user: "postgres",
        host: '127.0.0.1',
        port: 5432,
        extent: "-20037508.3,-20037508.3,20037508.3,20037508.3",
        /* experimental
        geometry_field: "the_geom",
        extent: "-180,-90,180,90",
        srid: 4326,
        */
        row_limit: 65535,
        simplify_geometries: true,
        max_size: 500
    }
    ,mapnik_version: '2.1.0'
    ,renderer: {
      // Milliseconds since last access before renderer cache item expires
      cache_ttl: 60000,
      metatile: 4,
      bufferSize: 64
    }
    ,millstone: {
        cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'
    }
    ,redis: {
        host: '127.0.0.1',
        port: 6379,
        max: 50,
        idleTimeoutMillis: 1, // idle time before dropping connection
        reapIntervalMillis: 1 // time between cleanups
    }
    ,sqlapi: {
        protocol: 'http',
        host: '127.0.0.1',
        port: 8080,
        version: 'v1'
    }
    ,varnish: {
        host: '127.0.0.1',
        port: 6082,
        ttl: 86400
    }
    ,useProfiler:true
};
module.exports = config;

For my development.js in CartoDB-SQL-API:
module.exports.base_url     = '/api/:version';
module.exports.node_port    = 8080;
module.exports.node_host    = '0.0.0.0';
// idle socket timeout, in miliseconds
module.exports.node_socket_timeout    = 600000;
module.exports.environment  = 'development';
module.exports.db_base_name = 'cartodb_dev_user_<%= user_id %>_db';
module.exports.db_user      = 'development_cartodb_user_<%= user_id %>';
module.exports.db_host      = '127.0.0.1';
module.exports.db_port      = '6432';
// Max database connections in the pool
// Subsequent connections will wait for a free slot.
// NOTE: not used by OGR-mediated accesses
module.exports.db_pool_size = 500;
// Milliseconds before a connection is removed from pool
module.exports.db_pool_idleTimeout = 30000;
// Milliseconds between idle client checking
module.exports.db_pool_reapInterval = 1000;
module.exports.redis_host   = '127.0.0.1';
module.exports.redis_port   = 6379;
module.exports.redisPool    = 50;
module.exports.redisIdleTimeoutMillis   = 100;
module.exports.redisReapIntervalMillis  = 10;
module.exports.redisLog     = false;
// Max number of entries in the query tables cache
module.exports.tableCacheMax = 8192;
// Max age of query table cache items, in milliseconds
module.exports.tableCacheMaxAge = 1000*60*10;
// Temporary directory
module.exports.tmpDir = '/tmp';


Steve

Sandro Santilli

unread,
Aug 20, 2013, 4:41:45 AM8/20/13
to car...@googlegroups.com
On Mon, Aug 19, 2013 at 11:00:28AM -0700, steve...@gmail.com wrote:
> Thank you for your reply.
>
> But I am using the third level domain name and still getting the "there is
> a problem with your connection" when I click on the MapView.

The log you posted didn't show a third level domain name, did that change ?

> Everything works fine except I cannot get the data display on the map and I
> tried every solution in the cartodb discussion forum. :(

Note that changes in the configuration only affect newly created
visualizations. Try to drop and recreate visualizations.

steve...@gmail.com

unread,
Aug 20, 2013, 12:10:48 PM8/20/13
to car...@googlegroups.com
Yes, I already changed it.  And I restarted my VM machine several time. Also I am just using the simple map view page not the visualization page, but it doesn't work either.

This is the log message I am getting now.

Started GET "/assets/layout/wizard-density-hex.png" for 192.168.63.135 at 2013-08-20 09:06:41 -0700
Served asset /layout/wizard-density-hex.png - 304 Not Modified (0ms)
[Tue, 20 Aug 2013 16:06:41 GMT] - OPTIONS cartodb.steve.van:8181/tiles/layergroup?map_key=70e04d6c109b41352830a869c0c2b1d7e11d68d4 200 - ms -> text/html; charset=utf-8 (-)
[Tue, 20 Aug 2013 16:06:41 GMT] - POST cartodb.steve.van:8181/tiles/layergroup?map_key=70e04d6c109b41352830a869c0c2b1d7e11d68d4 400 6 ms -> application/json; charset=utf-8 (TOT:6;cors:1;cartoData.authorize:1;cartoData.getDatabase:1;cartoData.getGeometryType:2;createLayergroup:1)

And screenshot of error:



Thank you
Steve

Sandro Santilli

unread,
Aug 20, 2013, 12:38:37 PM8/20/13
to car...@googlegroups.com
On Tue, Aug 20, 2013 at 09:10:48AM -0700, steve...@gmail.com wrote:
> Yes, I already changed it. And I restarted my VM machine several time.
> Also I am just using the simple map view page not the visualization page,
> but it doesn't work either.
>
> This is the log message I am getting now.
>
> Started GET "/assets/layout/wizard-density-hex.png" for 192.168.63.135 at
> > 2013-08-20 09:06:41 -0700
> > Served asset /layout/wizard-density-hex.png - 304 Not Modified (0ms)
> > [Tue, 20 Aug 2013 16:06:41 GMT] - OPTIONS
> > cartodb.steve.van:8181/tiles/layergroup?map_key=70e04d6c109b41352830a869c0c2b1d7e11d68d4
> > 200 - ms -> text/html; charset=utf-8 (-)
> > [Tue, 20 Aug 2013 16:06:41 GMT] - POST
> > cartodb.steve.van:8181/tiles/layergroup?map_key=70e04d6c109b41352830a869c0c2b1d7e11d68d4
> > 400 6 ms -> application/json; charset=utf-8
> > (TOT:6;cors:1;cartoData.authorize:1;cartoData.getDatabase:1;cartoData.getGeometryType:2;createLayergroup:1)

Try checking the error message that comes with the 400 response using firebug.

--strk;

steve...@gmail.com

unread,
Aug 20, 2013, 6:36:04 PM8/20/13
to car...@googlegroups.com
Thanks for the Firebug tip.

The original complain from firebug was saying cannot transform mapnik 2.1.1 to 2.1.0, but I had 2.1.0 version install my machine so I faked it by setting it to 2.1.1 in development.js as suggested in other post.
After that, I restarted the cartodb component, now it is complaining the same 400 bad request message with the following error in response:

{"errors":["Error: could not fetch source tables: getaddrinfo ENOENT"]}

 
Steve

steve...@gmail.com

unread,
Aug 20, 2013, 7:34:03 PM8/20/13
to car...@googlegroups.com
Got the problem fix on my server, thanks for letting know the firebug tool, it really helped me to debug the problem.

In case someone runs in to similar problem, here is my solution:

1. First problem is "could not fetch source tables: getaddrinfo ENOENT" which is caused by the wrong sqlapi host config in the development.js of Windshaft:
sqlapi: {
        protocol: 'http',
        host: 'cartodb.steve.van',
        port: 8080,
        version: 'v1'
}
Where the host field should not really be called "host" but should be called "domain" instead, because after I changed it from host name to the domain name "steve.van", it's working.

2. Second problem is also with config in both Windshaft and Cartod-SQL-API
In Windshaft development.js
,millstone: {
        cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'
 }
&
In CartoDB-SQL-API development.js

// Temporary directory
module.exports.tmpDir = '/tmp';

These two directory should be set to some directories where your cartodb user can access and write on it.

Thanks strk again with all the help.
Steve 

On Tuesday, August 20, 2013 9:38:37 AM UTC-7, strk wrote:

Sandro Santilli

unread,
Aug 21, 2013, 4:05:57 AM8/21/13
to car...@googlegroups.com
On Tue, Aug 20, 2013 at 04:34:03PM -0700, steve...@gmail.com wrote:
> Got the problem fix on my server, thanks for letting know the firebug tool,
> it really helped me to debug the problem.
>
> In case someone runs in to similar problem, here is my solution:
>
> 1. First problem is "could not fetch source tables: getaddrinfo ENOENT"
> which is caused by the wrong sqlapi host config in the development.js of
> Windshaft:
>
> > sqlapi: {
> > protocol: 'http',
> > host: 'cartodb.steve.van',
> > port: 8080,
> > version: 'v1'
> > }
>
> Where the host field should not really be called "host" but should be
> called "domain" instead, because after I changed it from host name to the
> domain name "steve.van", it's working.

Good point! Filed a ticket for this:
https://github.com/CartoDB/Windshaft-cartodb/issues/79

> 2. Second problem is also with config in both Windshaft and Cartod-SQL-API
>
> > In Windshaft development.js
> > ,millstone: {
> > cache_basedir: '/tmp/cdb-tiler-dev/millstone-dev'
> > }
> > &
> > In CartoDB-SQL-API development.js
> > // Temporary directory
> > module.exports.tmpDir = '/tmp';
>
>
> These two directory should be set to some directories where your cartodb
> user can access and write on it.

Added a note in the example configs:
https://github.com/CartoDB/CartoDB-SQL-API/commit/8fa0bc7cee42ba38f0a869c0a3204ff424065898
https://github.com/CartoDB/Windshaft-cartodb/commit/db951234aa8cc7585c721503dee9c5fad3ab9363

> Thanks strk again with all the help.

Thank you for filing suggestions for improvement :)

--strk;
Reply all
Reply to author
Forward
0 new messages