Unable to start server via server.sh

550 views
Skip to first unread message

sneyed

unread,
Jan 3, 2017, 10:41:14 PM1/3/17
to go-cd
Hello :)

I am having difficulty starting a Generic Zip go-server on a Linux machine via the {install directory}/server.sh script. Here is some info:

Java version: 1.8.0_60
Release: Red Hat Enterprise Linux Server release 6.8 (Santiago)
Go server version: 16.12.0

We have successfully setup and used go server version 16.1.0 in the past, and are only now having this issue when attempting to upgrade to the latest version; therefore I assume there is some configuration step we are missing.

When I execute the command server.sh, I get this error:

ERROR: Failed to start Go server. Please check the logs.
java.lang.RuntimeException: Failed to start Go server.
        at com.thoughtworks.go.server.GoServer.startServer(GoServer.java:77)
        at com.thoughtworks.go.server.GoServer.go(GoServer.java:63)
        at com.thoughtworks.go.server.util.GoLauncher.main(GoLauncher.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.simontuffs.onejar.Boot.run(Boot.java:306)
        at com.simontuffs.onejar.Boot.main(Boot.java:159)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.eclipse.jgit.api.errors.RefNotFoundException: Ref master can not be resolved

The full stack trace is attached to this post
Forgive me if I have missed any other important information, please let me know and I will include it.

Any help is greatly appreciated
Thank you,
- Sneyed
Go server start error.txt

Aravind SV

unread,
Jan 4, 2017, 7:05:01 AM1/4/17
to go...@googlegroups.com
Can you try moving or renaming /var/lib/go-server/db/config.git/ directory and trying again?

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

sneyed

unread,
Jan 5, 2017, 10:19:02 PM1/5/17
to go-cd
I moved my config directory at (go-server-install-root)/db/config.git and I am now getting a different error:

There are errors in the Cruise config file.  Please read the error message and correct the errors.
Once fixed, please restart Cruise.
Error: Encrypted value for variable named 'DEPLOY_TOKEN' is invalid. This usually happens 
when the cipher text is modified to have an invalid value.

Looks like there is something wrong with a DEPLOY_TOKEN variable in the cruise config? Here are all mentions of DEPLOY_TOKEN in my cruise config file:

<variable name="SECRET_DEPLOY_TOKEN" secure="true"> (occurs multiple times)

<variable name="DEPLOY_TOKEN" secure="true">


I assume the syntax we are using is incorrect? Any tips on how to fix this?

Thanks very much,
Sneyed

Varsha Varadarajan

unread,
Jan 16, 2017, 11:23:33 PM1/16/17
to go-cd
Hi,

Usually if the cruise-config.xml present in the config directory (<server_installation_directory>/config) is invalid, GoCD server falls back to the latest valid version of the cruise-config.xml that is checked into the config.git repository. Because your config.git repository seemed corrupted, the first error that the go server threw was related to that - Ref master could not be resolved. Upon moving the config.git directory, the GoCD server could not start because the config present in in the config directory (<server_installation_directory>/config) is invalid. 

The error that the go server is throwing is ' Encrypted value for variable named 'DEPLOY_TOKEN' is invalid.'  You can change the configuration of the environment variable 'DEPLOY_TOKEN' to 

<variable name="DEPLOY_TOKEN" secure="true">
    <value>some_value</value>
</variable>

The Go server will encrypt the value and save the configuration in a newly created config.git directory.

Best,
Varsha

sneyed

unread,
Jan 16, 2017, 11:31:36 PM1/16/17
to go-cd
Hello,

Sorry for the delayed reply, this issue has been resolved for my use case.

I was attempting to start GO using a pre-existing cruise-config copied across from an older version of GO server (16.1.0)

I did not read the documentation properly (https://docs.gocd.io/current/installation/upgrading_go.html)
and had not copied across the cipher  file to the new server along with the cruise config.

This resulted in the encrypted values being translated incorrectly using a freshly generated cipher file on the new server.

If anyone else is looking to migrate an existing GO server installation to the latest version, I recommend looking into the "One click backup and restore" feature - which has worked well in my case.
Some reading on that here: https://docs.gocd.io/current/advanced_usage/one_click_backup.html

Thanks again for your help,
- Sneyed

Reply all
Reply to author
Forward
0 new messages