We are trying to configure a deployment of ASP.NET application using Octopus deploy.
All is working fine, but sometimes the step fails while trying to overwrite files saying the the file is already locked by some other process.
We already stop IIS before the deployment starts, so not sure what we can try here.
Sometimes the error is in the application customlog folder(txt files), sometimes its in the bin folder for some dll etc.
Exact error is:
*Unable to copy the package to the specified directory 'D:\Apps\XYZ_Stage'. One or more files in the directory may be locked by another process. You could use a PreDeploy.ps1 script to stop any processes that may be locking the file. Error details follow.
Access to the path 'D:\Apps\XYZ_Stage\bin\XYZ.Business.dll' is denied.
System.UnauthorizedAccessException: Access to the path 'D:\Apps\XYZ_Stage\bin\ACA.Business.dll' is denied.*
Any suggestions?
If you're using Octopus 2.0 or higher, you can leverage the "IIS web site and application pool" deployment option which causes Octopus Deploy to handle all the complexities of deploying to IIS without you performing manual steps.
Here's some information: http://docs.octopusdeploy.com/display/OD/IIS+Websites+and+Application+Pools
Related
I've been trying to follow the
Setting Up Stackdriver Debugger for Java applications on Google Compute Engine, but am running into issues with Stackdriver Debug.
I'm building my .war file from a separate build server, then deploying it to my GCE server. I added the agent to the start command via /etc/defaults, and my app appears in the https://console.cloud.google.com/debug control panel. The version I set in the run command matches the revision that shows up in the source-context(s).json files.
However when I click open the app, I see the message that
No source version information was provided by the deployed application
I connected the app's git repo as a mirrored cloud repository, and can browse the source files in the sidebar of the Stackdriver Debug page. But, If I browse to a file and add a breakpoint I get an error that the error "File was not found in the executable."
I have ran the gcloud preview app gen-repo-info-file command, which created two basic json files storing my git repo and revision. Is it supposed to do anything else?
I have tried running jetty using both normal and extracted modes. If I have jetty first extract the war file, I can see the source-context.json filesin the WEB-INF/classes directory.
What am I missing?
https://github.com/GoogleCloudPlatform/cloud-debug-java#extra-classpath mentions
you can update the agentPath showing your WEB-INF/class directory.
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes
For multiple class paths:
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes:/another/path/with/classes
There are a couple of things going on here.
First, it sounds like you are doing the correct thing with gen-repo-info-file. The debugger agent should pick up the json files from the WEB-INF/classes directory.
The debugger uses fuzzy matching to find source files, so as long as the name of the .java file matches a file in your executable, you should not get that error.
The most likely scenario given the information in your question is that you are attaching the debugger to a launcher process, rather than your actual application. Without further details, I can't absolutely confirm that, though.
If you send us more details at cdbg-feedback#google.com, we can look more closely at your case to see if we can understand exactly what's happening, and potentially improve our documentation, since it sounds like you followed the docs pretty closely.
I moved the complete yii2 installation from one server to another with the help of FileZilla. Sadly, Filezilla don't keep the file permissions by default, and now I'm facing issues with file / directory permissions. I would like to know what's the file permissions for different directories and files in the yii2 directory hierarchy.
You should not transfer the project this way.
Currently it's the era of version control (especially Git) and Composer.
Once you created you project locally and put it under version control, you push it to your main repository and then deploy it to production server.
No need to use Filezilla or something like that.
If your hoster limits you in that, it's better to switch to another one.
In your current situation comparing and setting permissions manually can be very tidious, some of the permissions are set during init command.
So I recommend to deploy it again using version control and Composer instead of struggling with manual permissions setting.
But just in case, I checked production server, most of the folder permissions are 0755, for files - 0644. Folders like runtime, assets have 0777 permissions and set with init command as I mentioned above.
Locally I use Vagrant and pretty much everything here has 0777 permission.
I'm having a problem activating ioncube on openshift.
The loader-wizard tells me to do the following steps:
1) Download one of the following archives of Loaders for Linux x86-64: zip tar.gz tar.bz2 etc.
2)Transfer the Loaders to your web server and install in /usr/lib64/php/modules
3) Put this: "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so " in your ini files directory, /etc/php.d
4)Restart the Apache server software. When the server software has restarted, click here to test the Loader. If the Loader installation failed, check the Apache error log file for errors and see our guide to Unix related errors.
But I can't transfer the loader in /usr/lib64/php/modules, because I don't have permissions.
I tried to put the loader somewhere else and edit the new php ini located at ~/php/versions/shared/configuration/etc/php.ini I added there the the path to the loader, restarted the app, but still does not work.
I also posted this question on openshift.com forums, but didn't get any answers at the moment.
Any suggestions will be very appreciated.
Thank you.
Success in Loader installation will ultimately depend on the server and PHP configuration.
ionCube have recently released a Windows based installer that can automatically deploy the required Loader locally or to a remote server over FTP or SFTP, and also make configuration file changes. I suggest trying that. The download is at http://ioncu.be/LI
(disclosure: I am associated with ionCube)
I've created a simple 'hello' type JRuby application and use Warbler to WAR up and then deploy to JBoss. However, I get the following error when using the application:
ActiveRecord::JDBCError (The driver encountered an unknown error: java.sql.SQLException: path to '/opt/jboss/server/ruby/tmp/deploy/tmp8791905909469840942demo-exp.war/WEB-INF/db/production.sqlite3': '/opt/jboss/server/ruby/tmp/deploy/tmp8791905909469840942demo-exp.war/WEB-INF/db' does not exist):
Sure enough when I dig into the demo.war file the db directory is missing from WEB-INF directory. The db directory exists in the app directory though along with test, development and production database files.
Any ideas?
Usually the db directory contains migrations only. If you're using sqlite3 it contains the database file, but since when you deploy a war in production it gets unpacked somewhere in the server innards and potentially gets deleted on redeploy, your database file would go away with the redeploy. If the file is read-only and you're not worried about that consideration then you can easily add the db directory by running warble config and editing config/warble.rb and adding db to the config.dirs array.
I am trying to build a Visual Studio Package project via Hudson CI. This is a Visual Studio 2010 project. The project builds fine in my dev box, but for some reason, I keep getting the following error only when building in Hudson:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets(378,5): error : Error trying to read the VSIX manifest file "obj\Release\extension.vsixmanifest". The system cannot find the file specified. (Exception from HRESULT: 0x80070002) [C:\hudson\workspace\MyProject_Daily_Compilation\Source\MyProject.VisualStudio\MyProject.VisualStudio.csproj]
I have verified that the file exists on disk in the following location:
C:\Hudson\workspace\MyProject_Daily_Compilation\Source\MyProject.VisualStudio\obj\Release\extension.vsixmanifest
What could be causing this issue?
You are likely to experience such error if the user you are running your build as does not have administrative privileges.
So there are 2 solutions:
1) Run your build (build server) with administrative privileges.
or if you can't really change the user your build server is running on
2) and you actually don't need to deploy the VS extension on the build server itself, set the DeployExtension property in your *.csproj file to false.
Microsoft.VsSDK.targets sets that property by default to true
<DeployExtension Condition="'$(DeployExtension)' == ''">true</DeployExtension>
but if you don't need to deploy that extension locally (but rather would prefer to get the *.vsix bundle built you can safely put
<PropertyGroup>
<DeployExtension>false</DeployExtension>
</PropertyGroup>
The original error is basically happening because the attempt to get the deployment path fails at some point in the build and disrupts successful vsix package generation. By setting the property to false the build doesn't attempt to deploy the extension locally (but a valid *.vsix is generated)
I am guessing you running hudson as a service. If so the "0x80070002 - The system cannot find specified file" could well be due to the user being used to run hudson does not have access.
The quick solution to this is change the "Log on" user for the Hudson service to be your normal account.