Join VM to domain - azure-resource-manager

I am using arm template to build Azure VM. Once the vm provisioning is complete it then join to domain. However, the join operation fails.
I tired to add the vm manually to the domain. It work with out any issue.
Please see the link for the template https://drive.google.com/open?id=1cUIIIFJpQHhesZXtf7-pfX_oTTq_C0NH
The c:\windowsazure\logs\plugins(or extensions)\domainjoin log file shows the following error
Thanks

in this case the error was due to attempt to join vm to a wrong OU.

Related

AWS codecommit not working with git-remote-codecommit

I am working on aws cloud and using codecommit service. I want to set up git-remote-codecommit tool on my ubuntu OS. but it give me error.
Here I was trying to follow following document.
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html as federated user.
I added version information about OS and other required tools.
But after doing all this when try to execute
git clone codecommit: command it throws fatal error.
Can someone help me, what is root cause for this and how can I solve this issue.
Welcome to AWS Codecommit, it is a great service but has its quirks.
First question for you is have you configured your IAM role properly to have STS Assume role access? If you have not done that this role will not work with the federation. I would need to see a sample of your IAM role before I can help you debug the issue.
Additionally i am providing this link which walks you through the setup for federated roles: https://aws.amazon.com/blogs/devops/using-federated-identities-with-aws-codecommit/

I am getting error "The network adapter could not establish the connection" in my oracle database

I had installed oracle stand alone database on my laptop. It was working perfectly. Two days before I installed new IDE Idea intelliJ and tomcat server along with it. Now when I try to connect to my database account I am getting the error mentioned in title.
This is oracle database and I am using sql developer to connect with it. I think their is a port conflict. It works on port 8080 I guess and my IDE and tomcat also using the save port. However I have changed the port of tomcat 8080 to 8081 and it started working. Now problem is with database.
enter image description here
After 4 hours continuous efforts, finally I got answer of my question. I am writing this for others facing the same problem. There are three things you have to take care to resolve this error.
First thing is to change your oracle database port number. You can find this in oracle folder location go to oracle folder and follow this hierarchy oracle -> product -> 11.2.0(you may have different folder name according to your version) -> server -> config
in config folder you will find log and script folders go to log folder and open postDBConnection.log file open it in text editor you will find
dbms_xdb.sethttpport('8080');
just change 8080 to any other port number do the same for script folder open postDBConnection.sql file and modify it. Your port number will be changed.
Second thing is you can check for your hostname and port number for listener. follow the folder hierarchy
oracle -> product -> 11.2.0(you may have different folder name according to your version) -> server -> network -> Admin now open listener.ora and tnsnames.ora open both files one by one and verify hostname and port number. This information should be same in both files as well as in you connection.
Third thing is be sure that your listener port is started. Right click on "ThisPC" you will find "Manage" option click on it now click on "Services and Aplicaions" now click on "Services" in services find oracle service. Here you will find "OracleXETNSListener" or another name of oracle listener. Right click on it and start it. Now restart your oracle database.
For further help refer to the link below:
https://www.youtube.com/watch?v=pMQXVihgrrE&t=254s

Unable to copy to Amazon S3 using Full Administrator access and Full S3 access

I had a perfectly working instance of a WP-CLI wordpress plugin to upload files to S3 using the AmazonS3FullAccess policy. I migrated servers, and the copy started failing. "Failed to copy or write".
I even included the Full Administrator access to the IAM policy just to see what's going on when there are no restrictions, and the copy is still failing. Any idea what might be wrong?
Things I have tried: ensure time (via NTPD synchronization) on the new server is correct. Cross check the environment: php version, etc. The application files are exactly the same. I also used the host files method to check the previous server and it is working well.
Solved the problem by creating new access keys. For some reason, it seems that migrating a server will make the old access keys stop working? Ah, well.
P.S. I also downgraded the policies right back, to only what the application needs.

box_auth() without localhost

