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

Script executes manual (clicking "run") but not on a schedule, throwing Transport http error #836

Open
dreadedhamish opened this issue Dec 17, 2024 · 2 comments

Comments

@dreadedhamish
Copy link

dreadedhamish commented Dec 17, 2024

Summary

When running a script manually (clicking "run") script executes correctly, but when run on a schedule it throws a connection error:

Traceback (most recent call last):
  File "/home/hamish/Documents/Code/scrape-officehq-linux/.venv/lib/python3.11/site-packages/urllib3/connection.py", line 199, in _new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hamish/Documents/Code/scrape-officehq-linux/.venv/lib/python3.11/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hamish/.pyenv/versions/3.11.9/lib/python3.11/socket.py", line 962, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporary failure in name resolution

google.auth.exceptions.TransportError: HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x779471b8e850>: Failed to resolve 'oauth2.googleapis.com' ([Errno -3] Temporary failure in name resolution)"))

Is there any difference when running using manual execution - "run" - vs. on a schedule?

Steps to reproduce the problem

This is a complex setup:
Using cronicle-edge
Add shell script to call python script
Python script has it's own enviromnent:

#!/bin/bash
export DISPLAY=:0

# Navigate to the project directory (replace with your actual project path)
cd /home/hamish/Documents/Code/scrape-officehq-linux/

# Run the Python script using Poetry
poetry run python selenium.py

Inside python script use gspread to make a connection to Google.

Your Setup

cronicle-edge 1.11.0
running native (no docker)

Operating system and version?

Manjaro Linux

Node.js version?

Node.js v22.9.0

Cronicle software version?

cronicle-edge 1.11.0

Are you using a multi-server setup, or just a single server?

Single server setup

Are you using the filesystem as back-end storage, or S3/Couchbase?

filesystem

Can you reproduce the crash consistently?

yes

@jhuckaby
Copy link
Owner

No difference that I know of, but note that you are using cronicle-edge which is not an official build, and I don't know how it handles launching jobs. You may want to cross-post this issue over at https://github.com/cronicle-edge/cronicle-edge/issues

@dreadedhamish
Copy link
Author

No difference that I know of, but note that you are using cronicle-edge which is not an official build, and I don't know how it handles launching jobs. You may want to cross-post this issue over at https://github.com/cronicle-edge/cronicle-edge/issues

thanks - will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants