Git Product home page Git Product logo

Comments (4)

tanner0101 avatar tanner0101 commented on May 19, 2024 3

@nhatlee try setting the password to nil in your config.

from fluent-postgres-driver.

tanner0101 avatar tanner0101 commented on May 19, 2024 1

I was also seeing this bug on master branch, haven't seen it since refactor on nio branch. 👍 thanks!

from fluent-postgres-driver.

4np avatar 4np commented on May 19, 2024

On Ubuntu Linux (16.04 LTS) I see different behaviour:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial
$ uname -a
Linux ripcurl 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ swift --version
Swift version 4.1-dev (LLVM 1c8b50929b, Clang 8be462d5b8, Swift f2049df523)
Target: x86_64-unknown-linux-gnu
$ 

1. Build and run

$ swift build
...
$ .build/x86_64-unknown-linux/debug/Run
Running development build on linux (non-release, debug mode)
Using PostgreSQLDatabaseConfig without password
Migrating psql DB
Fatal error: Error raised at top level: ⚠️ PostgreSQL Error: Password is required
- id: PostgreSQLError.password
: file /home/buildnode/jenkins/workspace/oss-swift-4.1-package-linux-ubuntu-16_04/swift/stdlib/public/core/ErrorType.swift, line 191
Current stack trace:
0    libswiftCore.so                    0x00007fb657da7080 _swift_stdlib_reportFatalErrorInFile + 221
1    libswiftCore.so                    0x00007fb657b1634c <unavailable> + 1368908
2    libswiftCore.so                    0x00007fb657d4fd32 <unavailable> + 3702066
3    libswiftCore.so                    0x00007fb657b15a46 <unavailable> + 1366598
4    libswiftCore.so                    0x00007fb657d4fc37 <unavailable> + 3701815
5    libswiftCore.so                    0x00007fb657b15a46 <unavailable> + 1366598
6    libswiftCore.so                    0x00007fb657c82c89 <unavailable> + 2862217
7    libswiftCore.so                    0x00007fb657b53850 swift_errorInMain + 318
8    Run                                0x00005589f548c531 <unavailable> + 4400433
9    libc.so.6                          0x00007fb65558e740 __libc_start_main + 240
10   Run                                0x00005589f50cc239 <unavailable> + 467513
Illegal instruction (core dumped)
$ .build/x86_64-unknown-linux/debug/Run --env prod
Running production build on linux (release, debug mode)
Using PostgreSQLDatabaseConfig with password
Migrating psql DB
Migrations complete
[ WARNING ] Debug build mode detected while configured for release environment: production. (Application.swift:60)
[ INFO ] Compile your application with `-c release` to enable code optimizations. (Application.swift:61)
Server starting on http://127.0.0.1:8080
^C $

Observe that when building on Ubuntu, the connection only succeeds if you do supply a password...

2. Build for release and run

$ swift build --configuration release
...
$ .build/x86_64-unknown-linux/release/Run
Running development build on linux (non-release, release mode)
Using PostgreSQLDatabaseConfig without password
Migrating psql DB
[PostgreSQL] dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Cannot initialize PostgreSQLAuthenticationType from invalid Int32 value 12", underlyingError: nil))
^C $ .build/x86_64-unknown-linux/release/Run --env prod
Running production build on linux (release, release mode)
Using PostgreSQLDatabaseConfig with password
Migrating psql DB
[PostgreSQL] dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Cannot initialize PostgreSQLAuthenticationType from invalid Int32 value 12", underlyingError: nil))
^C $ 

Observe that on Ubuntu Linux the release build will also always fail, like on macOS

from fluent-postgres-driver.

nhatlee avatar nhatlee commented on May 19, 2024

This still happen with vapor 3 Thread 1: Fatal error: Error raised at top level: ⚠️ PostgreSQL Error: No password is required

from fluent-postgres-driver.

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.