gocd-slack-build-notifier
gocd-slack-build-notifier copied to clipboard
Reason: java.lang.RuntimeException: Unable to find go_notify.conf
Hi, I'm trying to make the plugin work by I'm facing this issue:
Class [GoNotificationPlugin] is annotated with @Extension but cannot be constructed. Reason: java.lang.RuntimeException: Unable to find go_notify.conf. Please make sure you've set it up right.. No extensions found in this plugin.Please check for @Extension annotations
I have defined two environment vars in my machine:
adrian@kobe% printenv GO_NOTIFY_CONF ~/Library/Application\ Support/Go\ Server/go_notify.conf
adrian@kobe% printenv CRUISE_SERVER_DIR ~/Library/Application\ Support/Go\ Server/
Also tried to locate the config file at /var/go/go_notify.conf
but that don't work either.
Any ideas?
Tanks!
A few questions
- Can you say what version of the plugin are you using?
- Can you give me the
printenv
outputs fromgo
user instead ofadrian
user? - Can you tell me, how these variables are being set? Like are they part of
server.sh
or the user's.bashrc
or something similar? -
/var/go/go_notify.conf
is the default location on linux machines. Going by the output, it looks like you're using a Mac. I've never ran Go in a Mac as standalone. Have you tried restarting the GoCD server once you put thego_notify.conf
inCRUISE_SERVER_DIR
.
Hi @ashwanthkumar
- Tried both
v1.4.0-RC11
andv1.4.0-RC10
- I don't have any
go
user created, do I have to have one? The README says nothing about that. - They are on a
.bashrc
file, they are shown on when invokingprintenv
. - I also tried to export
CRUISE_SERVER_DIR
environment variable (it didn't exist before then) which should be the path~/Library/Application\ Support/Go\ Server/
(where the plugin folder and other stuff is located in the macOS).
I tried to restart the Go Server on each try attempt I made, with no luck.
Also tried a gocd server docker image (runs on linux ) and modifying the image to set the plugin, but the same error occurs.
Go Server is 17.1.0 btw.
I don't have any
go
user created
Generally GoCD runs as go
user on *nix machines. Again I'm not sure on the mac.
Also, for the plugin to pick up the configuration the environment variables should be accessible by the go-server and not just on the terminal.
While I try to figure out how to get it working on mac (and update the instructions on README), can you try placing your go_notify.conf
on the home folder of the user running your go-server process?
Well, putting the config in my home works when starting the server from local.
I wonder why it didn't work with the docker image.
Where in the docker container do you've the go_notify.conf?
I tried to locate the file in the /var/go
directory, didn't work.
Il try to put the file in the home directory but I think that one is empty.
Ok, I don't know why I didn't work for the first time, by placing the go_notify.conf
in the /var/go/
directory worked in the docker image.
So as a workaround on a mac could be use a docker image instead running gocd locally.
Awesome thanks @qgadrian for that note.
I'm still working on testing the setup on Mac (running it locally). Sorry for the delay. Will post my updates soon.