How do I run mongo-express (without authentication)? - mongodb

According to the official documentation for the web-based MongoDB admin interface mongo-express, one starts the tool using
cd YOUR_PATH/node_modules/mongo-express/ && node app.js
However, this does not seem to work. If I execute it on my system, I only get the "Usage" info console output. No error output. The same is true when using whatever combination of username / password / database parameters.
The mongod process works perfectly. Even the alternative tool mongomate (read-only) works fine on my system. I have created a simple test database, no authentication. All config settings on default.
Am I supposed to configure anything before using the application? I remember very clearly that I managed to get this to work very easily on another system some time ago, but now I just don't manage to get it started. Googling for "mongo-express" doesn't yield any helpful results either.
mongod db version is v3.2.0.
mongo-express version is 0.27.6.

OK, after reinstallation with the current version it worked again.
Current Version of mongo-express version is now 0.28.8.
Further investigation: After an experimental downgrade to the original version 0.27.6, it stopped working again, meaning that there was something wrong with that release. Upgrading to a newer version solved the issue.

Related

Did anyone manage to get the DVDRental example using Direct to SwiftUI running?

I've loaded the finished DVDRental demo app
with
git clone -b branches/10-customized \
https://github.com/DirectToSwift/DVDRental.git
as well as tried it with
git clone -b branches/01-default-rulemodel \
https://github.com/DirectToSwift/DVDRental.git
(see http://www.alwaysrightinstitute.com/directtoswiftui/) and restored the demo database.
Currently, I am trying to execute the app, following the instructions on http://www.alwaysrightinstitute.com/directtoswiftui/ and ReadMe from https://github.com/DirectToSwift/DVDRental. Which means I have named the database accordingly and built the app. In fact, you should only install the database, download the project and it should be running without any change. However, the app remains on the launch screen, showing a "connecting database" message.
Through an exhaustive debugging process, I came to the conclusion that there is something wrong with the authentication. However, I could not determine what exactly goes wrong.
Is there anybody who tried it and it worked?
Using:
Xcode 11.3.1; Swift 5; iOS 13; Postgres.app Version 2.3.3e; PostgreSQL 12
Any idea how to solve the problem?
Update: there is no problem with the database. I can connect via psql, clients such as postico or navicat, or with my own apps using PostgresClientKit. The problem has been tracked down to the authentication process. Therefore I'm pretty sure that the problem lies somewhere there
Apparently, the developers "forgot" to enable authentication.
Right, it is quite possible that I didn't have auth on. I'll see
whether I can give it a try on the weekend.
needless to say, two months later it is still not fixed

Pydev 3.0 + Eclipse + Google App Engine Debugging not working

I've been having problems getting debugging working with this setup for the past year. Supposedly, this is fixed in the latest versions, but I just can't seem to get it to work.
I'm using Mac OSX 10.8.5, Eclipse Keplar, PyDev 3.0.0, and Google App Engine 1.8.8.
I set up a run configuration to point to dev_appserver.py, running my project. That works fine. My python version is 2.7.3, and everything works in normal mode. When I try to run in debug mode, however, the app runs, the output specifically states:
pydev debugger: starting
pydev debugger: google app engine integration enabled
But after 20 seconds, the python process terminates with this error message:
'Launching New_configuration' has encountered a problem.
Timed out after 20.0 seconds while waiting for python script to connect.
Accept timed out
Execution works during those 20 seconds, because I can hit URLs connected to my app and see an effect. Breakpoints do not work, though. Is there something I need to do to get python to 'connect'?
Also - I should note that switching back to using 'old_dev_appserver.py' fixes this problem - debugging works fine when I do this. But, this is not really a solution, because I need to use the latest socket additions in the newer releases.
Thanks for any advice.
temporary solution:
edit the pydev_app_engine_debug_startup.py file:
eclipse/plugins/org.python.pydev_${VERSION}/pysrc/pydev_app_engine_debug_startup.py
change the line that reads:
if ':' not in config.version_id:
to:
if ':' not in config.version_id or config.version_id.startswith('default:'):
Looks like this is fixed in 1.9.0. I also had to make sure to update PyDev to the latest (3.3.3 at the time of this writing).
One more thing to add, and this one really tripped me up (on MacOS) -
In Eclipse, under Run -> Run Configurations, set the Main Module to point to this location:
/usr/local/google_appengine/dev_appserver.py
NOT the symlink:
/usr/local/bin/dev_appserver.py
Well, finally I found the answer. It is a Google's bug.
It has been reported and acknowledged.
see Debug is not working with PyDev again 1.8.8!
Update: Until the bug is fixed I am using PyCharm. The pro version has 30 days trial and works with GAE. It works like, well, a charm. I may even consider switching to it from Elicpse/PyDev
But I am used to JetBrains tools with Android Studio recnetly, and WebStorm and Resharper in the past, so I know to find my way around their IDEs. Your milage may and will vary.
Since the question, a new GAE has been released 1.8.9
Running GAE 1.8.9 with PyDev3.3.3 on Windows8.
This timeout issue still occurred.
When I entered the temporary workaround changes to pydev_app_engine_debug_startup described in the earlier answer, then the browser could not connect to the app.
However, on backing out this change, not only did the 'Launching New_configuration' not appear, but the breakpoints worked.
More info on the Python Tool Support for the App Engine Development Server is here
https://docs.google.com/document/d/1CCSaRiIWCLgbD3OwmuKsRoHHDfBffbROWyVWWL0ZXN4/edit

Any good MongoDB admin UI for MacOS with auth support?

I've been using mViever for several months and it fitted me perfectly, however it doesn't support proper authentification (when mongod is launched with --auth parameter). So, now I'm trying to find any good replacement for MacOS with auth support.
Tried MongoHub, but it doesn't support most of common Mac hotkeys (even Enter doesn't work as submit), and by the way, it also has some bugs with authentification. To be shorter, which of these http://www.mongodb.org/display/DOCS/Admin+UIs to choose? I've tested some of them, but nothing really liked (except old good mViever).
I assume that's a typo and you are referring to mViewer. As you can see here, it does support authentication:
http://imaginea.github.com/mViewer/0.9/pages/getting_started.html
There were issues with auth in 0.9.1, but they have been fixed. See here:
https://github.com/Imaginea/mViewer/issues/75
For some reason, the 0.9.2 binaries are not available yet (even though the comment says October), but it's not too hard to build yourself:
git clone https://github.com/Imaginea/mViewer.git
cd mViewer
mvn clean package -Prelease -DskipTests
Once all that was finished, I took a look in the target folder:
cd target
ls mViewer-0.9.2.*
Here's my mViewer 0.9.2 session logged in with user "adam" to an auth enabled mongod:
I just released a minimalist mongodb data viewer for nodejs github.com/marcdelalonde/mongo-viewer
I have planned to add auth support very soon :)

