You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/29 12:49:19 UTC

[GitHub] [airflow] sudipto9 commented on issue #17120: [Scheduler error] psycopg2.OperationalError: SSL SYSCALL error: Socket operation on non-socket

sudipto9 commented on issue #17120:
URL: https://github.com/apache/airflow/issues/17120#issuecomment-889114171


   @potiuk is this fix in production? I am having postgres as database.
    I am using below version packages.
   Airflow - 2.1.2
   sqlalchemy=1.3.24
   psycopg2=2.9.1
   
   Getting below error though i started the scheduler as "airflow scheduler -D".
   "he scheduler does not appear to be running. Last heartbeat was received 3 hours ago.
   
   The DAGs list may not update, and new tasks will not be scheduled."
   
   When checked airflow.scheduler.err got below error.
   
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect
       return fn()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/pool/base.py", line 364, in connect
       return _ConnectionFairy._checkout(self)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/pool/base.py", line 809, in _checkout
       result = pool._dialect.do_ping(fairy.connection)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/default.py", line 575, in do_ping
       cursor.execute(self._dialect_specific_select_one)
   psycopg2.OperationalError: SSL SYSCALL error: Socket operation on non-socket
   
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/usr/local/bin/airflow", line 8, in <module>
       sys.exit(main())
     File "/usr/local/lib/python3.8/dist-packages/airflow/__main__.py", line 40, in main
       args.func(args)
     File "/usr/local/lib/python3.8/dist-packages/airflow/cli/cli_parser.py", line 48, in command
       return func(*args, **kwargs)
     File "/usr/local/lib/python3.8/dist-packages/airflow/utils/cli.py", line 91, in wrapper
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.8/dist-packages/airflow/cli/commands/scheduler_command.py", line 58, in scheduler
       job.run()
     File "/usr/local/lib/python3.8/dist-packages/airflow/jobs/base_job.py", line 241, in run
       session.commit()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 1046, in commit
       self.transaction.commit()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 504, in commit
       self._prepare_impl()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
       self.session.flush()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 2540, in flush
       self._flush(objects)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 2682, in _flush
       transaction.rollback(_capture_exception=True)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
       compat.raise_(
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 2642, in _flush
       flush_context.execute()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
       rec.execute(self)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
       persistence.save_obj(
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/persistence.py", line 205, in save_obj
       for (
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/persistence.py", line 373, in _organize_states_for_save
       for state, dict_, mapper, connection in _connections_for_states(
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/persistence.py", line 1602, in _connections_for_states
       connection = uowtransaction.transaction.connection(base_mapper)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 314, in connection
       return self._connection_for_bind(bind, execution_options)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 421, in _connection_for_bind
       conn = self._parent._connection_for_bind(bind, execution_options)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 433, in _connection_for_bind
       conn = bind._contextual_connect()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 2302, in _contextual_connect
       self._wrap_pool_connect(self.pool.connect, None),
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 2339, in _wrap_pool_connect
       Connection._handle_dbapi_exception_noconnection(
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 1583, in _handle_dbapi_exception_noconnection
       util.raise_(
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect
       return fn()
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/pool/base.py", line 364, in connect
       return _ConnectionFairy._checkout(self)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/pool/base.py", line 809, in _checkout
       result = pool._dialect.do_ping(fairy.connection)
     File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/default.py", line 575, in do_ping
       cursor.execute(self._dialect_specific_select_one)
   sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SSL SYSCALL error: Socket operation on non-socket
   
   (Background on this error at: http://sqlalche.me/e/13/e3q8)
   
   I will be highly obliged if you can let me know how to fix this issue.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org