Skip to content

data explorer ajax using wrong/default port #63

Closed

Description

@themgt

I setup a demo rethinkdb install (compiled from next branch source) here:
http://rethinkdb.a.pogoapp.com/#dataexplorer

there's a front-end nginx server proxying the request to the backend VM running rethink, which I booted with:
/app/vendor/rethinkdb/rethinkdb --http-port $PORT -d /app/share/rethinkdb_data

PORT=6000 in ENV

looks like the ajax code is still thinking it should use the default port, e.g trying:
http://rethinkdb.a.pogoapp.com:8080/ajax/reql/open-new-connection

Thanks!

Activity

  1. coffeemug commented on Nov 16, 2012

    @coffeemug
    Contributor

    I can't seem to reproduce this locally. On my setup, the browser sends ajax requests to the same port as the port I pointed the browser to. For example, if I point the browser to some_machine:9292 (and I started the server with http port being 9292), all ajax requests go to 9292.

    Did you verify that the browser sends an ajax call to the wrong port? Could you describe which ports you're proxying and where?

  2. themgt commented on Nov 16, 2012

    @themgt
    Author

    The browser is going to port 80, which is nginx, which forwards to the upstream at a different IP, port 6000. You should still be able to see the issue live here:
    http://rethinkdb.a.pogoapp.com/#dataexplorer

    (i.e. that request is going to port 80, and you can see the ajax request from the page is for http://rethinkdb.a.pogoapp.com:8080/ajax/reql/open-new-connection)

  3. coffeemug commented on Nov 16, 2012

    @coffeemug
    Contributor

    Hmm, actually this might be happening only on http connections from the data explorer and only on port 80. We'll investigate tomorrow.

  4. ghost assigned on Nov 16, 2012
  5. coffeemug commented on Nov 16, 2012

    @coffeemug
    Contributor

    @wmrowan -- grepping through the driver code, there is some allusion to default port 8080 in the http connection. I bet that's the culprit.

  6. neumino commented on Nov 16, 2012

    @neumino
    Member

    I'm half (maybe more) guilty here too.
    If the port is not found, I'm sending an empty port. I can instead just send 80.

    I think that should fix the problem.

  7. ghost assigned on Nov 16, 2012
  8. neumino commented on Nov 16, 2012

    @neumino
    Member

    After talking with @coffeemug we will fix it on the web ui.

    Assigning to myself.

  9. neumino commented on Nov 16, 2012

    @neumino
    Member

    8a42bcb should fix this issue.

    I tested it with apache forwarding port 80 to rethinkdb's http port.

  10. themgt commented on Nov 16, 2012

    @themgt
    Author

    awesome, thanks! I rebuilt & redeployed and it looks all good

  11. neumino commented on Nov 16, 2012

    @neumino
    Member

    You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions