I configured Stash to use a non-default port for ssh, 8090, instead of 7999. Bamboo insists on using 7999 to clone from the linked Stash server. Naturally I'm getting a connection refused error:
(com.atlassian.bamboo.repository.RepositoryException : java.lang.RuntimeException: com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.repository.RepositoryException: : ssh://git@xx.xx.xx.xx:7999/xx/xx.git: java.net.ConnectException: Connection refused)
I tried dropping and recreating the application link but it didn't help.
How can I make Bamboo use the configured ssh port in Stash?
David
ATM Bamboo stores Stash port information when repository definition is created. So when you changed Stash SSH port setting Bamboo is not aware of that change and will use old data.
The problem is that you're also not able to change that from the UI. There are 2 ways to fix it:
I've added improvement request on your behalf: https://jira.atlassian.com/browse/BAM-14825please vote on it if you think such feature makes sense.
This worked like a charm:
UPDATE VCS_LOCATION
SET XML_DEFINITION_DATA = REPLACE(XML_DEFINITION_DATA, '7999', '8090');
I made sure to backup that table, stop Bamboo running, and that the only occurrences of 7999 were in the repositoryUrl. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David,
1. What file did you modify to change your Stash port? Did you edit the "server.xml" file referring to: https://confluence.atlassian.com/display/STASH/Changing+the+port+that+Stash+listens+on?If you navigate to Stash Administration - > Server Settings is "SSH" enabled, what port is listed there?
2. Does the base URL you are using to access both applications matches the values you are using to create application links, and the values saved in each application under Administration - > General Configuration (Administration - > Server Settings for Stash)?
3. What version of Bamboo and Stash are you using? Is Stash modified as a linked repository (https://confluence.atlassian.com/display/BAMBOO/Linking+to+source+code+repositories)?
4. Are Bamboo and Stash on the same machine? If not can you ping your Stash server from the Bamboo machine with no issues?
5. Can you please enable "Basic Access" in addition to OAuth for both incoming and outgoing and check if you notice any difference?
6. Please remove your application links from both Bamboo and Stash and try re-creating them using a "<protocol>://<IP address>:<port>/<context>" pattern instead of the base URL. Do you see any difference?
7. If you select the repository that is giving you the above exception in Stash and click on clone, do you see a correct ssh path? Can you clone this repo from the command line on your bamboo machine?
Hope this information helps David.
If the problem persists, please open a supprt ticket, attach both your Bamboo and Stash logs and provide a link to this question.
Thank you.
Best regards,
Sepideh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.