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

Reason: java.lang.RuntimeException: Unable to find go_notify.conf #67

Open
qgadrian opened this issue Feb 9, 2017 · 8 comments
Open

Comments

@qgadrian
Copy link

qgadrian commented Feb 9, 2017

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!

@ashwanthkumar
Copy link
Owner

A few questions

  1. Can you say what version of the plugin are you using?
  2. Can you give me the printenv outputs from go user instead of adrian user?
  3. 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?
  4. /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 the go_notify.conf in CRUISE_SERVER_DIR.

@qgadrian
Copy link
Author

Hi @ashwanthkumar

  1. Tried both v1.4.0-RC11 and v1.4.0-RC10
  2. I don't have any go user created, do I have to have one? The README says nothing about that.
  3. They are on a .bashrc file, they are shown on when invoking printenv.
  4. 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.

@ashwanthkumar
Copy link
Owner

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?

@qgadrian
Copy link
Author

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.

@ashwanthkumar
Copy link
Owner

Where in the docker container do you've the go_notify.conf?

@qgadrian
Copy link
Author

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.

@qgadrian
Copy link
Author

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.

@ashwanthkumar
Copy link
Owner

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.

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