Issues with meteor app on vagrant share - mongodb

I have a vagrant VM (virtualbox) setup with meteor. My host and guest are both Ubuntu. The VM contains a vboxfs share folder setup through the Vagrantfile. The behavior I am noticing is similar to a NFS mount.
I am able to create a meteor project in this shared folder, but when I run the project I get errors pointing to mongodb.
If I follow instructions on
https://github.com/pixelhandler/vagrant-dev-env/blob/master/README.md
my app works just fine.
Upon further investigation it seems that MongoDB does not work on NFS shares, http://www.mongodb.org/display/DOCS/NFS
Has anyone else run in to this issue? and if so, have you figured out a (non-rsync) solution?
I plan to send link of this question to 10gen, perhaps someone from their team can answer it.

Not sure what Mongo's plans are re running on NFS / vboxfs, but you could work around this by running your own MongoDB not in the shared folder (eg, use the ubuntu mongodb package). Use the MONGO_URL environment variable to tell meteor where to connect. If you pass this variable, meteor will not try to start MongoDB in the meteor project directory.

You can move the data dir somewhere inside the VM, and use a symlink from the vagrant folder:
cd /vagrant/.meteor/local
ln -s ~/db/
This means the data will not be shared, but you probably want it git ignored anyway.
(https://grahamrhay.wordpress.com/2013/06/18/running-meteor-in-a-vagrant-virtualbox/)

grahamrhay's solution would not work with the vagrant box started on Windows. There is no way to make symbolic links on windows for vagrant, at least not for administrator accounts.

Related

What's the fastest way to install and set up TYPO3 locally?

I want to install and set up TYPO3 on my local machine. What's the best practice and fastest way to do so?
For running TYPO3 on a local machine you need a web server running on your machine.
This can be done in different ways:
Native Web Server, PHP and database on a Linux based machine
Virtual Machine (VirtualBox, VMWare, Parallels, etc.)
Vagrant
Docker
Currently the fastest way to a "non power user" in my opinion is ddev.
ddev is a user-friendly possibility to run a perfect environment for TYPO3 on a docker base. It runs on Linux, Mac and Windows (minimum version 10, hyper-v recommended) and it brings all technologies you need for best experience.
Install Docker and ddev, see https://ddev.readthedocs.io/en/stable/
Create a folder for your installation, e.g. ~/Websites/my-website/ or C:\Websites\my-website\ and go into it.
Run ddev config and set these three options in the dialog:
Project name (default is your folder name): Whatever you like
Docroot location: public and say yes for creating
Project type: typo3
Run ddev start to start the Docker containers and add your root password to set the hosts entry (for accessing it via local domain)
Run ddev composer create typo3/cms-base-distribution ^9 and say yes for overwriting
Run ddev config again and just hit enter for every dialog to create a file which provides the DB credentials for your TYPO3 installation
Run ddev exec vendor/bin/typo3cms install:setup --no-interaction --admin-user-name=admin --admin-password=password --site-setup-type=site
That's all, you have a running TYPO3 instance on your local machine.
You can access it by using <project-name>.ddev.site in your browser, in our example it should be http://my-website.ddev.site. To get into the TYPO3 backend you only need to put the credentials admin:password on http://my-website.ddev.site/typo3.
For troubleshooting go to:
https://ddev.readthedocs.io/en/stable/users/troubleshooting/
https://docs.typo3.org/typo3cms/InstallationGuide/Troubleshooting/Index.html
https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/SettingUpTypo3Ddev.html

pgadmin4 : postgresql application server could not be contacted.

I have installed PostgreSQL 9.6.2 on my Windows 8.1. But the pgadmin4 is not able to contact the local server. I have tried several solutions suggested here in stackoverflow, tried to uninstall and reinstall PostgreSQL 9.6.2 , tried to modify the config.py, config_distro.py, and delete the files in Roaming folder,i tried standalone pgadmin4 installation, but no success.However, in my local machine i am able to access the server using psql.exe and log as as superuser (postgres user). Can you please suggest any possible solutions to starting/running pgadmin4 ? Thank you.
I found the same issue when upgrading to pgAdmin 4 (v1.6). On Windows I found that clearing out the content inside C:\Users\%USERNAME%\AppData\Roaming\pgAdmin\sessions folder fixed the issue for me. I believe it was attempting to use the sessions from the prior version and was failing. I know the question was marked as answered, but downgrading may not always be an option.
Note: AppData\Roaming\pgAdmin is a hidden folder.
Start pgAdmin 4 as administrator.
Do the following steps:
Right click pgAdmin 4 icon
Select "Run As Administrator"
I had the same issue on Windows 10, with a new installation of PostgreSQL 10.
I solved it by including the path C:\PostgreSQL\10\bin ({your path to postgresql}\bin) to system environment variables.
To access environment variables: Control Panel > System and security > System or right click on PC, then > Advance system settings > Environment variables > System variables > Path > Edit.
I've been dealing with this for awhile (frustrating). So much that I have instructions on my desktop consolidating all of these ideas. Here is my magic combination to the solution:
Delete from App Data C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
Add to Path Variables C:\Program Files\PostgreSQL\9.6\bin (I actually added it to both user and system)
Right click and start as admin.
You don't have to do this every time but when it gets out of wack try these steps.
What finally worked was downgrading to pgadminIII-v.1.22:
It seems in most of the cases Postgres trying to use information from previous sessions to find/connect the server and failing. Clearing out the previous session info helped me, it is a combination of 2 already mentioned answers above:
Navigate to Postgres session's folder
C:\Users\YourUsernameOrAdmin\AppData\Roaming\pgAdmin\sessions
Delete all the data from this folder.
Start PgAdmin in administrator mode.
Cheers!
if you are using Mac OS X here is a fix:
Open terminal and run this command
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log restart
and for other OS just restart your Postgresql server, it will solve
Then start pgAdmin4, it will start as normal
Share or comment if saved someone
Deleting the contents of C:\Users\%USERNAME%\AppData\Roaming\pgAdmin directory worked for me!
I had same issue on windows. I had v1.6 installed as well as v2.0. Uninstalling v1.6 allowed me to login.
I had the same problem, but running it as an admin worked.
Have you recently installed a new version of pgAdmin ?
This issue (and the misleading message) is simply due to the fact that old versions of pgAdmin are unable to read the settings saved by a newer version of pgAdmin !
Make sure you're starting the right version of pgAdmin (your shortcuts are likely to point to the old version !) and/or uninstall the old version: the upgrade wizard doesn't do it for you !
Deleting contents of folder C:\Users\User_Name\AppData\Roaming\pgAdmin\sessions helped me, I was able to start and load the pgAdmin server
I had the same issue on the macosx and I renamed .pgadmin (in /users/costa) to .pgadminx and I was able to start pgAdmin4.
In Windows Just go to this path and clear it
,that works !!
C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
I was able to solve the problem by changing the pgAdmin web interface port.
I believe this problem occurred on my computer because I have several other services consuming webs ports like qBittorrent, IDEJetbrains, etc.
Right-clicking on the pgAdmin logo near the clock is possible to configure it.
I Fixed it in windows 10 just running pgAdmin 4 as Run as Administrator .
If you use older postgresql version like 9.x and its services is running,PgAdmin 4 confused which server is base database.
So stop the service older version or new one.Run PgAdmin 4 as Administrator
Its worked for me
This is often a firewall problem. The firewall log then shows dropped packets between 127.0.0.1: and 127.0.0.1:, where the latter is the port shown in the Browser to get no connection with. This means, that the connection between pgAdmin client (high_port_1) and pgAdmin server (high_port_2) is blocked. Check your firewall log and if you find dropped packets like described, adapt your firewall settings accordingly.
If none of the methods help try checking your system and user environments PATH and PYTHONPATH variables.
I was getting this error due to my PATH variable was pointing to different Python installation (which comes from ArcGIS Desktop).
After removing path to my Python installation from PATH variable and completely removing PYTHONPATH variable, I got it working!
Keep in mind that python command will not be available from command line if you remove it from PATH.
I use the cmd prompt on Windows 10 with psql postgres postgres.
Then I launch pgAdmin4 and it works.
I had this problem with pgadmin4 v2.1 on linux fedora 27
Solved by installing a missing dependency:
python3-flask-babelex
Just click on that pgadmin 4 icon and run as administrator. Allow the access permissions. It will start locally.
I need to add this here because I've had several issues with this message. If you have recently upgraded to High Sierra you will find the latest (pgadmin 4.20) will keep appearing with the message "Application Server Could Not be Contacted". What this actually means on Macs is that python was unable to configure your environment in ~/.pgadmin
This directory stores all the things you setup and configure and even logs of what was ran on your user copy usage of pgadmin.
The way to fix this issue on High Sierra is down to sqlite3. If you look in that directory you'll see everything is stored in sqlite3 files.
When version 4.20 of pgadmin was released it was shipped with a version later than sqlite3.19 and the problem arises because High Sierra is shipped with sqlite3.19, so to fix this issue, you need to replace the old version of sqlite3 with the latest on your packager.
Now be aware, MacosX+ all use sqlite to store details for the majority of apps on your mac, so you'll need to make sure you do not just wipe the old version but you'll have to have both versions co-existing together in harmony to avoid anything major occurring on your mac.
1) download brew https://brew.sh/
2) update brew and upgrade brew to make sure it's up-to-date
3) brew install sqlite3
4) mv /usr/bin/sqlite3 /usr/bin/sqlite3.os
5) ln -s /usr/local/Cellar/sqlite/3.21.0/bin/sqlite3 /usr/bin/sqlite3
6) /usr/bin/sqlite3 -version (check version is later than 3.19)
You can now proceed to open up pgadmin as normal
Got this issue after I upgraded PostgreSQL 9.4 to 9.6. The 9.4 binary package had PgAdmin 3 while 9.6 came with PgAdmin 4. I resolved it after a clean installation (I completely uninstalled and reinstalled) of PostgreSQL.
However, under different circumstances, you could try running the pgAdmin 4 application as an Administrator. This should fix the error.
downloaded pgadmin 4 v2.0 and install it no problem atm on force installation. try it. that was solution for me.
For my case in Windows 10 for postgresql 10 version, it worked by changing SERVER_MODE to False in config_distro.py placed in web folder, as per these configuration settings: https://www.pgadmin.org/docs/pgadmin4/dev/desktop_deployment.html.
There are other settings mentioned in this answer (https://superuser.com/a/1131964) regarding python but I just changed SERVER_MODE and it worked.
Kill it in Windows Task Manager and then try again. It seems that there is some sort of a problem when accessing the server from different applications.
As for me on windows 2012r2 it's start to work only after I reinstall pgAdmin 4 to folder c:\pgAdmin4. With out spaces and any special chars.
And all so I give full permission to this folder in NTFS.
It worked for me after installing python2.7 for pgAdmin 4 v2
Happens mostly when you have multiple versions of pgadmin installed or while trying to upgrade. Even I tried everything from killing the "running PID on port 5432" to "changing the server mode". In my case I uninstall postgres and re-install it again on different port(5433).
Later, I opened it through cmd(right click on cmd and select "run cmd as an Administrator").

back up services on centos and restor it on another clean centos

i'm going straight to question..
is there any way to backup services configured on a Centos without system file of centos?
for example I want to back up OpenVP-n config and then restore it to another clean centos and just changing a few files..
or even back up a full Direct admin config and then restore it in another clean centos OS?
i don't want back up the whole centos..just i want backup configs on it..
I search out about this alot..but i didn't find anything working..please share your experience about this..
Is this even possible?
any help...?

Running Ember-CLI on VirtualBox

After a great deal work tinkering I have a mostly working copy of an ember-cli project running on a guest Ubuntu VirtualBox. One of my goals was to run the code inside a Shared Folder and I have it mostly working.
There are a number of hacks ahem, workarounds to get this far.
1. Enable symlinks on Virtualbox Shared Folders
2. Forward LiveReload port from Guest to Host
3. Replace the PROJECT/tmp folder with a symlink to the local Guest filesystem
What works...
When I edit a file in my ember project from the guest, the server sees the change and auto reloads.
What does not work....
When I edit a file in my ember project from the host, the server does NOT see the change and does nothing.
Why oh why does the ember-cli stack not detect changes made from the Host. I can't even point to the culprit. Is it Broccoli, livereload, node or my mother in law that is giving me trouble?

Vagrant Berkshelf - Shelf Path?

Is it possible to set the path where the berkshelf plugin puts the cookbooks it installs? (As in the .berkshelf folder)
I am running Windows 7.
I am currently trying to install a mysql server using an opscode cookbook to a vm and here at work they have the %HOMEDRIVE% system variable set to a network drive. So when .berkshelf starts at the beginning of the Vagrantfile, it pushes the cookbooks to the network drive and it causes it to be slow and well, its not where it should be. Is there a fix to this?
VirtualBox did this as well, but I fixed it by altering the settings. I tried looking for some sort of equivalent settings for berkshelf, but the closest I got was for the standard berkshelf (thats not a vagrant plugin), it appears you can set this environment variable:
ENV['BERKSHELF_PATH']
Found here:
http://www.rubydoc.info/github/RiotGames/berkshelf/Berkshelf#berkshelf_path-class_method
I need to be able to have the cookbooks it reads from the berksfile store to my laptops local drive instead, as in my scenario I cannot have the mobility of the VM limited to the building because of files that are stored on the network.
Any incite would be much appreciated.
Perhaps its better to use the actual berkshelf over the vagrant plugin?
Thanks.
If you want to have the portability - a full chef-repo ready for chef-solo runs, better off using standalone berkshelf instead of the vagrant-berkshelf plugin - which is NOT that flexibly.
For complex cookbooks, I prefer to use standalone berkshelf as it allows me to do berks install --path chef/cookbooks to copy all cookbooks required from ~/.berkshelf/cookbooks, then I can just tar the whole thing and transfer to other machines for the same chef-solo run. some people use capistrano automate the tar and scp/rsync over the network. I just use rysnc/scp;-)
HTH