symfony2 locale and deployment

I am in the proces of creating a web application in symfony2. I have done all the development locally(OSX), but now I want to show a first version in a presentation where I can not use my own laptop.
I am deploying to an ubuntu 10 server. I also tested it on another small ubuntu 11 vps, but got the same problems.
I double checked with this tutorial whether php is set up correctly for symfony on my ubuntu server:
http://www.joelverhagen.com/blog/2011/05/how-to-configure-symfony-2-0-on-ubuntu-server-2011-4/
For deployment I followed these steps:
Moving app to production mode in Symfony 2
However the first step ( php app/console cache:clear --env=prod --no-debug ) gives me following error (this error also occurs when running this command locally):
php app/console cache:clear --env=prod --no-debug
Clearing the cache for the prod environment with debug false
[ReflectionException]
Class Packed\Bundle\UserBundle\Entity\Rapport does not exist
cache:clear [--no-warmup] [--no-optional-warmers]
Which is a bit weird since Packed\Bundle\UserBundle\Entity\Rapport does not exist, Packed\Bundle\ScoreModelBundle\Entity\Rapport however does.
since the app doe not need to go into production for some time this is not very urgent, what is very urgent is to get it running in development mode, so I tried using it through app_dev.php.
If I remove the localhost-check in app_dev.php everything works as expected but the i8n is not working... I can not switch to other locales as was possible locally:
xxx.com/app_dev.php/en
And it does not use the messages.nl.yml, messages.en.yml, ... and other files.
Any idea what might be causing this?
I checked the symfony and apache log but nothing weird there. Any other logs I should check?
Thanks!
Joris
Try to rebuild your bootstrap file. If you're using APC-cache restart it from cli. If it doesn't help.
Easiest way to do it is run composer and do the update.
To check the translations (the templates should be cached on the server) check the config.yml translator service must be enabled there. You may have it enabled in config_dev.yml but not in the config_prod.yml

Fabfile with support for sqlalchemy-migrate deployments?

I have database migrations (with sqlalchemy-migrate) working well in my dev environment. However, I'm a little stumped about how to integrate this into my deployment process.
I'd like to use fabric to execute the manage.py file on the remote server but I'm not sure what to use for the repository value in this file. Referring to both 'appname/migrations' and '/usr/local/pylons/appname/env/lib/python2.6/site-packages/appname-05.egg/appname/migrations/'
both fail with a migrate.versioning.exceptions.InvalidRepositoryError
Does anyone have a fabfile and manage.py that plays nicely with sqlalchemy-migrate?
What I did was to generate a manage.py file per the sqlalchemy-migrations docs. In there I hacked it up to load our config information which includes the db auth info. In our case it's a Pylons app so it reads the proper Pylons config.ini file.
http://readthedocs.org/docs/sqlalchemy-migrate/en/latest/versioning.html#project-management-script
Then the fabric commands all interact with the manage.py file vs using the Python API directly. Since everything, from the SA-Migrate manage.py through the app itself I don't run into any sort of path issues like you mention.
Not sure this is a 'exact' fix but maybe helps.