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

Custom POSTGRES_PORT: Test, document, and fix if necessary #127

Open
anthonyfok opened this issue Jul 26, 2021 · 0 comments
Open

Custom POSTGRES_PORT: Test, document, and fix if necessary #127

anthonyfok opened this issue Jul 26, 2021 · 0 comments
Assignees
Labels
Bug Something isn't working Documentation Improvements or additions to documentation Priority: Should Have Severity: Normal Task

Comments

@anthonyfok
Copy link
Member

As @wkhchow recent testing shows, changing PostgreSQL (postgis) port from the default of 5432 to e.g. 5433 in all four occurrences within .env, python/config.ini and docker-compose.yml did not seem to work, and failed with the following error:

python-opendrr_1  | 2021-07-24T00:42:00.314105384Z [add_data:652:post_process_psra_tables] ## PSRA_1-8
python-opendrr_1  | 2021-07-24T00:42:00.318784610Z [add_data:654:post_process_psra_tables] RUN: python3 PSRA_runCreate_tables.py --province=AB --sqlScript=psra_1.Create_tables.sql
python-opendrr_1  | 2021-07-24T00:42:00.362627347Z 2021-07-24 00:42:00,362 - ERROR - could not connect to server: Connection refused
python-opendrr_1  | 2021-07-24T00:42:00.362647615Z 	Is the server running on host "db-opendrr" (172.20.0.3) and accepting
python-opendrr_1  | 2021-07-24T00:42:00.362655009Z 	TCP/IP connections on port 5433?
python-opendrr_1  | 2021-07-24T00:42:00.362658445Z
python-opendrr_1  | 2021-07-24T00:42:00.362661681Z Traceback (most recent call last):
python-opendrr_1  | 2021-07-24T00:42:00.362664556Z   File "PSRA_runCreate_tables.py", line 89, in <module>
python-opendrr_1  | 2021-07-24T00:42:00.362679885Z     main()
python-opendrr_1  | 2021-07-24T00:42:00.362686518Z   File "PSRA_runCreate_tables.py", line 64, in main
python-opendrr_1  | 2021-07-24T00:42:00.362690645Z     if(connection):
python-opendrr_1  | 2021-07-24T00:42:00.362693581Z UnboundLocalError: local variable 'connection' referenced before assignment
python-opendrr_1  | 2021-07-24T00:42:00.367194410Z Command exited with non-zero status 1
python-opendrr_1  | 2021-07-24T00:42:00.367210029Z 0.04user 0.00system 0:00.04elapsed 89%CPU (0avgtext+0avgdata 20268maxresident)k
python-opendrr_1  | 2021-07-24T00:42:00.367212173Z 1392inputs+8outputs (10major+2478minor)pagefaults 0swaps

Though both Will (and I, some months ago) found the workaround of changing the host PostgreSQL port intead to avoid port conflict, it would be nice to eventually find a way to change the PostgreSQL port of the postgis Docker container and have that work instead. Not urgent, but really nice to have eventually.

@anthonyfok anthonyfok added Bug Something isn't working Documentation Improvements or additions to documentation Priority: Should Have Severity: Normal Task labels Jul 26, 2021
@anthonyfok anthonyfok self-assigned this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Documentation Improvements or additions to documentation Priority: Should Have Severity: Normal Task
Projects
None yet
Development

No branches or pull requests

1 participant