question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure proxy config throws psycopg2 exception

See original GitHub issue

I’d really like to figure out a workaround for this issue. I’ll put what I find here for others.

2020-03-10T14:59:03.135990572Z Logging API call raise exception!
2020-03-10T14:59:03.136026572Z Traceback (most recent call last):
2020-03-10T14:59:03.136032272Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
2020-03-10T14:59:03.136036372Z     return self.cursor.execute(sql, params)
2020-03-10T14:59:03.136040272Z psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type inet: "24.23.134.119:43398"
2020-03-10T14:59:03.136044372Z LINE 1: ...e/', 'portola.views.DocumentViewSet', 'disclose', '24.23.134...
2020-03-10T14:59:03.136048272Z                                                              ^
2020-03-10T14:59:03.136052072Z
2020-03-10T14:59:03.136055472Z
2020-03-10T14:59:03.136058972Z The above exception was the direct cause of the following exception:
2020-03-10T14:59:03.136062672Z
2020-03-10T14:59:03.136066171Z Traceback (most recent call last):
2020-03-10T14:59:03.136069771Z   File "/antenv/lib/python3.7/site-packages/rest_framework_tracking/base_mixins.py", line 78, in finalize_response
2020-03-10T14:59:03.136073671Z     self.handle_log()
2020-03-10T14:59:03.136089071Z   File "/antenv/lib/python3.7/site-packages/rest_framework_tracking/mixins.py", line 12, in handle_log
2020-03-10T14:59:03.136093371Z     APIRequestLog(**self.log).save()
2020-03-10T14:59:03.136096871Z   File "/antenv/lib/python3.7/site-packages/django/db/models/base.py", line 741, in save
2020-03-10T14:59:03.136100571Z     force_update=force_update, update_fields=update_fields)
2020-03-10T14:59:03.136105271Z   File "/antenv/lib/python3.7/site-packages/django/db/models/base.py", line 779, in save_base
2020-03-10T14:59:03.136108971Z     force_update, using, update_fields,
2020-03-10T14:59:03.136112371Z   File "/antenv/lib/python3.7/site-packages/django/db/models/base.py", line 870, in _save_table
2020-03-10T14:59:03.136115971Z     result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
2020-03-10T14:59:03.136119571Z   File "/antenv/lib/python3.7/site-packages/django/db/models/base.py", line 908, in _do_insert
2020-03-10T14:59:03.136123271Z     using=using, raw=raw)
2020-03-10T14:59:03.136126671Z   File "/antenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
2020-03-10T14:59:03.136130371Z     return getattr(self.get_queryset(), name)(*args, **kwargs)
2020-03-10T14:59:03.136133871Z   File "/antenv/lib/python3.7/site-packages/django/db/models/query.py", line 1186, in _insert
2020-03-10T14:59:03.136137471Z     return query.get_compiler(using=using).execute_sql(return_id)
2020-03-10T14:59:03.136140971Z   File "/antenv/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1335, in execute_sql
2020-03-10T14:59:03.136144671Z     cursor.execute(sql, params)
2020-03-10T14:59:03.136148071Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 67, in execute
2020-03-10T14:59:03.136152571Z     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
2020-03-10T14:59:03.136156271Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
2020-03-10T14:59:03.136159871Z     return executor(sql, params, many, context)
2020-03-10T14:59:03.136163371Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
2020-03-10T14:59:03.136166971Z     return self.cursor.execute(sql, params)
2020-03-10T14:59:03.136170371Z   File "/antenv/lib/python3.7/site-packages/django/db/utils.py", line 89, in __exit__
2020-03-10T14:59:03.136173971Z     raise dj_exc_value.with_traceback(traceback) from exc_value
2020-03-10T14:59:03.136177471Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
2020-03-10T14:59:03.136181071Z     return self.cursor.execute(sql, params)
2020-03-10T14:59:03.136184471Z django.db.utils.DataError: invalid input syntax for type inet: "24.23.134.119:43398"
2020-03-10T14:59:03.136188171Z LINE 1: ...e/', 'portola.views.DocumentViewSet', 'disclose', '24.23.134...
2020-03-10T14:59:03.136194471Z                                                              ^
2020-03-10T14:59:03.136198171Z

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
drdreffcommented, Mar 17, 2020

I will try to create a good test since I’ve only been getting this in Azure. I’l also head over to the new project

MD

0reactions
drdreffcommented, Mar 22, 2020

please let me know what other help I can provide to help address this. I’d love to find a solution or workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · aschn/drf-tracking - GitHub
Azure proxy config throws psycopg2 exception. #150 opened on Mar 10, ... Reduce build jobs in TravisCI config to resume CI builds. help...
Read more >
How to stop 'import psycopg2' from causing an Exception ...
I am trying to deploy a Django REST API using Azure App Service on Linux. I am using a postgresql Database and deploy...
Read more >
Databricks Runtime 11.3 LTS - Azure - Microsoft Learn
Azure Databricks now writes pipeline events to the driver log in JSON format. While each event will be JSON-parseable, large events may not ......
Read more >
PySocks - PyPI
Seamlessly configure SOCKS proxies for any socket object by calling socket_object.set_proxy() . Features. SOCKS proxy client for Python 2.7 and 3.4+; TCP ...
Read more >
Invoking an AWS Lambda function from an RDS for ...
Step 1: Configure your RDS for PostgreSQL DB instance for outbound connections to AWS Lambda. Lambda functions always run inside an Amazon VPC...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found