CCtray unable to connect to dashboard - cruisecontrol.net

I am using CCnet 1.6 and cctray 1.6. On the build server, the tray works properly using localhost. Remotely though, I am not able to connect the tray to the dashboard. The dashboard URL works great, but when I put that into the cctray settings, I get a 500 internal server error.
This worked up until I had to move CCnet from defaultwebsite to its own. Did I miss something when I changed it over?
Thanks,
Joe

Actually this is similar to a question I just asked but if you want to persist with remoting (but may not work so well over the Internet with firwalls and the like)
Open your dashboard.config (likely path is C:\Program Files (x86)\CruiseControl.NET\webdashboard\dashboard.config)
Find the port number your dashboard is connecting to the server on (eg: 21234)
In CC Tray, select remoting and enter hostname:portnumber (eg: mycruiseserver:21234)

Assuming that the CCNET server is part of your local network this should work:
Select .NET remoting as connection type
Specify the CCNET server's address only by its IP address (instead of using the dashboard URL)

Try switching off your firewall, it may be that you havn't opened your port.
Then, use the buildserver:port method (remotely via .NET).

I just fixed my problem (v1.8.3 for my installation).
I set the name attribute in the <server /> tag in dashboard.config to match the hostname. I'm not sure if that is required but that is the first thing I tried.
Then I inspected the bindings for the site that the dashboard is hosted under in IIS. The hostname for the binding was blank, so I changed it to the hostname for the site.
I noticed that the CCNet machine's event log had exceptions logged for unknown domain when I was trying to connect CCTray to it.
When I went to add a build server in CCTray on the remote machine, I selected via dashboard and it worked for me.

Related

ReInstall Sitecore IIS can't resolve host (with ERR_NAME_NOT_RESOLVED)

I decided to reinstall Sitecore 8 instance via wizard, I have removed instance and install a new one with the same name XYZ.
but after reinstall it I am getting an error in browser - ERR_NAME_NOT_RESOLVED
I checked IIS binding, I checked hosts file, reset DNS, restart PC and etc I still get this error in any browsers.
How I can fix it? What is the issue?
I have found solution https://support.microsoft.com/en-us/kb/2823477 but I can't understend how sitecore installer can change it.
Generally, the process of site resolution goes in the following consequence:
DNS - find ip address by the hostname (from request header)
Access IIS with that IP (and port if not default 80)
IIS checks bindings by hostname from header and serves corresponding website.
Website being resolved has (merged) web.config in root folder. It has node with all sites served by current Sitecore instance, being listed. Order does matter! First successful match (by hostname or port or default) works it out.
Site being found on previous step has startItem property which is your Sitecore item served by dafault.
Please go and carefully check all those steps to see where it breaks. Also I have previously write a blog post, you may find it helpful with more details on that:
http://blog.martinmiles.net/post/how-websites-are-resolved-with-sitecore
Do any sites work with a Local name configured in 'hosts'?
You may need to disable the Loopback Check in your tcpip stack. Windows uses this as a countermeasure for man in the middle attacks by default on many systems. A registry change is needed to allow a machine to refer to itself using a name that is not its own Hostname. Sorry, but I can't remember the actual key.

IIS 7.5 broken, cannot connect to localhost, error 404

Someone set up IIS 7.5 on my computer with a sample project. I created a new project and I wanted this new project to be accessible on the localhost (default port 80). I changed the Site (under Sites in the navigator) in the IIS Manager and now I can't do anything.
When I try to run the project from Visual Studio it opens successfully in the browser in "localhost/#somePort" but when I try to type in just "localhost" into the browser, I get a 404 Error.
Please, any ideas on how to fix this? I think maybe some default files for IIS were changed/corrupted.
Usually from Visual studio if it's an ASP.net project it will run from the Web Developer test engine (which is a mini iis that runs on a random port)... You need to publish the project to IIS or copy the compiled output to a folder that is within your IIS's site's directory path and change that folder to an application (from the iis mmc console, right clicking on the folder and selecting Change to Application, I believe...
I wasn't sure about the "localhost/#somePort" but i'm assuming I am getting what you meant ;)
I just ran into the same problem. Apparently changing the bindings changes only the default site / and not the child virtual applications.
I found this article - http://www.carryoverbit.com/running-iis-on-localhost-only/
Incase the link is broken...
After editing the bindings in IISManager ("Edit Bindings..."), you need to use netsh and add 127.0.0.1 as a listener for http traffic.
Open command prompt (as admin)
netsh
netsh> http
netsh http> show iplisten
(empty list is shown)
netsh http> add iplisten 127.0.0.1
IP address successfully added
Now use iisreset and everything should work.

