Code Monkey home page Code Monkey logo

Comments (8)

epipheus avatar epipheus commented on September 26, 2024 1

Was this ever fixed?

from god.

mojombo avatar mojombo commented on September 26, 2024

What command are you using to restart god? That error occurs when the god daemon isn't running or the user under which you're running the god query does not have permission to the socket file which is owned by the process that was used to start god.

Can you split the other question into a separate ticket, doubling up tickets like this makes things difficult to track and address.

from god.

dylanz avatar dylanz commented on September 26, 2024

I'm also running into the intermittent failures. I'm running Version 0.7.18. The error reported is: "The server is not available (or you do not have permissions to access it)".

I have God setup as a service on CentOS. God is run as root. Here is the script:

case $1 in
start)  
        /opt/local/bin/god -l /home/xxxxxx/current/log/god.log -P /home/xxxxxx/current/tmp/pids/god.pid || echo -en "\n already running"
        for file in `ls -1 /home/xxxxxx/current/config//*.god`; do /opt/local/bin/god load ; done
        echo "started"
        ;;
stop)   
        kill -QUIT `cat /home/xxxxx/current/tmp/pids/god.pid` || echo -en "\n not running"
        echo "stopped"
        ;;
restart|reload)
        kill -HUP `cat /home/xxxxx/current/tmp/pids/god.pid` || echo -en "\n can't reload"
        echo "restarted"
        ;;
*)
        echo >&2 "Usage: /var/spool/ec2/rs_cache/attachments/script_159507 "
        exit 1
        ;;
esac
~    

from god.

mikewadhera avatar mikewadhera commented on September 26, 2024

Hey Tom- do you know the current state of this issue? Have been seeing this behavior on Debian boxes after several days of normal operation with 0.7.18. Looked at the release history file but didn't see anything obvious, wondering if 0.8 fixed this but thought i'd check once before upgrading. Thanks

from god.

mikewadhera avatar mikewadhera commented on September 26, 2024

Ah, found out why we were seeing this behavior...

God stores a socket (.sock) file in /tmp which it uses to communicate with the server. A few weeks ago, we added a crontab entry to cleanup stale files in /tmp -- we'd wipe any files with modified dates greater than 2 days:

50 22 * * * find /tmp -mtime +2 -print | xargs rm -rf

This started sweeping the socket file 48 hours after startup, causing the CLI to report the "server is unavailable" message in (seemingly) intermittent intervals. The solution was to target specific stubborn files, like open-uri handles when sweeping /tmp. HTH others.

from god.

eric avatar eric commented on September 26, 2024

Is anyone else still seeing these problems (where the file still exists)?

from god.

mojombo avatar mojombo commented on September 26, 2024

I'm guessing a number of people probably run into this problem due to cleaning out the /tmp directory, and in retrospect, /tmp seems like a horrible place for the communication socket to live. Upon looking at the Filesystem Hierarchy Standard (http://www.pathname.com/fhs/pub/fhs-2.3.html), the socket file should really live in /var/run/god. I'll slate this change to go out in a future release after announcing it on the mailing list.

from god.

eric avatar eric commented on September 26, 2024

That makes a lot of sense.

from god.

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.