i installed Magento via a vagrant box. it works fine.
However, i need to test code via CLI .i accordingly created a page at the root of the site with following code:
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
$customer = Mage::getModel('customer/customer')->load(79);
print_r($customer->getData());
i then tried to access this page via command line interface on windows (cygwin) with following commands
php magento/test.php
i get the following errors;
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [20 02] No connection could be made because the target machine actively refused it.
' in C:\DevFolder\magentoKlierik\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php:12 9
however when i make the same call via the URL i get access. i.e
why is there a difference when using command line and how do i give permission on the command line
You have to run the code inside the vagrant box, so in this case you need to run in your host system:
vagrant ssh -c 'php /vagrant/httpdocs/test.php'
For more information you can refer to the documentation.
Moreover I suggest you not to use custom scripts but use the system that is provided by magento for creating cli scripts.
You can find a good tutorial on inchoo (which I did not write) that provides you with some examples.
Installing MarkLogic 8 on CentOS 6.7 x64 via DigitalOcean
Okay so I downloaded the rpm file from:
https://developer.marklogic.com/download/binaries/8.0/MarkLogic-8.0-3.2.x86_64.rpm
I installed it with:
sudo yum install MarkLogic-8.0-3.2.x86_64.rpm
Started it:
sudo /etc/init.d/MarkLogic start
Went to admin interface:
my_ip_address:8001
I skip joining a cluster
I type in admin for user
Type in a password and confirm it
Realm is public
I click OK and...
I get redirected to:
my_ip_address:8001/security-install-go.xqy
And get this:
No data received
ERR_EMPTY_RESPONSE
Hide details
Unable to load the webpage because the server sent no data.
Reload this webpage
Press the reload button to resubmit the data needed to load the page.
Okay I got it to work.
The only difference I can see this time around was I followed this script (save the nginx stuff):
https://github.com/jmakeig/marklogic-bootstrapping/blob/master/digitalocean/bootstrap.sh
Actually, someone else ran into this and after investigating everything else I tried, this was the answer:
http://developer.marklogic.com/pipermail/general/2015-January/016311.html
The MarkLogic data directory /var/opt/MarkLogic wasn't owned by the daemon user
I'm having trouble installing Chef Sever (12.0.3) on my Centos 6.4 virtual machine. Whenever I install Chef Server and reconfigure with these commands, the /etc/chef-server does not get created:
rpm -ivh chef-server-core-12.0.1-1.x86_64.rpm
chef-server-ctl reconfigure
This is a problem because all of the .pem files for authentication do not get created as well. Has anyone ran into this issue? I've searched, but I haven't found anyone with this same issue so far. Any help is appreciated.
Jotun,
I think you may be needing the *.pem files and hence searching for chef-server directory.
Chef 12 does not create the chef-server directory and that is because there is no default user (admin incase of chef 11) in chef 12. So you have to exclusively create the user using the below command:
chef-server-ctl user-create any_user_name your_first_name your_last_name email password --filename FILE_NAME
this will create a user with admin rights and the FILENAME should be the path where the admin.pem will be created.
In the same way for org creation,
chef-server-ctl org-create org_short_name org_full_name --association_user admin --filename FILENAME
this will create a organization associated with the admin user and the FILENAME should be the path where the chef-validator.pem will be created.
You can proceed with the steps that you used in chef 11 and configure the workstation.
I couldn't find the reason this error was happening, but I just destroyed my VM and created a new one. Sorry if you are looking at this in the future and still want to know what was causing this problem.
I need to get MPICH2 working for my college project. But it appears I won't implement anything until I manage how to start MPICH2. For now I only try to run anything on my computer, nothing more. What I do:
I install the MPICH2 (from mpich.org/downloads, from the bottom of the site - the x86_64 Windows version) on my 64bit Windows 7 (I also tried the same with my 64bit Windows 8). I start the installer from a command line (run as an administrator), install MPICH2 for everybody (although my acc is the only one). After successful installation I run the wmpiregister.exe, where I type Danioss (it's the name of my account) and the password for this account. I click register, everything seems to be fine so far. Then I run wmpiconfig.exe, I don't change nor click anything and there is this error:
'g-pc: MPICH2 not installed or unable to query the host'
I can see on the left the table with my host name (g-pc) and the version of MPICH - 1.4.1p1. So it sees it is installed here but cannot query the host. I have no idea what that means.
Of course I tried to execute any compiled program but after running wmpiexec.exe, choosing the file and clicking Execute - I get
'Credentials for Danioss rejected connecting to g-PC
Aborting: Unable to connect to g-PC'
I tried running every .exe as an administrator, didn't help. I also installed and reinstalled the whole MPICH2 tens of times (literally - tens) trying different configurations. I also tried to install the 32bit version but that made no progress. I really have no idea what the problem is.
Please, help me!
Greetings,
Daniel
Try not specifying username after running wmpiexec -register. Just password for your current user. That worked well for me. Source: https://trac.mpich.org/projects/mpich/ticket/1151
First: crate a windows user password of your windows user acount
Second: go to installdir deform (C:\Program Files\SFTC\DEFORM\v10.2\3D)
Third: execute "wmpiregister.exe" and register user name and password that your windows user name and password
start deform on multiprocessor
good work
You need to run wmpiregister.exe which is in bin folder, to register your Windows user.
Register using mpiexec -register with ".\" before the username, in your case: .\Danioss.
I'm using a EC2 server instance. Used the following to install Jenkins:
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
but I need to install software on the Jenkins server so in my EC2 instance I did
sudo –s –H –u jenkins
to get into the jenkins server.
Then I tried to do
sudo cabal install quickcheck
but it prompted me for jenkins password.
I've been searching around the internet for 4hrs now and nothing is helping me get administrative privilege in the jenkins server.
So I'm building my project using the following command in shell:
sudo cabal clean
sudo cabal configure
sudo cabal build
sudo cabal install
This is the error I'm getting:
Started by timer
Building in workspace /var/lib/jenkins/jobs/Finance/workspace
Checkout:workspace / /var/lib/jenkins/jobs/Finance/workspace - hudson.remoting.LocalChannel#eea6dc
Using strategy: Default
Last Built Revision: Revision b638e2182dece0ef1a40232b1d75fa3ae5c01a5d (origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Commencing build of Revision b638e2182dece0ef1a40232b1d75fa3ae5c01a5d (origin/master)
Checking out Revision b638e2182dece0ef1a40232b1d75fa3ae5c01a5d (origin/master)
[workspace] $ /bin/sh -xe /tmp/hudson3500373817395137440.sh
+ sudo cabal clean
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
Build step 'Execute shell' marked build as failure
Sending e-mails to: ***#gmail.com
ERROR: Could not connect to SMTP host: localhost, port: 25
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at hudson.tasks.MailSender.execute(MailSender.java:116)
at hudson.tasks.Mailer.perform(Mailer.java:117)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
at hudson.model.Run.execute(Run.java:1592)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:286)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 17 more
Finished: FAILURE
Here is how you can fix it:
Stop Jenkins
Go go edit /var/lib/jenkins/config.xml
Change <useSecurity>true</useSecurity> to false
Restart Jenkins: sudo service jenkins restart
Navigate to the Jenkins dashboard to the "Configure Security" option you likely used before. This time, setup security the same as before, BUT set it to allow anyone to do anything, and allow user signup.
Go to www.yoursite.com/securityRealm/addUser and create a user
Then go change allow anyone to do anything to whatever you actually want users to be able to do. In my case, it is allow logged in users to do anything.
If you installed using apt-get in ubuntu 14.04, you will found the default password in /var/lib/jenkins/secrets/initialAdminPassword location.
Before installing jenkins, create a user named jenkins and set password there. Then after installing jenkins you can use the password you created.
With the default Jenkins installation using Homebrew on macOS this will output the initial password for the admin user:
sudo cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword
jenkins default administrator password is logged in log file in ubuntu
log file is situated in /var/log/jenkins/jenkins.log folder
password will be placed after this,
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
After Jenkins is installed just run sudo cat /var/lib/jenkins/secrets/initialAdminPassword.
In the Jenkins login page:
User: admin
Password: the output from the above command
On ubuntu 19.04, the default password are stored in the home directory:
cat ~/.jenkins/secrets/initialAdminPassword
The password is present in the log generated by docker run image as shown in the example below.
Jenkins Docker run log
Additionally you can check the directory /var/jenkins_home/secrets/
Its in the file name initialAdminPassword
You can use
cat /var/jenkins_home/secrets/initialAdminPassword
In my case I was using Jenkins Docker Image and I found the initial admin password using this command:
cat ~/secrets/initialAdminPassword
You can always disable security, then go in and re-enable it with the settings you want.
By default, Jenkins account is created without password and with the login shell as /bin/false.
jenkins:x:496:493:Jenkins Continuous Integration Server:/var/lib/jenkins:/bin/false
Change the shell to /bin/bash and you should be able to login without password by sudo su - jenkins.
Command to change the shell is:
chsh -s /bin/bash jenkin
When you install jenkins on your local machine, the default username is admin and password it gets automatically filled.
I was running Jenkins executing java -jar jenkins.war.
In my case Jenkins wrote webroot in an stdout: webroot: $user.home/.jenkins. So admin secret key was placed in a ~/.jenkins/secrets/initialAdminPassword.
I don't believe that the Jenkins user that is installed via apt has a password. If it does, I have never seen documentation. Based on the commands you entered, I am guessing you are using a Debian distro?
Is there any particular reason you must use the jenkins user to do the install instead of the user which was set up when you created your instance?
When installing Jenkins from AWS Marketplace . . .
"A default user "admin"with the instance-id as password is created to secure the Jenkins instance."
On the AWS Console for EC2, with the instance selected, choose the "Usage Instructions" tab:
"AWS Marketplace Usage Instructions
Latest Versions: 2.19.4.2
A default user "admin"with the instance-id as password is created to secure the Jenkins instance. Once the instance is started, copy the public DNS hostname of the server in the AWS Management Console and enter it in your web browser. The welcome screen allows you to request a trial license, start and evaluation, enter a license key, or connect to your instance to Operations Center. Once the license step is done, your instance is fully functional. We recommend enabling security and backups. You can connect with SSH to the server using the "ubuntu"linux user. The JENKINS_HOME is located under "/var/lib/jenkins". Jenkins listens on the following ports: * HTTP 80: through HAProxy, can be configured to use HTTPS:443 instead * Jenkins SSH 2222: primarily for the CloudBees Git Validated Merge Plugin * Jenkins JNLP 10000: communication from Jenkins agents or Jenkins CLI configured to use JNLP protocol. Not exposed by default on security groups."
Similar to the Ubuntu answer above, the Windows admin default password is stored in {jenkins install dir}\secrets\initialAdminPassword file (default install location would it in C:\Program Files (x86)\Jenkins\secrets\initialAdminPassword )
If you don't create a new user when you installed jenkins, then:
user: admin
pass: go to C:\Program Files (x86)\Jenkins\secrets and open the file initialAdminPassword
I am a Mac OS user & following credential pair worked for me:
Username: admin
Password: admin
For me the best method of retrieving admin pass is by executing cat command inside the running container.
docker exec YOUR_JENKINS_CONTAINER cat /var/jenkins_home/secrets/initialAdminPassword
On Windows it can be found in the file "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\secrets\initialAdminPassword"
(I know OP specified EC2 server, but this is now the first result on google when searching Jenkins Password)
Jenkins Default username and password
username: admin
And
password available in the root directory .jenkins\secrets\initialAdminPassword just open the file and copy text and paste into password textbox.
Well,
Even I tried to log in with the admin/password which was failed.
So I created my own user like this.
Go to Jenkins home folder (C:\User.jenkins or you can find this in Jenkins server startup logs)
Go to Config file config.xml
set disableSignup to false false
if at all you want to disable login security
4.set ser security to false. true
For mac users: Just run this command
cat ~/.jenkins/secrets/initialAdminPassword
Initial Password of Jenkins is stored in the following directory
cat /var/lib/jenkins/secrets/initialAdminPassword
There are few steps to follow:
Go to the folder: C:\Users\Manjeet\.jenkins .(here in your case, there can be your system name or your name instead of mine)
Open config.xml file using any text editor.(recommended Notepad++)
Go to Line number seven which is like <useSecurity>true</useSecurity>.
So make it change this from true to false.
Save this file and close the window.
Open Command Prompt and start your Jenkins .
(java -jar jenkins.war --httpPort=8085).
Open browser and search for your localhost at your given port number.
(localhost:8085)
You will see it doesn't ask for username and password anymore. Now you have to delete
that existed user and Add new user for setting new username and password.
Steps to make new Admin:
1.Go to people option which present at second number at left hand side below Dashboard
Click on admin option present in a row and than click on delete.
Go to Dashboard, Click on Manage Jenkins, Click on Configure Global Security.
Check the box of Enable security option.
Check the box of Jenkins own user database option and Uncheck Allow user to sign up present just below of it.
6 . Check Logged-in user can do anything option and Uncheck Allow anonymous read access present just below of it.
Make it Save and it will give you a new form for creating new first user. Fill the details correctly and click on Create First Admin User .(it will automatically made a change on that config.xml file just save it. )