CruiseControl.NET force build not working from CCTray

I really hope someone who is a CC.NET expert can help with this, because this problem is painful!
I have a remote build machine with CruiseControl.NET and CCTray running (version 1.5.7256.1)
On the local machine I have CCtray connecting through HTTP not .NET remoting.
When I configure the projects, I add a server through HTTP and use the following URL:
http://localhost/ccnet
If I leave [Set to pre-1.5.0 server] UNCHECKED, then it fails to connect with this error:
Failed to connect to server: The remote server returned an error: (500) Internal Server Error.
If I set to [Set to pre-1.5.0. server] CHECKED, then it succeeds and I can kick builds off from CCtray on the local machine fine.
Now, if I go back to another machine which I want to connect remotely, I follow same steps. Again, only pre-1.5.0 setting works. WHY?! CruiseControl.NET and CCTray are at 1.5.7256.1?!?
The 2nd problem and main problem which I think may be related to the previous; if I then use the pre-1.5.0 setting the pojects show up but when I force a build I now get this error:
An unexpected error has occurred while trying to force a build.
The method or operation is not implemented.
What am I doing wrong, I'm really struggling with this. I previously was using 1.4 versions and this worked fine, so has something broken? I'm using IIS7 too so don't know if this could be something to do with it.
I had a look at the tray app's source code for the 1.5 release (as well as the current trunk.) When connected to a pre-1.5 server, regardless of whether you specified the connection as remoting or HTTP, you will receive the unimplemented exception message when attempting to force build a project.
Looks like your options at the moment are to wait for a new release or pull down the code and modify (and I have no idea how easy backwards compatibility was maintained between versions...)
It sounds like you may have configuration options that are part of a breaking change perhaps? can you post more of your configuration so we can check it?
Also after you save changes have you looked at the server log? it often has information about what broke. Especially the part that happens right after you change a config file and save.
I'd be interested in seeing log file information. Also, why are you using http rather than remoting? Perhaps show us some of your settings in ccnet.exe.config? here's my remoting setup which I believe is the default:
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="21234">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
also you may want to check security issues and firewall settings on that server. (windows event log for security audit failures, etc...)

Setting the Hostname in IIS Bindings Breaks Website

I just got a Windows Server 2008 VPS and I'm having trouble getting IIS7 setup.
I created a new website in IIS with the path, ip address, and hostname (like 'www.nameofsite.com') and click OK. When I browse to the site it pulls up "http://www.nameofsite.com" in the browser and... nothing... IE cannot display this webpage.
If I blank out the hostname in the bindings and click [Browse] it works fine (it takes me to http://10.10.2.92 - the computer's ip). So entering the hostname breaks the website.
Any ideas on what I'm missing? Services I might not have running or roles I'm missing?
No server roles were initially installed on the VPS so I installed IIS, DHCP, DNS, and Application Server... overkill, but I wasn't sure what to install.
First it has to be in DNS or the client machines hosts file. To test this you can add the hostname to the servers hosts file.
Go to start -> run and type "drivers" change to the etc directory you want to edit the hosts file. The entries in it are like a local DNS. They only work on the local machine!
You must use EXTERNAL DNS not Internal DNS to make it visible across the internet. Change the DNS pointer at your registrar or whatever you are using for external DNS propagation.

Getting CC-Tray to work

I am trying to get cc-tray to work instead of using the web dashboard. I'm not sure how I can get the correct url for the server that my cruisecontrol is running on and I can't find any useful documentations online. Can anyone help?
Thanks
I had the same trouble and was resolved setting this Url in the Add Server (http): http://yourserver/ccnet/server/local/ViewServerReport.aspx. It works fine with this.
It depends a bit on the version you use. It is always a good idea to use the version of CCTray that you download from your running instance of the CCNet dashboard (on the dashboard, in the left column, you'll find a link 'Download CCTray').
Then it is mostly a matter of "Add Server". Older versions required a Remoting connection that requires some ports open in your connection to CCNet. Nowadays, you can connect over HTTP.
If you are using a version after 1.1 then you will want to point your CC tray client to the web dashboard site.
You should make sure you have the CCNET dashboard setup of a web server then you can do the following.
File > Settings > Build Projects (click add)
Add Server (click)
Choose Via the CruiseControl dashboard
Enter the address of your web dashboard site. Perhaps something like "yourserver.com/ccnet". You can find this via browsing to the web dashboard then copying the URL upto the folder level.
Click OK, choose the projects to watch
Profit!

Resources