Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing #4

Open
kalepail opened this issue May 29, 2019 · 13 comments
Open

Installing #4

kalepail opened this issue May 29, 2019 · 13 comments

Comments

@kalepail
Copy link

I'm sure I'm trying to install something incorrectly. I'm not well versed in Go yet. Trying to download and install your project though and running into issues.

$ go get ./...
# github.com/astroband/astrologer/es
../../golang/src/github.com/astroband/astrologer/es/operation.go:144:7: undefined: "github.com/stellar/go/xdr".OperationTypeManageOffer
../../golang/src/github.com/astroband/astrologer/es/operation.go:145:24: o.Body.MustManageOfferOp undefined (type "github.com/stellar/go/xdr".OperationBody has no field or method MustManageOfferOp)
../../golang/src/github.com/astroband/astrologer/es/operation.go:146:7: undefined: "github.com/stellar/go/xdr".OperationTypeCreatePassiveOffer
../../golang/src/github.com/astroband/astrologer/es/operation.go:147:31: o.Body.MustCreatePassiveOfferOp undefined (type "github.com/stellar/go/xdr".OperationBody has no field or method MustCreatePassiveOfferOp)
../../golang/src/github.com/astroband/astrologer/es/operation.go:191:23: undefined: "github.com/stellar/go/xdr".ManageOfferOp
../../golang/src/github.com/astroband/astrologer/es/operation.go:200:30: undefined: "github.com/stellar/go/xdr".CreatePassiveOfferOp
../../golang/src/github.com/astroband/astrologer/es/operation_result.go:22:8: undefined: "github.com/stellar/go/xdr".OperationTypeManageOffer
../../golang/src/github.com/astroband/astrologer/es/operation_result.go:23:29: r.Tr.MustManageOfferResult undefined (type *"github.com/stellar/go/xdr".OperationResultTr has no field or method MustManageOfferResult)
../../golang/src/github.com/astroband/astrologer/es/operation_result.go:24:8: undefined: "github.com/stellar/go/xdr".OperationTypeCreatePassiveOffer
../../golang/src/github.com/astroband/astrologer/es/operation_result.go:74:29: undefined: "github.com/stellar/go/xdr".ManageOfferResult
../../golang/src/github.com/astroband/astrologer/es/operation_result.go:24:8: too many errors
# _/Users/Tyler/Desktop/astrologer/es
es/operation.go:144:7: undefined: "github.com/stellar/go/xdr".OperationTypeManageOffer
es/operation.go:145:24: o.Body.MustManageOfferOp undefined (type "github.com/stellar/go/xdr".OperationBody has no field or method MustManageOfferOp)
es/operation.go:146:7: undefined: "github.com/stellar/go/xdr".OperationTypeCreatePassiveOffer
es/operation.go:147:31: o.Body.MustCreatePassiveOfferOp undefined (type "github.com/stellar/go/xdr".OperationBody has no field or method MustCreatePassiveOfferOp)
es/operation.go:191:23: undefined: "github.com/stellar/go/xdr".ManageOfferOp
es/operation.go:200:30: undefined: "github.com/stellar/go/xdr".CreatePassiveOfferOp
es/operation_result.go:22:8: undefined: "github.com/stellar/go/xdr".OperationTypeManageOffer
es/operation_result.go:23:29: r.Tr.MustManageOfferResult undefined (type *"github.com/stellar/go/xdr".OperationResultTr has no field or method MustManageOfferResult)
es/operation_result.go:24:8: undefined: "github.com/stellar/go/xdr".OperationTypeCreatePassiveOffer
es/operation_result.go:74:29: undefined: "github.com/stellar/go/xdr".ManageOfferResult
es/operation_result.go:24:8: too many errors
@charlie-wasp
Copy link
Collaborator

@tyvdh hi! 👋 Thank you for checking out this project!

It seems that this error is caused by Stellar protocol update to v11, which is already reflected in Go SDK. I dropped the PR recently, which will, I hope, fix this issue

@kalepail
Copy link
Author

So even under your branch I'm still getting errors trying to get the dependencies.

