Giter Site home page Giter Site logo

Comments (8)

cf-gitbot avatar cf-gitbot commented on June 16, 2024

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/150461780

The labels on this github issue will be updated when the story is started.

from nfs-volume-release.

julian-hj avatar julian-hj commented on June 16, 2024

Can you run cf env nfsbroker after binding the service and post the results here?

from nfs-volume-release.

julian-hj avatar julian-hj commented on June 16, 2024

My guess is that this line in main.go is causing the issue:

*dbPort = fmt.Sprintf("%.0f", credentials["port"].(float64))

Probably the posgres release you are using serializes port as a string not a number. As an experiment, you could try changing it to:

*dbPort = credentials["port"]

And let us know if that fixes the issue. If so, then we probably need to add some type assertions to accept port as a string or a number.

from nfs-volume-release.

ron4git avatar ron4git commented on June 16, 2024

out put of "cf env nfsbroker" (domain name were masked)

System-Provided:
{
"VCAP_SERVICES": {
"postgresql": [
{
"credentials": {
"dbType": "postgresql",
"hostname": "10.8.39.174",
"name": "id_e444046b_0335_4455_bc4e_2dd4aba5c18d",
"password": "l2t46qpggncnuo4nm7elvqr5c5",
"port": "9999",
"uri": "postgresql://id_e444046b_0335_4455_bc4e_2dd4aba5c18d:[email protected]:9999/id_e444046b_0335_4455_bc4e_2dd4aba5c18d",
"username": "id_e444046b_0335_4455_bc4e_2dd4aba5c18d"
},
"label": "postgresql",
"name": "pg4nfsbroker",
"plan": "developer",
"provider": null,
"syslog_drain_url": null,
"tags": [
"postgresql",
"cache"
],
"volume_mounts": []
}
]
}
}

{
"VCAP_APPLICATION": {
"application_id": "959068f3-7487-470f-9509-535577f471fc",
"application_name": "nfsbroker",
"application_uris": [
"nfsbroker.mydomain.com"
],
"application_version": "29a2481a-e800-445e-bb42-93ef703f5fe0",
"cf_api": "https://ccng.mydomain.com",
"limits": {
"disk": 1024,
"fds": 16384,
"mem": 1024
},
"name": "nfsbroker",
"space_id": "7be1bdc5-c611-4b1f-a1fc-1e29bff6bff7",
"space_name": "nfsbroker",
"uris": [
"nfsbroker.mydomain.com"
],
"users": null,
"version": "29a2481a-e800-445e-bb42-93ef703f5fe0"
}
}

User-Provided:
ALLOWED_OPTIONS: uid,gid,auto_cache,username,password
DBDRIVERNAME: postgres
DBSERVICENAME: postgresql
LOGLEVEL: info
PASSWORD: goodpassword
SERVICENAME: nfs
USERNAME: admin

from nfs-volume-release.

ron4git avatar ron4git commented on June 16, 2024

After changed line 183 of main.go to
*dbPort = credentials["port"]
getting following error in building.

./main.go:183: cannot use credentials["port"] (type interface {}) as type string in assignment: need type assertion

from nfs-volume-release.

ron4git avatar ron4git commented on June 16, 2024

change line 183 of main.go to

*dbPort = credentials["port"].(string)

worked.

from nfs-volume-release.

julian-hj avatar julian-hj commented on June 16, 2024

Very good, thanks for the feedback. We'll try to get a fix in for this case shortly.

from nfs-volume-release.

julian-hj avatar julian-hj commented on June 16, 2024

Closing this as fixed. Please re-open if you still see the issue.

from nfs-volume-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.