GithubHelp home page GithubHelp logo

Failed to run jobs. about semaphore HOT 16 CLOSED

cazorla19 avatar cazorla19 commented on June 23, 2024
Failed to run jobs.

from semaphore.

Comments (16)

matejkramny avatar matejkramny commented on June 23, 2024

It could be waiting on something.

Can you explain what /etc/ansible file does?
As far as I know, semaphore assembles the inventory on its own

from semaphore.

cazorla19 avatar cazorla19 commented on June 23, 2024

Nothing special, I just added in file hosts file one local host to check how ansible+semaphore works. I didnt change ansible.cfg too. Think there could be a mistake with ssh keys in identities, though I put the same private and public keys.
Generally what does the semaphore use for task running?

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

This runs all things ansible related: runner.js

It spawns sub processes -- nothing special.

from semaphore.

cazorla19 avatar cazorla19 commented on June 23, 2024

I read it, think there might be a problem with SSH keys checking. I`ve regenerated SSH key and put it in identity, but result is the same. Do you know occasionally, what can I do to solve it?

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

Hmm for starters i dont think you should be needing to modify anything aside from inside of semaphore.

You could try and manually ssh into the target host, it might be that its git waiting for an interaction to connect to an unknown ssh host (there is a wrapper used for it, but it might not be working in this case perhaps)

from semaphore.

cazorla19 avatar cazorla19 commented on June 23, 2024

That`s the point, now I just have one host with Ansible and Semaphore and who should be target during the time, when semaphore runs. And SHH key on this host is the same that I put in semaphore identity.

from semaphore.

carlos-alarcon avatar carlos-alarcon commented on June 23, 2024

I was stuck at the same point (report only says it updated the keys) as you but went to runner.js and added some debug lines to the errors and found out that there were some missing files due to HOME env var not being defined.

My experience, installing semaphore in a ubuntu 14.04 VM (last weekend) which may be helpfull:

I had to hardcode HOME to /root since the node app seemed to be run as root and I don't know why the process wasn't inheriting HOME var from shell

It would be nice if we get a way of making the node app being run as semaphore user instead of root but due to my lack of knowledge of 'runit' I wasn't able yet

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

@carlos-alarcon /root is currently hard-coded into the executor (runner.js file) as it was intended to be ran inside docker / environment where semaphore is the only thing. Obviously not well designed, but that will change in upcoming versions of the API

from semaphore.

carlos-alarcon avatar carlos-alarcon commented on June 23, 2024

@matejkramny seems that '/root' is not hardcoded in runner.js any more:
var home = process.env.HOME + '/';
Anyway, in my machine, somehow the /opt/semaphore/runit_semaphore/run wasn't inherinting HOME enviroment variable (perhaps a 'runit' stuff, i never used 'runit' before so can't tell). So I edited /opt/sempahore/runit_semaphore/run to be like:

`#!/bin/bash

cd /opt/semaphore/
HOME=/root PORT=3000 node bin/semaphore.js`

which solved my problem (of not being able to run tasks). I guess that if i manage this /etc/semaphore/runit_semaphore/run to be launched by 'semaphore' user then it would still work but using other folders (HOME=/home/semaphore) for the playbooks.

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

Hmm I don't know what runit is either, but from experience with process managers, they sometimes don't inherit outside environment to the process unless explicitly directed.

from semaphore.

gvenka008c avatar gvenka008c commented on June 23, 2024

@matejkramny Does semaphore download all the playbook from git and store it in some location when running as docker?

docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b29051cc8349 castawaylabs/semaphore "node /srv/semaphore/" 45 hours ago Up 45 hours 0.0.0.0:80->80/tcp semaphore
ba4f55661d2c mongo "/entrypoint.sh mongo" 45 hours ago Up 45 hours 127.0.0.1:27017->27017/tcp mongodb
7b0428cf86a8 redis "/entrypoint.sh redis" 46 hours ago Up 46 hours 6379/tcp redisio

I am looking a way to find out how the playbook is getting called? will it be called from within docker container that's running semaphore? I was able to bring up the GUI and add ssh keys but for some reason the ssh to my remote machines where playbook needs to run are failing.

Please suggest.

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

It gets called when you run the job. Specifically look at lib/runner.js.

It downloads the playbook every time and then gets rid of it. Playbooks are downloaded to $HOME/

from semaphore.

gvenka008c avatar gvenka008c commented on June 23, 2024

@matejkramny Does semaphore downloads only the playbook or it will download my entires files / folders from the git repo? like all the roles, inventory files etc...

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

It will download the entire git repo, then tell ansible to use the playbook file

from semaphore.

tbynum avatar tbynum commented on June 23, 2024

I have a related question. I am trying to run semaphore on AWS in an EC2 instance. My github is behind the corporate firewall. I am having difficulty getting the SSH stuff set up. I have added the proxy info in the run file but it is not even trying to hit the github repo. I would also like to find a way to use one set of SSH keys to connect to github and a different set to connect to the EC2 instances I am trying to manage. Any thoughts?

Tim

from semaphore.

matejkramny avatar matejkramny commented on June 23, 2024

@tbynum please create a separate issue

from semaphore.

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.