Giter VIP home page Giter VIP logo

Comments (5)

jhuckaby avatar jhuckaby commented on June 20, 2024

Wow, that's an odd one.

When Cronicle starts up, it scans the local network interfaces, and picks the first interface with an IPv4 address, that is also marked as not internal:

https://github.com/jhuckaby/pixl-config/blob/master/config.js#L268-L277

Somehow this code is picking your server's 127.0.0.1 local loopback adapter, which very much SHOULD be marked as internal. What a weird situation. I've never seen this one before.

If your server has a fixed (static) IP address, you can probably get around this by placing the IP in your /opt/cronicle/conf/config.json config file as a top-level JSON property called ip. Example:

"ip": "1.2.3.4"

from cronicle.

ZachMassia avatar ZachMassia commented on June 20, 2024

Weird, based on that logic, it should be grabbing the correct IP. All looks correct if I run os.networkInterfaces() in a node repl.

Local loopback is set to internal: true on both entries.

I made the config change and did a restart.

First job I ran, it seemed to have worked, but it was such a quick job I only saw it in "live" for a second before the refresh.

I did a second longer job, and it seems to have hung up after the first few lines (only Cronicle generated output though):

image

Once it finished, refresh and full log was present.

I'll see if it works any different next time I'm at the office.

from cronicle.

ZachMassia avatar ZachMassia commented on June 20, 2024

Same thing when at the office.

Connects, but never shows any output.

from cronicle.

krasnyd avatar krasnyd commented on June 20, 2024

I have been running some Python script with Cronicle and I had the same issue as you - the live log showed me only these 4 lines. I solved it by adding export PYTHONUNBUFFERED=1. I don't know if it's your case, but it can be related to some log buffering in a script that you are running.

from cronicle.

ZachMassia avatar ZachMassia commented on June 20, 2024

@krasnyd That was it!

I'm using Python as well, so that was a very quick test.

For anyone who might stumble on this, some alternative options for Python specifically are:

  • Run the script with the -u flag: python -u script.py
  • Pass flush=True to print()

Thanks guys! 🍻

from cronicle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.