I'm trying to use the boxr package to link my box account to R-Server.
I get as far in the box_auth() instructions as step 3 from the box pdf https://cran.r-project.org/web/packages/boxr/boxr.pdf
A window pops up and I authorise connection then I get the error 'Safari can't connect to the server'.
I have no knowledge of how apache or web development works so forgive my naivety, I've come to understand the problem is I don't have localhost set up on my Mac.
I'm unable to turn these features on because it requires admin rights and my company won't allow users to have this.
Is there something else I can put in the redirect_uri box apart from localhost that will allow this to authenticate?
Thanks
The issue i had was mostly that authenticating box through R-Server isn't supported. https://github.com/brendan-r/boxr/issues/23
To get around this I used my personal laptop to authenticate locally then uploaded the .Renviron and .boxr-oauth files to R server (which is the advice in the github post)
This was slightly tricky as R wasn't showing the .boxr-oauth file but I managed to copy it to a folder, zip the folder, then upload that to R-Server.
Now running the box_auth() function authenticates as it should.
As of v0.3.5 (November 2019) boxr has a new alternative authentication method designed for remote servers, box_auth_service(), that closes issue 23. It's slightly is different than the oAuth way, because it uses "Service" accounts as the actors instead of the "User" account. But the "Service" accounts are what's needed to maintain security within a organization, so we opted for that. Please open an issue on the repo if you run into any issues.

SQL Express & IIS - A database won't attach if you manually detached it?

Since the answers did not really cover the problem, I posted this on ASP.Net and completly rephrased it. I will post the edited question here:
I have been using the attachDB connection string and I usually deploy to IIS. The site works fine, however, I made some changes to the database and the newest version would not copy as it said file in use.
I opened up SQL management studio and saw that it was mounted so I did a dettach.
I was then able to copy the new version without problem, however, when I next run the site, I get:
Unable to open the physical file "C:\inetpub\wwwroot\vs\App_Data\aspnetdb.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)".
An attempt to attach an auto-named database for file C:\inetpub\wwwroot\vs\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
And, if I try to access .Net users or the other few options within IIS Manager, I get the following error:
.NET Users
There was an error while performing this operation.
Details:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
OK
I have tried recycling the application pool, restarting the SQL instance and even restarting the computer.
Nothing helps and I cannot figure out what is wrong... Where does it remember where previous databases are connected and why doesn't it automatically reattach the database?... Someone said that they auto detach after 2 1/2 hours, however I waited 5 hours when a database wasn't in use and SQL Manager showed it was still attached.
When I manually reattach the database, everything works fine.
When you ask a database to be attached on-the-fly to a SQL Express instance using the AttachDBFileName connections string the application will not connect to the SQL Expres sinstance at all, but instead it will connect to a child instance, which is an new instance created specificaly for the user requesting the attach operation. See SQL Server 2005 Express Edition User Instances. This child instance will attach the database and will continue to run for up two one hour, after which it will shut itself down.
When you try to connect from 'enterprise manager' you will not be able to connect to the child instance (is realy complicated to connect explicitly to one, so you cannot accidentaly do it), you are connecting to the parent instance and messing with the database.
To summarize, either stick with the RANU model and use AttachDBFileName, or use a normal database operations mode and manage the database from the SSMS. Don't mix the two.
Are you certain there isn't already a database with the same name attached to the SQL Express instance you are pointing your site at?
Also, does the identity the site is running under when it attempts to attach the database have admin rights in SQL Express? If not, this command won't work (I'm not sure what error it gives in that situation, but "Access Denied" would sound reasonable).
The page "SQL Server 2005 Express Edition User Instances" seems to give a good overview of the issues and workarounds.
Edit to add
Could this be the issue:
An error will be generated if a log file exists in the same directory as the data file and the 'database' keyword is used when attaching the primary data file. In this case, remove the log file. Once the database is attached, a new log file will be automatically generated based on the physical path.
Taken from the documentation for SqlConnectionStringBuilder.AttachDBFileName Property
You'll need to delete the log file before you can re-attach the database through this method.

Resources