What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Trying to connect to the docker postgres db ```❯ docker/sdk console --version --> DEVELOPMENT M
Trying to connect to the docker postgres db
❯ docker/sdk console --version --> DEVELOPMENT MODE Store: DE | Environment: docker.dev Spryker 1
[1612223285034] INFO (ls): Connection instance created for spryker-db.
ns: "conn-manager"
[1612223285063] ERROR (ls): Connecting error: {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}},"name":"error"}
ns: "conn-manager"
[1612223285064] ERROR (ext): ERROR: Error opening connection role "spryker" does not exist, {"code":-32001,"data":{"driver":"PostgreSQL","driverOptions":{}}}
ns: "error-handler"
[1612223286760] INFO (ext): Connection explorer changed. Will be updated.
ns: "conn-man:explorer"
```
zed and yves are working, but I'd like to connect to the database so i can verify writing a record.
using a postgres client
with these creds
Host: localhost Port: 5432 Database: eu-docker User: spryker Password: secret
Comments
-
Please check if you can connect from the cli using psql:
psql -U spryker -d eu-docker -h localhost
.0 -
❯ docker/sdk cli psql -U spryker -d eu-docker -h localhost --> DEVELOPMENT MODE psql: error: could not connect to server: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Address not available Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
with docker/sdk ^
using psql locally ->
❯ psql -U spryker -d eu-docker -h localhost psql: error: FATAL: role "spryker" does not exist
0 -
Could you please tell what is here for you https://github.com/spryker-shop/b2c-demo-shop/blob/master/deploy.dev.yml#L121 and here https://github.com/spryker-shop/b2c-demo-shop/blob/master/deploy.dev.yml#L23?
0 -
version: "0.1" namespace: spryker_b2c_dev tag: 'dev' environment: docker.dev image: tag: spryker/php:7.3-alpine3.12 php: enabled-extensions: - blackfire composer: mode: '' autoload: '' assets: mode: development regions: EU: services: database: database: eu-docker username: spryker <<<<< password: secret stores: DE: services: broker: namespace: de-docker key_value_store: namespace: 1 search: namespace: de_search AT: services: broker: namespace: at-docker key_value_store: namespace: 2 search: namespace: at_search US: services: database: database: us-docker username: spryker password: secret stores: US: services: broker: namespace: us-docker key_value_store: namespace: 3 search: namespace: us_search groups: EU: region: EU applications: yves_eu: application: yves endpoints: yves.de.spryker.local: store: DE services: session: namespace: 1 yves.at.spryker.local: store: AT services: session: namespace: 2 glue_eu: application: glue endpoints: glue.de.spryker.local: store: DE glue.at.spryker.local: store: AT zed_eu: application: zed endpoints: zed.de.spryker.local: store: DE services: session: namespace: 3 zed.at.spryker.local: store: AT services: session: namespace: 4 US: region: US applications: yves_us: application: yves endpoints: yves.us.spryker.local: store: US services: session: namespace: 5 glue_us: application: glue endpoints: glue.us.spryker.local: store: US zed_us: application: zed endpoints: zed.us.spryker.local: store: US services: session: namespace: 6 services: database: engine: postgres root: username: "root" password: "secret" endpoints: localhost:5432: protocol: tcp broker: engine: rabbitmq api: username: "spryker" password: "secret" endpoints: queue.spryker.local: localhost:5672: protocol: tcp session: engine: redis key_value_store: engine: redis endpoints: localhost:16379: protocol: tcp search: engine: elastic version: 6.8 endpoints: localhost:9200: protocol: tcp scheduler: engine: jenkins endpoints: scheduler.spryker.local: mail_catcher: engine: mailhog endpoints: mail.spryker.local: swagger: engine: swagger-ui endpoints: swagger.spryker.local: redis-gui: engine: redis-commander endpoints: redis-commander.spryker.local: dashboard: engine: dashboard endpoints: spryker.local: docker: ssl: enabled: false redirect: true testing: store: DE debug: enabled: true xdebug: enabled: true mount: native: platforms: - linux docker-sync: platforms: - macos - windows
0 -
ah but maybe the namespace is wrong?
0 -
nope looks the same
0 -
And the application works correctly? First
docker/sdk up
went completely without any problems?0 -
ye
0 -
docker/sdk up -x
end of ^0 -
Let me check if I can connect to DB using debug mode.
0 -
Without any problems even in debug mode.
0 -
So sorry, I have no idea how is it possible. ¯_(ツ)_/¯
0 -
okee dokee 🤣
0 -
I would recommend to run
docker/sdk reset
and it will re-create volumes and others... with new import, with new install etc.0 -
2648 rm -rf b2c-demo-shop 2649 mkdir spryker-b2c && cd spryker-b2c 2650 ls 2651 git clone <https://github.com/spryker-shop/b2c-demo-shop.git> ./ 2652 git clone git@github.com:spryker/docker-sdk.git docker\n 2653 ls 2654 docker/sdk boot deploy.dev.yml 2655 docker/sdk up 2656 psql -U spryker -d eu-docker -h localhost psql: error: FATAL: role "spryker" does not exist 2657 docker/sdk reset 2658 psql -U spryker -d eu-docker -h localhost psql: error: FATAL: role "spryker" does not exist
gonna try switching to mutagen
0 -
What you've done doesn't recreate volumes, etc.
If you are deleting the code, please prune everything.docker system prune -a && docker system prune --volumes
.0 -
do I just need to create a local role for spryker: https://stackoverflow.com/questions/11919391/postgresql-error-fatal-role-username-does-not-exist
0 -
It should have been created during install process.
0 -
2670 docker system prune -a && docker system prune --volumes 2671 docker/sdk boot deploy.dev.yml 2672 docker/sdk up 2674 psql -U spryker -d eu-docker -h localhost psql: error: FATAL: role "spryker" does not exist
Should I open an issue here?
And is creating a user locally a possible workaround for now?0 -
There is no issue in spryker, it's something wrong for you locally. Maybe @ULYHPR789 will help tomorrow.
0 -
@U01JBB8LNTE try to connect inside
docker/sdk cli
docker/sdk cli psql -U spryker -d eu-docker -h database
And what about root user? Does it work?
0 -
❯ docker/sdk cli psql -U spryker -d eu-docker -h database --> DEVELOPMENT MODE Password for user spryker: psql (12.5, server 9.6.20) Type "help" for help. eu-docker=>
0 -
Does it mean there is another postgres running locally?
0 -
❯ brew services Name Status User Plist emacs stopped mysql started edward /Users/edward/Library/LaunchAgents/homebrew.mxcl.mysql.plist php stopped postgresql started edward /Users/edward/Library/LaunchAgents/homebrew.mxcl.postgresql.plist unbound stopped
0 -
❯ which psql /usr/local/bin/psql
0 -
do I need to stop the brew service?
0 -
Yes, I would say.
0 -
Dope 🙏 thanks y'all
0 -
❯ brew services stop postgresql Stopping `postgresql`... (might take a while) ==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql) ❯ psql -U spryker -d eu-docker -h localhost Password for user spryker: psql (13.1, server 9.6.20) Type "help" for help. eu-docker=>
0 -
Coolio.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 77 Spryker News
- 939 Developer Corner
- 795 Spryker Development
- 90 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 28 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random