No connector for [] rabbitmq queue - laravel-5.7

I try run a queue in Rabbitmq.But it gives me No connectors Found[] error. How to resolve this?
I installed driver using composer require vladimir-yuldashev/laravel-queue-rabbitmq
I have this in my .env file
QUEUE_DRIVER=rabbitmq
RABBITMQ_QUEUE=emails
RABBITMQ_HOST=127.0.0.1
RABBITMQ_PORT=5672
RABBITMQ_VHOST=/
RABBITMQ_LOGIN=guest
RABBITMQ_PASSWORD=guest

I found it.
Problem is in .env file
add QUEUE_CONNECTION=rabbitmq
and in queue.php make 'default' => env('QUEUE_CONNECTION', 'rabbitmq'),

Related

How do I access a Sqlite3 database from an Electron AppImage .mount point?

OS: Linux 5.9.16-1-MANJARO
Electron version: 10.1.5
BetterSqlite version: 7.1.2
I am currently writing an application using Electron and BetterSqlite.
I build the AppImage like this:
npm run build && electron-builder build
This is how I access the database from my code:
db = new Database(
path.join(__dirname, `/${dbName}`).replace("/app.asar", "")
);
I have added the database file to use using:
"extraResources": [
"public/build/Database.db"
],
But when I open the AppImage i get the following error message:
SqliteError: attempt to write a readonly database
The database seems to be inaccessible due to the /tmp/.mountxxx point being readonly.
This behavior does not occur when I open the application in the development folder since it's not a readonly directory.
Is there a way to use the database from the /tmp/.mountxxx directory?
How would I got about accessing the database another way?
Thank you in advance.
I have searched for a way to use the AppImage mount point to read and write but I have not found anything. I will be using the user's home directory to store the database
As the error says when an AppImage is executed the AppDir is mounted as RO filesystem.
To workaround this you need to copy the database file into the user home using an startup script. By example you can copy it to "$HOME/.cache/com.myapp/appdata.db" then use this new copy.

Deploy on Meteor galaxy server with bitbucket and deployment token as variable

Hello I want to use the automatic deploymen on bitbucket to the galaxy server with a deployment token.
For this reason I am creating a deployment token that is comitted in the repository.
https://galaxy-guide.meteor.com/deploy-guide.html#deployment-token
To strenghten the security I would like to use Repository variables in bitbucket pipelines:
https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html
And to store the deployment token of meteor in the variables instead in file.
For the deployment we use in the command:
METEOR_SESSION_FILE=deployment_token.json
And my question is - Is there any way so that I use some variable(string) where the token is used like
METEOR_SESSION_DEPLOYMENT_TOKEN=$METEOR_TOKEN
instead to call it from a file?
Some research, after having the same problem, brought me to this article, which simply solves the problem that you can't feed meteor just the json in an env var in the following simple way:
By adding the json file content as an env var and then echoes it out into a file on deploy.
echo $METEOR_TOKEN_FILE > deploy_token.json
METEOR_SESSION_FILE=deploy_token.json
Thanks to this article I figured it out.
Save json settings as env variable and then in deployment procesS:
echo $DEPLOY_SESSION_FILE > deployment_token.json
METEOR_SESSION_FILE=deployment_token.json DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy --allow-superuser myApp-staging.meteorapp.com --settings config/staging/settings.json --owner username

Open files in PHPStorm with Vagrant+Symfony application

I know you can open files from Symfony profiler or exception file links using this in project/app/config.yml :
framework:
ide: "phpstorm://open?file=%%f&line=%%l"
More info: http://developer.happyr.com/open-files-in-phpstorm-from-you-symfony-application
However as I'm using vagrant, the file path of the server doesn't match my host.
I have created a PHP web application server in PHPStorm with the propper path mappings, but still doesn't work.
Any ideas?
Thanks
When running your app in a container or in a virtual machine, you can tell Symfony to map files from the guest to the host by changing their prefix. This map should be specified at the end of the URL template, using & and > as guest-to-host separators:
// /path/to/guest/.../file will be opened
// as /path/to/host/.../file on the host
// as /path/to/host/.../file on the host
'phpstorm://%f:%l&/path/to/guest/>/path/to/host/&/foo/>/bar/&...'
Symfony FrameworkBundle Configuration - IDE
The answer given by Jeffry no longer works unfortunately :(. When In configure that with my paths the profiler throws:
ParameterNotFoundException
You have requested a non-existent parameter "f:".
I have configured the path according to this line in the SF docs: This map should be specified at the end of the URL template, which results in this:
phpstorm://open?url=file://%%f&line=%%l&/path/to/guest/>/path/to/host/
However, it does open PHPStorm, but phpstorm does not open the file, so i'm a bit stuck here now.
This solves the issue with the file not opening in PhpStorm from a Vagrant:
phpstorm://open?file=%%f&line=%%l&/path/to/guest/>/path/to/host/
Source: https://youtrack.jetbrains.com/issue/IDEA-65879

JHipster prod profile Grunt build error on Eclipse

I'm doing an app with JHipster 1.4.0 using Eclipse.
In dev profile, no problem, but when i switched to prod profile, there's an error in build :
Description : Plugin execution not covered by lifecycle configuration: com.github.trecloux:yeoman-maven-plugin:0.2:build (execution: run-grunt, phase: generate-resources)
Resource : pom.xml
Path : /myapp
Location : line 444
Type : Maven Project Build Lifecycle Mapping Problem
I'm new to Eclipse and i didn't find a solution on forums. If someone can help...
Thanks !
I just had a same issue, and this was because I had another process using the same port number as Grunt (port 9001).
Can you check your Grunt error message? I had:
Running "connect:test" (connect) task
Fatal error: Port 9001 is already in use by another process.

Symfony 2 pdo exception

I'm using Symfony 2 and have this row in my parameters.ini:
database_driver = pdo_pgsql
When I was creating database structure with Doctrine everything was good. But if I want to add some doctrine object to my darabase (insert row), I catch an exception:
What I have to do with this?
Are you sure you're using pdo_pgsql? Are you running on localhost? It might be very certain that you are using pdo_mysql driver instead.
However you have to check the following:
php.ini
extension=pdo.so
extension=pdo_mysql.so
or in your case
extension=pdo.so
extension=pdo_pgsql.so
You can check the phpinfo(); to find out the configured database driver.
In your symfony project you have to check the parameters.ini file in config folder. E.g.
[parameters]
database_driver="pdo_mysql"
database_host="localhost"
Besides try to avoid this error
'stty' is not recognized as an internal or external command,
operable program or batch file.
https://github.com/symfony/symfony/issues/4974
First of all, verify your php.ini file: the extensions php_pdo_pgsql and php_pdo must be enabled. Make sure you apply this changes on php.ini file that your symfony project is using, check this on localhost/path_to_your_project/web/config.php. You know if this extensions are enabled executing the function phpinfo().
This command is also helpfull: php -m. It lists on console all the php modules that are loaded.
Tip: check out you Apache error log, there could be something wrong with the load of your extensions. This file is located according to your server configuration.

Resources