I could not connect oracle with cakephp2, After search a few hour i found and followed link step by step still not success, my oracle 11g
error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I found solution with many errors, here what i fixed:
(Note still follow this link)
Error with php version 5.4.+ ,p 5.3.0 (wamp server)
Error with oracle php file file with override function (method not compatible )
Error connect database config
Error SELECT * FROM your table name [don't use select * that will work]
How to fix:
If still php 5.3.0 enable module oci8
Use this oracle file database i have been modified
in Cakephp Config database.php use
public $dboracle = array(
'datasource' => 'Database/Oracle',
'driver' => 'oracle',
'connect' => 'oci_connect',
'persistent' => true,
'host' => "your host database ip",
'login' => 'db user name',
'password' => 'db password',
'database' => '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=you db ip )(PORT=1521))
(CONNECT_DATA=(SID= you sid)))',
'prefix' => '',
'schema' => 'schema_name'
);
First, the ORA error is a permutation of the ORA-12514: TNS listener cannot resolve service name error as shown below. This form of the ORA-12541 error commonly happens when the database or the listener processes are in the middle of a startup, or when the database (mysid in your case) has not been registered with the listener.
root> oerr ora 12514
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Cause:
The listener received a request to establish a connection to a
database or other service.
The connect descriptor received by the listener specified a service
name for a service (usually a database service) that either has not
yet dynamically registered with the listener or has not been
statically configured for the listener.
This may be a temporary condition such as after the listener has
started, but before the database instance has registered with the
listener.
Action:
Wait a moment and try to connect a second time.
Check which services are currently known by the listener by
executing: lsnrctl services
Check that the SERVICE_NAME parameter in the connect descriptor of
the net service name used specifies a service known by the listener.
If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.
Check for an event in the listener.log file.
Related
RealmSwift 2.8.3, Realm Object Server 1.8.1, Xcode 8, Swift 3.1
I can get pretty much everything with the Realm Object Server (ROS) to work with iCloud authentication, but I'm running into an issue when I have a new user authenticate that doesn't yet have an account on my ROS instance.
I'm successfully able to retrieve their iCloud token, but user is nil when I do this:
let credentials = SyncCredentials.cloudKit(token: token)
SyncUser.logIn(with: credentials, server: serverURL) { user, error in
DispatchQueue.main.async{
if user == nil {
//--- Error ---
//This is where I end up. I can see the token in the log but no user object
}else{
//--- Success ---
}
}
}
When I check the error log in my ROS (running on Ubuntu), I get this internal server error (500):
2017-07-12T00:39:39.170Z - warn: auth.cloudkit: Handle request failed with: Error: Request failed with code AUTHENTICATION_FAILED: Authentication failed.
2017-07-12T00:39:39.174Z - warn: [services] internal error: Error: Request failed with code AUTHENTICATION_FAILED: Authentication failed.
at request.catch.err (/usr/lib/nodejs/realm-object-server-developer/.build/src/node/managers/auth/provider/cloudkit.js:131:23)
at process._tickCallback (internal/process/next_tick.js:109:7).
Now just to make sure, I assume that SyncCredentials.cloudKit(token: token) creates a user if that token isn't found on my server and returns a new user object. I don't see anything in the docs about creating a new user vs. authenticating an existing one.
UPDATE
I double-checked all my connections to iCloud, made sure my key_id found in my configuration.yml file is right and that my key matches what I have in my iCloud container.
Now I get a different error. :)
2017-07-12T01:12:54.801Z - warn: auth.cloudkit: Handle request failed with: TypeError: Cannot read property 'reason' of undefined
2017-07-12T01:12:54.809Z - warn: [services] internal error: TypeError: Cannot read property 'reason' of undefined
at signedRequest.then.catch.err (/usr/lib/nodejs/realm-object-server-developer/.build/src/node/managers/auth/provider/cloudkit.js:86:11)
at process._tickCallback (internal/process/next_tick.js:109:7).
According to the docs, account should be created if not existed before
If the credentials are valid, the user is granted access to Realm
Object Server. A new user account is created if the credentials are
not coupled to an existing account.
I guess it's problem with private_key_path in configuration.yml. Try to move .pem file to another location and see if there are any changes.
Also, remember to restart the server after changing the configuration file.
I am facing issue with APNS php code for push notification on IOS devices, I have two separate connection for Development and Production.
I have configure the development connection on my server by adding the .pem file certificate and Passphares its working perfect and I received the notification also. Have a look my development configuration:
Url: 'ssl://gateway.sandbox.push.apple.com:2195'
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
'APNS_Dev_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('1234567');
$push->setRootCertificationAuthority('APNS_Dev_ISAS.pem');
$push->connect();
Issue:
Than I configured the connection for Production by adding following parameters but I getting the connection error:
Url: ssl://gateway.push.apple.com:2195
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION,
'APNS_PROD_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('12345678');
$push->setRootCertificationAuthority('APNS_PROD_ISAS.pem');
$push->connect();
Error of connection:
INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
INFO: Retry to connect (1/3)...INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
INFO: Retry to connect (2/3)...
INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
INFO: Retry to connect (3/3)...
INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
I google the issue and I found the some solutions and I have check all and everything is fine but no success.
I have used the correct path for development and production.
I have created the separate certificate .pem files for both and tested the certificate on pusher app. Certificate are correct.
Port is also fine and no blocking from my server because same port is used in development url and development server push notification working fine.
Any help will be appreciated really. Thanks in advance.
Certificate (.pem) having issue that I was created for push notification.
Solution:
After few days trying on same issue I found that create certificate with mini character passpharess may be 1234, It will work perfect for you and make successful connection to IOS push notification server.
May be this will help someone else.
Thanks.
I was getting same problem when I execute my PHP script. After some research, I commented these three key-pair values 'cafile', 'CN_match' and 'ciphers'.
Then its started working properly. I hope this reply become useful to any other person as well.
$contextOptions = array(
'ssl' => array(
'verify_peer' => false, // You could skip all of the trouble by changing this to false, but it's WAY uncool for security reasons.
// 'cafile' => 'NiteVisionWebPushFile.pem',
// 'CN_match' => 'gateway.push.apple.com', // Change this to your certificates Common Name (or just comment this line out if not needed)
// 'ciphers' => 'HIGH:!SSLv2:!SSLv3',
'disable_compression' => true,
));
I'm currently working on a website developed with Symfony2 and I need to send messages in an Amazon SQS. In order to do that I added to my composer.json:
"aws/aws-sdk-php": "2.4.*"
Then when I try to create a queue or list queues I've got a 403 error saying:
Access to the resource https://sqs.us-west-2.amazonaws.com/ is denied.
EDIT:
added the full error message
AWS Error Code: AccessDenied, Status Code: 403, AWS Request ID:
2fe34c11-7af8-5445-a768-070159a0953e, AWS Error Type: client, AWS
Error Message: Access to the resource
https://sqs.us-west-2.amazonaws.com/ is denied., User-Agent:
aws-sdk-php2/2.4.11 Guzzle/3.7.4 curl/7.25.0 PHP/5.4.3
Here is a sample code of what I do:
$aws = Aws::factory(array(
'key' => 'my-key',
'secret' => 'my-secret',
'region' => 'us-west-2'
));
$sqs = $aws->get('sqs');
return new Response(var_dump($sqs->listQueues()));
What do I do wrong to get this error ?
After digging I discovered that the account I was using wasn't granted the access to SQS service.
To give a SQS access to an account you have to go to the amazon management console. Then click on IAM. Under this section click on Users and then you can manage permission for each account you created.
Make sure that both the following policies allow access to the SQS queue
Resource (SQS) based policy: The SQS queue should allow your identity to use the queue. You define this using the queue policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-iam.html#scenario-sqs-policy). The default queue policy will allow access only to the owner of the queue (owner of the queue is the identity that created the queue).
Identity based policies: The policy for the identity that is accessing the queue should have permission to invoke operations on the queue.
Make sure that the access is not restricted by either one of them.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-using-identity-based-policies.html
I had the same strange issue, I had everything set up including policies and permission, after a couple of hrs I found out I was getting 403 error because of wrong aws region was configured in my application it was supposed to be ap-south-1 by default it was us-east-1
uploaded an existing drupal codebase to a virtual host set up on AWS. it is showing "can not connect to database"
I created database "dbname" and can connect fine through ssh. But can not get settings.php to connect. As far as I can tell the mysql user has all needed permissions to access the db remotely.
what I have
$db_url = 'mysql://username:password#us-west-rds.amazonaws.com/dbname';
Here is example of settings.php with a drupal 7 site of ours that connects fine
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'dbname',
'username' => 'dbuser',
'password' => 'password',
'host' => 'us-west-rds.amazonaws.com',
'port' => '3306',
'driver' => 'mysql',
'prefix' => '',
),
),
);
There are several things to check:
do you have the security group open to allow access from your server (as said by Bob Kinney in the other answer)?
do you have a firewall set up on your server that prevents connecting to your RDS instance?
does your user have sufficient rights to connect to your database?
The easiest way to debug this is to use the console mysql command and try to connect to your instance from there:
mysql dbname -u username -p password -h db01b2.ck1dmcn6kfws.us-west-1.rds.amazonaws.com
If this does not work, check the points given above. If this works and does not work in Drupal only, check your PHP code and/or Drupal config.
Sounds like you may not have set up your security groups to allow access from your EC2 instances. You'll want to make sure your DB security group has an ingress rule to allow traffic from your EC2 instance/security group.
How do I control network access to my DB Instance(s)?
You're pointing at the wrong hostname.
'host' => 'us-west-rds.amazonaws.com'
Each individual database instance will have it's own hostname. You can look it up in the AWS Console. The one you're currently pointing to looks like you intended to point to the RDS web service API endpoint.
You might also want to check...
setsebool httpd_can_network_connect_db on
I'm having issue when I run my website on the Reverse Proxy layer. It will display the following javascript error.
=> Message: 'Sys.WebForms.PageRequestManager' is null or not an object
=> Message: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.
Parameter name: instance
=> Message: 'Telerik' is undefined
They are all pointing to the "ScriptResource.axd" file and default file (frontend and backend).
When I run the website on the application layer (direct access without using the proxy), there is no error as shown above.
Is there any configuration need to enable reverse proxy server(ARR) to work?
Using Sitefinity 3.6 and IIS7
Thanks
Under caching in the server farm, select "Include query string" in the query string support drop down list.