$ go get ./...
# github.com/astroband/astrologer/es
../../go/src/github.com/astroband/astrologer/es/operation.go:144:7: undefined: "github.com/stellar/go/xdr".OperationTypeManageOffer
../../go/src/github.com/astroband/astrologer/es/operation.go:145:24: o.Body.MustManageOfferOp undefined (type "github.com/stellar/go/xdr".OperationBody has no field or method MustManageOfferOp)
../../go/src/github.com/astroband/astrologer/es/operation.go:146:7: undefined: "github.com/stellar/go/xdr".OperationTypeCreatePassiveOffer
../../go/src/github.com/astroband/astrologer/es/operation.go:147:31: o.Body.MustCreatePassiveOfferOp undefined (type "github.com/stellar/go/xdr".OperationBody has no field or method MustCreatePassiveOfferOp)
../../go/src/github.com/astroband/astrologer/es/operation.go:191:23: undefined: "github.com/stellar/go/xdr".ManageOfferOp
../../go/src/github.com/astroband/astrologer/es/operation.go:200:30: undefined: "github.com/stellar/go/xdr".CreatePassiveOfferOp
../../go/src/github.com/astroband/astrologer/es/operation_result.go:22:8: undefined: "github.com/stellar/go/xdr".OperationTypeManageOffer
../../go/src/github.com/astroband/astrologer/es/operation_result.go:23:29: r.Tr.MustManageOfferResult undefined (type *"github.com/stellar/go/xdr".OperationResultTr has no field or method MustManageOfferResult)
../../go/src/github.com/astroband/astrologer/es/operation_result.go:24:8: undefined: "github.com/stellar/go/xdr".OperationTypeCreatePassiveOffer
../../go/src/github.com/astroband/astrologer/es/operation_result.go:74:29: undefined: "github.com/stellar/go/xdr".ManageOfferResult
../../go/src/github.com/astroband/astrologer/es/operation_result.go:24:8: too many errors

@kalepail
Copy link
Author

Ah or are you saying those will resolve once the branch is merged?

@charlie-wasp
Copy link
Collaborator

That's weird, the same command works for me on this new branch. When it will be merged, you'll be able to just call go get github.com/astroband/astrologer.

I wonder, why do you have ../../go/ prefix in the paths in error messages? From where do you call go get ./...? And what is your $GOPATH then?

@kalepail
Copy link
Author

kalepail commented May 30, 2019

I'm calling go get ./... from the root of the project.

$ echo $GOPATH
/Users/tyler/go

That's where all my go stuff lives.

Fwiw the project is just on my ~/Desktop atm.

@charlie-wasp
Copy link
Collaborator

Interesting, go doesn't allow me to even call go get outside of $GOPATH. Can you please move project under $GOPATH/src/github.com/astroband/astrologer and try again from there?

@kalepail
Copy link
Author

So that seems to have worked. At least the go get doesn't error out. However I do get this error now when trying to run the create-index command.

2019/05/31 07:57:58 sql: unknown driver "postgresql" (forgotten import?)

@charlie-wasp
Copy link
Collaborator

Can you please provide the full command you call? Did you set the database-url parameter? The database driver is inferred from the connection url scheme, so for an url like postgres://localhost/stellar it would be postgres. But you have postgresql in the error message. Did it come from your parameters?

@kalepail
Copy link
Author

I exported

export DATABASE_URL=postgresql://{username}:{password}@{ip}:{port}/{database}
astrologer create-index

@kalepail
Copy link
Author

kalepail commented May 31, 2019

If I use postgres vs postgresql I get this error which looks like we've gotten past the connection error.

$ astrologer create-index --database-url="postgres://{username}:{password}@{ip}:{port}/{database}"
2019/05/31 08:09:51 [400 Bad Request] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/ledger] contains unrecognized parameter: [include_type_name]"}],"type":"illegal_argument_exception","reason":"request [/ledger] contains unrecognized parameter: [include_type_name]"},"status":400}

@kalepail
Copy link
Author

GET http://localhost:9200

{
    "name": "uGIB4bt",
    "cluster_name": "elasticsearch_tyler",
    "cluster_uuid": "F-QWjhjET5CD4EGsfArH9A",
    "version": {
        "number": "5.6.16",
        "build_hash": "3a740d1",
        "build_date": "2019-03-13T15:33:36.565Z",
        "build_snapshot": false,
        "lucene_version": "6.6.1"
    },
    "tagline": "You Know, for Search"
}

@kalepail
Copy link
Author

Using version 6.8.0 seems to work

{
    "name": "uGIB4bt",
    "cluster_name": "elasticsearch_tyler",
    "cluster_uuid": "F-QWjhjET5CD4EGsfArH9A",
    "version": {
        "number": "6.8.0",
        "build_flavor": "oss",
        "build_type": "tar",
        "build_hash": "65b6179",
        "build_date": "2019-05-15T20:06:13.172855Z",
        "build_snapshot": false,
        "lucene_version": "7.7.0",
        "minimum_wire_compatibility_version": "5.6.0",
        "minimum_index_compatibility_version": "5.0.0"
    },
    "tagline": "You Know, for Search"
}
2019/05/31 08:45:51 ledger index created!
2019/05/31 08:45:51 tx index created!
2019/05/31 08:45:51 op index created!
2019/05/31 08:45:51 balance index created!
Indicies created successfully!

@charlie-wasp
Copy link
Collaborator

That's good news! 🙂 About the ES version: currently, we use 7.0. Let's reflect it in the docs, thank you for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants