allenai / ike

Build tables of information by extracting facts from indexed text corpora via a simple and effective query language.
http://allenai.org/software/interactive-knowledge-extraction/
Apache License 2.0
56 stars 20 forks source link

Sign in for local installation not working #234

Open isabelleaugenstein opened 7 years ago

isabelleaugenstein commented 7 years ago

I managed to install ike locally and index a new corpus, but now get an error when trying sign in to create new patterns.

This is the error I get when clicking on "Sign In":


400. That’s an error.

Error: origin_mismatch

Application: AI2 IKE

You can email the developer of this application at: sumithrab@allenai.org

Request Details
=
proxy=oauth2relay342247252
scope=email profile
origin=http://gpubuntu:8080
response_type=code token id_token gsession
redirect_uri=postmessage
state=888156143|0.1074183123
client_id=793503486502-8q1pf7shj3jq7ak2q8ib1ca5hlufdfv7.apps.googleusercontent.com
cookie_policy=single_host_origin
include_granted_scopes=true
jsh=m;/_/scs/apps-static/_/js/k=oz.gapi.en_GB.40Ym6hf86Z0.O/m=__features__/am=EQ/rt=j/d=1/rs=AGLTcCM8oo1Kb9gF0BokS-xmLHbcVigjsA
gsiwebsdk=1
sbhaktha commented 7 years ago

Hi @isabelleaugenstein , IKE uses Google OAuth for authentication-- you need to create your Google OAuth account via the Google Developers Console, and replace the clientid here to match your client id. I will update the documentation with this info. I also have a backlog item to make the code runnable without authentication. I will try to get to it soon.

isabelleaugenstein commented 7 years ago

Thank you! I also had to enable Google+ API for the project.

I am able to log in now, but still can't create any new patterns. When I click on "Patterns", it shows me "undefined (0)":

screen shot 2016-09-26 at 23 23 23
sbhaktha commented 7 years ago

Do you have a PostgreSQL database set up locally and have you updated the config in src/main/resources/application.conf to point to that database, i.e., replaced the lines below:

db = {
    // NOTE: Before running locally, uncomment the below lines and specify values for keys `url` to point to your PostgresSql JDBC
    // link, `user` and `password`.
    // AI2 Internal users: use the database in the `test` deploy environment and the same username. You can get the password
    // from this file in the ops-keystore in S3.
    url = "jdbc:postgresql://"${POSTGRES_DB}":5432/okcorpus"
    user = "okcorpus"
    password = ${POSTGRES_PASSWORD}
  }

?

isabelleaugenstein commented 7 years ago

Forgot to enable TCP connections to the database, therefore was getting a connection error.

Now that local TCP connections are enabled for the IKE user, seeing: Caused by: org.postgresql.util.PSQLException: ERROR: type "jsonb" does not exist

This is with postgresql 9.3 - could this be a version problem?

sbhaktha commented 7 years ago

I am not sure, sorry, but the dependency version I see is: "org.postgresql" % "postgresql" % "9.4-1201-jdbc41"

So can you try version 9.4?

isabelleaugenstein commented 7 years ago

Thank you, it's working with postgresql 9.4 now!

sbhaktha commented 7 years ago

Great! Glad you got it working.