I am trying to use Symfony 3.0 With a PostreSQL Database.
Parameters.yml:
parameters:
database_driver: pdo_pgsql
database_host: 127.0.0.1
database_port: 5432
database_name: dmfa
database_user: username
database_password: password
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: a28a9e1bfefb5aa6f7f3be73a9a62c01eedf55ab
I run the following code to try and generate and entity:
php ./bin/console doctrine:generate:entity
Despite changing my drive to pdo_pgsql i get the following errors:
[Doctrine\DBAL\Exception\DriverException]
An exception occured in driver: SQLSTATE[HY000] [2006] MySQL server has gone away
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2006] MySQL server has gone away
[PDOException]
SQLSTATE[HY000] [2006] MySQL server has gone away
[PDOException]
PDO::__construct(): MySQL server has gone away
It feels like i am missing a step because Symfony is still looking for a mysql database. Please give me some insight on how to correct this error.
Double check that in your app/config/config.yml you have:
doctrine:
dbal:
driver: "%database_driver%"
Related
I installed Odoo 14 Community on AWS EC2 using a docker-compose file:
version: '3.1'
services:
web:
image: odoo:14.0
depends_on:
- db
ports:
- "8069:8069"
db:
image: postgres:13
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
When I connect to this instance I get an error in the browser:
This site can’t provide a secure connection
sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
And in the terminal I can see the error in the log:
INFO ? odoo.service.server: HTTP service (werkzeug) running on
d2611a313581:8069 web_1 | 2022-03-11 15:12:40,859 1 ERROR ? werkzeug:
156.210.29.121 - - [11/Mar/2022 15:12:40] code 400, message Bad request version ('>Ë»æúº\x95¼\x83\x9d\x90\x0fÎönh\x05¥R\x01ÎãüZX¥Ê') -
The security group is configured to accept connections:
I used to make the exact same configuration and it worked before.
Well, I figured it out.
The browser adds https:// automatically before the IP - while it should be http:// because I didn't use any security with the built-in Odoo webserver.
Just removed the letter s and it worked.
I have changed the Django Settings file database engine to postgres_psycopg2.
When I run ./manage.py run server I get the following error numerous times:
"[03/Apr/2019 18:40:09] code 400, message Bad request version
('error",
"name":"DatabaseError",
"code":"ECONNREFUSED",
"property":null,
"redirect":null,
"errno":"ECONNREFUSED",
"syscall":"connect",
"address":"127.0.0.1",
"port":3306,"fatal":true}}'
)
For some reason it is trying to connect to port 3306, which is the Mariadb port and not port 5432, which is the port for Postgresql.
I just upgraded my Mariadb to version 10.3.14 but the problem still exists. My Postgresql is version 11.2.
I have been Googling for several days now and still have not found a solution.
EDIT: I changed the "./manage.py runserver 192.168.1.109:8000/admin" and the error went away. In my /etc/mysql/my.cnf file it had the bind_address set to the above ip address. I comment out that statement and now all is cool.
I tried to configure a Oracle connection but I could not make it works.
I found information in WSO website how configure Oracle connection from previous WSO Server (Data analytics Server)
https://docs.wso2.com/display/DAS3xx/Setting+up+Oracle#SettingupOracle-SettinguptheJDBCdriver
But i didn't found for Stream Processor. I only found who can connect to Mysql DB . https://docs.wso2.com/display/SP410/Integrating+Datastores I tried that with Mysql DB and works .
But i tried to use both information to try to configure Oracle db .
1) I download ojdbc jar Drivers https://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html
2) Copied to /lib all jar files .
3) Tried to configure /conf/editor/deployment.yaml
wso2.datasources: dataSources:
name: Test_DB
description: The Oracle datasource
definition:
type: RDBMS
configuration:
jdbcUrl: 'jdbc:oracle:thin:#server_name:1521/instance_name'
username: user
password: password
driverClassName: oracle.jdbc.driver.OracleDriver
maxPoolSize: 50
idleTimeout: 60000
connectionTestQuery: SELECT 1
validationTimeout: 30000
isAutoCommit: false
When start the editor.sh show the Connection error.
[XXXX-XX-XX XX:XX:XXX] ERROR
{org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager}
- Runtime Exception occurred while calling onAllRequiredCapabilitiesAvailable of component
carbon-datasource-service java.lang.RuntimeException: Unable to get
driver instance for
jdbcUrl=jdbc:oracle:thin:#server_name:1521/instance_name
at com.zaxxer.hikari.util.DriverDataSource.(DriverDataSource.java:88)
at com.zaxxer.hikari.pool.PoolElf.initializeDataSource(PoolElf.java:157)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:113)
at com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:73)
at org.wso2.carbon.datasource.rdbms.hikari.HikariRDBMSDataSource.getDataSource(HikariRDBMSDataSource.java:56)
at org.wso2.carbon.datasource.rdbms.hikari.HikariDataSourceReader.createDataSource(HikariDataSourceReader.java:74)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildDataSourceObject(DataSourceBuilder.java:79)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildDataSourceObject(DataSourceBuilder.java:60)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildCarbonDataSource(DataSourceBuilder.java:44)
at org.wso2.carbon.datasource.core.DataSourceManager.initDataSources(DataSourceManager.java:153)
at org.wso2.carbon.datasource.core.internal.DataSourceListenerComponent.onAllRequiredCapabilitiesAvailable(DataSourceListenerComponent.java:125)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$7(StartupComponentManager.java:266)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:252)
at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505) Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
at com.zaxxer.hikari.util.DriverDataSource.(DriverDataSource.java:81)
The server works correctly I have remote and local connection.
Someone knows how I can configure it.
Thanks !
Could you check the following configuration for the Oracle database?
name: WSO2_TEST_DB
description: The datasource used for dashboard feature
jndiConfig:
name: jdbc/WSO2_TEST_DB
useJndiReference: true
definition:
type: RDBMS
configuration:
jdbcUrl: 'jdbc:oracle:thin:#localhost:1521:XE'
username: WSO2_TEST_DB
password: root
driverClassName: oracle.jdbc.driver.OracleDriver
maxPoolSize: 50
idleTimeout: 60000
connectionTestQuery: SELECT 1
validationTimeout: 30000
isAutoCommit: false
Important Notes:
There are two ways to set this up. If you have a SID, use this (older) format:
jdbc:oracle:thin:#[HOST][:PORT]:SID
If you have an Oracle service name, use this (newer) format:
jdbc:oracle:thin:#//[HOST][:PORT]/SERVICE
The Oracle driver need to be converted to OSGI(using jartobundle.sh) before put into SP_HOME/lib directory:
e.g.
sh SP_HOME/bin/jartobundle.sh ojdbc6.jar lib/
I am a newbie to chef. I am trying to install chef server on an ec2 centos instance.
I am following this link to install the chef server.
But I am getting error at step 8 of installation.
[root#ip-10-105-203-174 ~]# knife configure -i
/usr/lib/ruby/gems/1.8/gems/ohai-7.0.4/lib/ohai/loader.rb:188: warning: character class has `[' without escape
/usr/lib/ruby/gems/1.8/gems/ohai-7.0.4/lib/ohai/loader.rb:188: warning: regexp has `]' without escape
Overwrite /root/.chef/knife.rb? (Y/N)Y
Please enter the chef server URL: [https://ip-10-105-23-174:443] https://10.105.23.174
Please enter a name for the new user: [root]
Please enter the existing admin name: [admin]
Please enter the location of the existing admin's private key: [/etc/chef-server/admin.pem]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef-server/chef-validator.pem] /root/.chef/chef-server/chef-validator.pem
Please enter the path to a chef repository (or leave blank):
Creating initial API user...
Please enter a password for the new user:
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 1/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 2/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 3/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 4/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 5/5
ERROR: Network Error: Connection refused - Connection refused connecting to https://10.105.23.174/users, giving up
Check your knife configuration and network settings
Is this the right tutorial. Please help me resolving the issue.
You seem to be doing the right thing for chef, but it looks like a fundamental networking issue. If I understand properly, you are logged into the chef server and trying to set up knife on the same box to talk contact itself. Is Chef server actually running? Use 'netstat -an' and verify that something is waiting on the :443 port. Can you use a browser from another host to contact it? You could also consider installing "knife" on another machine and running the same thing.
Are you providing a valid chef-server url. At first look it looks like you are giving the workstation ip address.
I'm using Oracle 11g and Django 1.5.1.
I have installed cx_Oracle, import cx_Oracle works fine.
I setup database settings like this:
DATABASES = {
'default' : {
'ENGINE' : 'django.db.backends.oracle',
'NAME' : 'XE',
'USER' : 'system',
'PASSWORD' : 'mypass',
'HOST' : '127.0.0.1'
'PORT' : '1521'
}
}
When I said
python manage.py syncdb
it said
DatabaseError: ORA-12170: TNS:Connection timeout occurred.
I can connect to database with Navicat.
This error means it was unsuccessful in making a tcp connection to 127.0.0.1 port 1521
As root, or the user running the Oracle database, what address is shown for the LISTENing port in the output of lsof -Pni:1521
If it is not 127.0.0.1:1521 or *:1521, then it won't be listening on 127.0.0.1
However. This is a connection timeout, not something like port unreachable (connection refused)
You didn't say if you were running navicat from the same machine or a different machine. If the above command shows only 127.0.0.1:1521, then it's only listening on that IP address, and would need to be changed to allow connections from other machines, if that is what you are trying to achieve.
Check for firewall rules that may block traffic.
If attempting to connect remotely, doing a network trace can be useful to determine the problem. I recently had an issue similar to this that caused ARP to malfunction. You can see how I diagnosed that particular issue at http://distracted-it.blogspot.co.nz/2014/04/ora-12170-tnsconnect-timeout-resolved.html