Comments (4)
@nhatlee try setting the password to nil in your config.
from fluent-postgres-driver.
I was also seeing this bug on master branch, haven't seen it since refactor on nio
branch. 👍 thanks!
from fluent-postgres-driver.
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.
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)
- An `id` of `null` throws violates not-null constraint. HOT 1
- Accept URL string in configuration HOT 3
- Saving optional enum (nil) triggers: [ WARNING ] bind $3 type (UNKNOWN 0) does not match expected parameter type (TEXT) HOT 5
- 2.0.0 GM
- Type date but expression is of type text (transformAssignedExpr) HOT 5
- Migrations are now creating int8 fields as char in the DB and then the value gets messed up when querying HOT 1
- Aggregate SUM function fails HOT 1
- Sort by multiple field keys fail
- Postgres error thrown when using advised UUID ID field HOT 1
- [Feature request] Support JSONB column type for nested arrays / PostgreSQL
- simpleQuery flattens columns names to lower case HOT 1
- [Documentation] - We need thorough documentation on README or Wiki HOT 3
- Missing '#include <stdlib.h>'; 'abort' must be declared before it is used HOT 3
- debug logging no longer shows the RAW SQL HOT 4
- let user specify Postgres schema in the connection parameters. HOT 2
- Enum Migration: Adding multiple new cases to an already existing enum does only add the last case HOT 5
- No DEFERRABLE Constraint option
- DatabaseConfigurationFactory build error in 2.7.0 HOT 4
- Select SQL query for the fluent-postgres-driver with bindings
- PSQLError: Opening new connection for pool failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent-postgres-driver.