Can't Connect with Alfresco repo via aos - alfresco

You are my last hope... I have been looking for answers a long time ago.
I my trying to connect alfresco repo via aos. I push "Map network drive..." and i fill the textFields. The strange part of my story is that I can connect locally but i can't remotely. I have turned off my vm server firewall, just for case, but nothing.
I have edited alfresco-global.propertries, which I have append the following:
###############################
## Common Alfresco Properties #
###############################
dir.root=C:/ALFRES~1/alf_data
alfresco.context=alfresco
alfresco.host=127.0.0.1
alfresco.port=8080
alfresco.protocol=https
share.context=share
share.host=127.0.0.1
share.port=8080
share.protocol=https
### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=root
db.name=alfresco
db.url=jdbc:postgresql://localhost:5432/${db.name}
# Note: your database must also be able to accept at least this many connections. Please see your database documentation for instructions on how to configure this.
db.pool.max=275
db.pool.validate.query=SELECT 1
# The server mode. Set value here
# UNKNOWN | TEST | BACKUP | PRODUCTION
system.serverMode=UNKNOWN
### FTP Server Configuration ###
ftp.port=21
ftp.enabled=true
### RMI registry port for JMX ###
alfresco.rmi.services.port=50500
avm.rmi.service.port=0
avmsync.rmi.service.port=0
attribute.rmi.service.port=0
authentication.rmi.service.port=0
repo.rmi.service.port=0
action.rmi.service.port=0
deployment.rmi.service.port=0
### External executable locations ###
ooo.exe=C:/ALFRES~1/LIBREO~1/App/libreoffice/program/soffice.exe
ooo.enabled=true
ooo.port=8100
img.root=C:\\alfresco-community\\imagemagick
img.coders=${img.root}\\modules\\coders
img.config=${img.root}
img.gslib=${img.root}\\lib
img.exe=${img.root}\\convert.exe
jodconverter.enabled=false
jodconverter.officeHome=C:/ALFRES~1/LIBREO~1/App/libreoffice
jodconverter.portNumbers=8100
### Initial admin password ###
alfresco_user_store.adminpassword=329153f560eb329c0e1deea55e88a1e9
### E-mail site invitation setting ###
notification.email.siteinvite=false
### License location ###
dir.license.external=C:/ALFRES~1
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.host=localhost
solr.port.ssl=8443
##solr.port.ssl=443
### Allow extended ResultSet processing
security.anyDenyDenies=false
### Smart Folders Config Properties ###
smart.folders.enabled=false
### Remote JMX (Default: disabled) ###
alfresco.jmx.connector.enabled=false
### CIFS Server Configuration ###
# The tcpipSMB and netBIOSSMB beans have a platforms property that allow their configuration to be targeted to Alfresco servers running on specific platforms. The property is formatted as a comma-separated list of platform IDs. Valid platform IDs are windows,linux,solaris, macosx and aix.
cifs.platform=linux,solaris,macosx,windows
cifs.enabled= true
cifs.serverName=${localname}
cifs.broadcast=192.168.0.255
#An empty value indicates bind to all available network adapter
cifs.bindto=192.168.0.85
cifs.ipv6.enabled=true
cifs.hostannounce=true
cifs.pseudoFiles.enabled=false
#controls whether URL shortcuts or desktop actions are displayed on CIFS.
cifs.pseudoFiles.explorerURL.enabled=false
#Is the URL shortcut for alfresco explorer shown ?
#cifs.pseudoFiles.explorerURL.fileName=__Alfresco.url
#Name of CIFS URL for alfresco explorer
#cifs.pseudoFiles.shareURL.enabled=false
# Enable the use of asynchronous sockets/NIO code
cifs.disableNIO=false
# Disable the use of JNI code. Only currently affects Windows
cifs.disableNativeCode=false
# Session timeout, in seconds. Defaults to 15 minutes i.e. 900 seconds, to match the default Windows client setting. Maximum is 3600.
# If no I/O is received within that time the session is closed by the server
cifs.sessionTimeout=3600
cifs.WINS.autoDetectEnabled=true
cifs.sessionDebug=false
# Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard ports
cifs.tcpipSMB.port=1445
cifs.netBIOSSMB.sessionPort=1139
cifs.netBIOSSMB.namePort=1137
cifs.netBIOSSMB.datagramPort=1138
### Authentication Chain ###
authentication.chain=ldap1:ldap,alfrescoNtlm1:alfrescoNtlm
ldap.authentication.java.naming.read.timeout=15000
### Sync Settings ###
synchronization.synchronizeChangesOnly=true
synchronization.syncOnStartup=true
synchronization.syncWhenMissingPeopleLogIn=true
synchronization.import.cron=0 0 * * * ?
### SharePoint settings ###
vti.server.port=7070
vti.server.external.host=shp.parkmill.splatcooking.net
vti.server.external.port=443
vti.server.external.protocol=https
vti.alfresco.alfrescoHostWithPort=https://alfresco.parkmill.splatcooking.net:443
vti.share.shareHostWithPort=https://alfresco.parkmill.splatcooking.net:443
vti.share.shareContext=/share
### replication ###
replication.enabled=true
### orphan removal ###
system.content.orphanProtectDays=1
alfresco.authentication.authenticationCIFS=true
Also I can connect via Browser but no hope with network drive mapping. What is causing this problem and how can I fix it?
Thx for your precious time.
I am waiting for your answers

I believe your problem is the alfresco.host setting. You can connect locally, because it's looking at 127.0.0.1 (localhost). Your remote machine is trying to use 127.0.0.1 (which is local to that machine) and failing.
To fix this, update the alfresco.host and share.host properties to the IP or DNS name for the server on which Alfresco is installed.

Related

ODBC Data source name not found, and no default driver specified

(Environment is Linux CentOs7)
I'm fiddling with odbc.ini file and testing the connection each time I make a change:
isql -v gdHive
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
Within odbc.ini file I've been trying different variations of the description name value pair. This originally was set to:
# Description: DSN Description.
Description=Hortonworks Hive ODBC Driver (64-bit) DSN
I tried changing this to
Description=gdHive
This did not change anything wrt the error I pasted above.
Here's the whole config, it's my first time setting this up so I'm not sure what I've missed:
# HS2 service discovery with ZooKeeper (ServiceDiscoveryMode=1).
ZKNamespace=/hive/hiveserver2
# Set to 1 if you are connecting to Hive Server 1. Set to 2 if you are connecting to Hive Server 2.
HiveServerType=2
# The authentication mechanism to use for the connection.
# Set to 0 for No Authentication
# Set to 1 for Kerberos
# Set to 2 for User Name
# Set to 3 for User Name and Password
# Note only No Authentication is supported when connecting to Hive Server 1.
AuthMech=1
# The Thrift transport to use for the connection.
# Set to 0 for Binary
# Set to 1 for SASL
# Set to 2 for HTTP
# Note for Hive Server 1 only Binary can be used.
ThriftTransport=1
# When this option is enabled (1), the driver does not transform the queries emitted by an
# application, so the native query is used.
# When this option is disabled (0), the driver transforms the queries emitted by an application and
# converts them into an equivalent from in HiveQL.
UseNativeQuery=0
# Set the UID with the user name to use to access Hive when using AuthMech 2 to 8.
UID=
# The following is settings used when using Kerberos authentication (AuthMech 1 and 10)
# The fully qualified host name part of the of the Hive Server 2 Kerberos service principal.
# For example if the service principal name of you Hive Server 2 is:
# hive/myhs2.mydomain.com#EXAMPLE.COM
# Then set KrbHostFQDN to myhs2.mydomain.com
KrbHostFQDN=hive.hadoop.p3.int.example.com
# The service name part of the of the Hive Server 2 Kerberos service principal.
# For example if the service principal name of you Hive Server 2 is:
# hive/myhs2.mydomain.com#EXAMPLE.COM
# Then set KrbServiceName to hive
KrbServiceName=hive
# The realm part of the of the Hive Server 2 Kerberos service principal.
# For example if the service principal name of you Hive Server 2 is:
# hive/myhs2.mydomain.com#EXAMPLE.COM
# Then set KrbRealm to EXAMPLE.COM
KrbRealm=HADOOP.PROD.INT.EXAMPLE.COM
# Set to 1 to enable SSL. Set to 0 to disable.
SSL=0
# Set to 1 to enable two-way SSL. Set to 0 to disable. You must enable SSL in order to
# use two-way SSL.
TwoWaySSL=0
# The file containing the client certificate in PEM format. This is required when using two-way SSL.
ClientCert=
# The client private key. This is used for two-way SSL authentication.
ClientPrivateKey=
# The password for the client private key. Password is only required for password protected
# client private key.
ClientPrivateKeyPassword=
The error message only says "Data source name not found, and no default driver specified". I'm not sure how to set this data source name or choose default driver?
The "Description" keyword's value is entirely cosmetic in an ODBC DSN. It has no functional use. You can set it to any arbitrary string.
ODBC will be very hard to learn by trial-and-error shots in the dark. I suggest you take a look at the official ODBC specification. You might also look at some docs for the Driver Manager in your environment, such as this for iODBC, or this for unixODBC.

How to find datapower box name ? Is there any service/global variable that holds it?

If there are few data power boxes (say 5) and we have logging common logging machanism where all the errors is logged in same place. While logging errors we need to log errors along with datapower box name (say xi52xxxx) so that it will be easy to identify in which box we have errors/which box is behaving abnormally.
--- NEW ---
I realize var://service/system/ident or serviceVars.systemIdent nodeset which contains e.g. configured system "name" is what you look for (https://www.ibm.com/support/knowledgecenter/en/SS9H2Y_7.7.0/com.ibm.dp.doc/var-service-system-ident_reference.html).
--- NEW ---
--- OLD ---
I've been thinking var://service/system/status could have been your friend, but playing with it e.g. as per https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/var_service_system_status_xsl51 I realize DP doesn't expose the "show system" status provider through SOMA (XML Mgmt / REST Mgmt) (as in contrast to e.g. DateTimeStatus or FirmwareStatus), but only wraps the SystemSettings config/modify options in CLI and GUI.
--- OLD ---
However is this really needed to be set in each custom log message?
I'm thinking most of your log traffic will be sent using a DP log target of type syslog if you send to Splunk, right? Note that for each such log target you typically set the Local Identifier which determines what identifier the sending system uses.
So the question is do you want to set the identifier statically or dynamically (while operating one permanent set of configuration). I think it is static, so you set it in the log target, which is a DP config object. These get configured on e.g. config import, and so are ideally adjusted using e.g. Deployment Policies.
I hope this helps a bit.

Does Spring MVC/Rest have its own default connection pooling?

I have developed a Spring Rest Application. I have not added code for any specific connection pooling. I was considering HikariCP, boneCP or cp30.
Someone told me that Spring MVC/Rest has its own internal connection pooling so even if I don't implement any of my own, there would not be any issues.
I tried finding on the internet but has some doubt. Please clarify.
No , Spring has not default connection pooling , It use web server [Tomcat] thread request handling , and heavily using Threadlocal but for database operation you can use any of them as your wish , spring boot using common pooling as default but adding other configurations override the others .
Tomcat in spring boot:
server.tomcat.accept-count= # Maximum queue length for incoming connection requests when all possible request processing threads are in use.
server.tomcat.accesslog.buffered=true # Buffer output such that it is only flushed periodically.
server.tomcat.accesslog.directory=logs # Directory in which log files are created. Can be relative to the tomcat base dir or absolute.
server.tomcat.accesslog.enabled=false # Enable access log.
server.tomcat.accesslog.file-date-format=.yyyy-MM-dd # Date format to place in log file name.
server.tomcat.accesslog.pattern=common # Format pattern for access logs.
server.tomcat.accesslog.prefix=access_log # Log file name prefix.
server.tomcat.accesslog.rename-on-rotate=false # Defer inclusion of the date stamp in the file name until rotate time.
server.tomcat.accesslog.request-attributes-enabled=false # Set request attributes for IP address, Hostname, protocol and port used for the request.
server.tomcat.accesslog.rotate=true # Enable access log rotation.
server.tomcat.accesslog.suffix=.log # Log file name suffix.
server.tomcat.additional-tld-skip-patterns= # Comma-separated list of additional patterns that match jars to ignore for TLD scanning.
server.tomcat.background-processor-delay=30 # Delay in seconds between the invocation of backgroundProcess methods.
server.tomcat.basedir= # Tomcat base directory. If not specified a temporary directory will be used.
server.tomcat.internal-proxies=10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
192\\.168\\.\\d{1,3}\\.\\d{1,3}|\\
169\\.254\\.\\d{1,3}\\.\\d{1,3}|\\
127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\
172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\
172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3} # regular expression matching trusted IP addresses.
server.tomcat.max-connections= # Maximum number of connections that the server will accept and process at any given time.
server.tomcat.max-http-post-size=0 # Maximum size in bytes of the HTTP post content.
server.tomcat.max-threads=0 # Maximum amount of worker threads.
server.tomcat.min-spare-threads=0 # Minimum amount of worker threads.
server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value.
server.tomcat.protocol-header= # Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
server.tomcat.protocol-header-https-value=https # Value of the protocol header that indicates that the incoming request uses SSL.
server.tomcat.redirect-context-root= # Whether requests to the context root should be redirected by appending a / to the path.
for Data Source :
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.continue-on-error=false # Do not stop if an error occurs while initializing the database.
spring.datasource.data= # Data (DML) script resource references.
spring.datasource.data-username= # User of the database to execute DML scripts (if different).
spring.datasource.data-password= # Password of the database to execute DML scripts (if different).
spring.datasource.dbcp2.*= # Commons DBCP2 specific settings
spring.datasource.driver-class-name= # Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
spring.datasource.generate-unique-name=false # Generate a random datasource name.
spring.datasource.hikari.*= # Hikari specific settings
spring.datasource.initialize=true # Populate the database using 'data.sql'.
spring.datasource.jmx-enabled=false # Enable JMX support (if provided by the underlying pool).
spring.datasource.jndi-name= # JNDI location of the datasource. Class, url, username & password are ignored when set.
spring.datasource.name=testdb # Name of the datasource.
spring.datasource.password= # Login password of the database.
spring.datasource.platform=all # Platform to use in the schema resource (schema-${platform}.sql).
spring.datasource.schema= # Schema (DDL) script resource references.
spring.datasource.schema-username= # User of the database to execute DDL scripts (if different).
spring.datasource.schema-password= # Password of the database to execute DDL scripts (if different).
spring.datasource.separator=; # Statement separator in SQL initialization scripts.
spring.datasource.sql-script-encoding= # SQL scripts encoding.
spring.datasource.tomcat.*= # Tomcat datasource specific settings
spring.datasource.type= # Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath.
spring.datasource.url= # JDBC url of the database.
spring.datasource.username= # Login user of the database.
spring.datasource.xa.data-source-class-name= # XA datasource fully qualified name.
spring.datasource.xa.properties= # Properties to pass to the XA data source.

boxfuse dev db not provisioned correctly

I'm just starting with boxfuse and can't seem to find a way to get my dev database to be provisioned.
In my boxfuse.yml I have (for the database section):
database:
# the name of your JDBC driver
driverClass: com.mysql.jdbc.Driver
# the username
user: root
# the password
password: <password>
# the JDBC URL
url: jdbc:mysql://10.0.0.84:3306/dmsdb
# any properties specific to your JDBC driver:
properties:
charSet: UTF-8
hibernate.dialect: org.hibernate.dialect.MySQLInnoDBDialect
# the maximum amount of time to wait on an empty pool before throwing an exception
maxWaitForConnection: 1s
# the SQL query to run when validating a connection's liveness
validationQuery: "/* MyApplication Health Check */ SELECT 1"
# the minimum number of connections to keep open
minSize: 8
# the maximum number of connections to keep open
maxSize: 32
# whether or not idle connections should be validated
checkConnectionWhileIdle: false
If I try running it (boxfuse run), my application doesn't work at all.
boxfuse info produces the following:
oxfuse client v.1.18.7.938
Copyright 2016 Boxfuse GmbH. All rights reserved.
Account: mlr11 (mlr11)
Info about mlr11/dms-service in the dev environment:
App Type : Single Instance with Zero Downtime updates
App URL : http://127.0.0.1:8082
DB Type : MySQL database
DB URL : jdbc:mysql://localhost:3306/boxfuse-dev-db
DB Host : localhost
DB Port : 3306
DB Database : boxfuse-dev-db
DB User : boxfuse-dev-db
DB Password : boxfuse-dev-db
DB Status : available
Which is very different than what I was expecting. URL, Database, User, Password) are not matching my boxfuse.yml file.
What I am missing. I know it must be something simple. I did all kind of search and read the doc a few times. I can't seem to find what's wrong. Any pointers will be appreciated.
From the config file you posted I am assuming this is a dropwizard app.
Since your Boxfuse app was configured to use a MySQL database, Boxfuse automatically provisions a database in each environment when you first deploy your application there. In your case you can see the connection info for that database in the dev environment in the output you post in your question.
Boxfuse exposes these values (db url, user, password, ...) as environment variables (https://cloudcaptain.sh/docs/databases#envvars) and automatically configures your framework (Dropwizard I assume) to use those instead of the ones included in your config file. It will do so by passing -Ddw.database.url=$BOXFUSE_DATABASE_URL -Ddw.database.user=$BOXFUSE_DATABASE_USER -Ddw.database.password=$BOXFUSE_DATABASE_PASSWORD as arguments to the JVM.
Also doublecheck in the VirtualBox GUI that your VirtualBox installation is fully functional and able to start VMs and that both the Boxfuse Dev VM and the instance of your application are started properly.

MariaDB: error 1045 when doing GRANT ALL

I'm hoping that someone can help me here. With Centos 7 all the install docs I have found said to use MariaDB instead of mysql which is fine, but I can't seem to enable remote access.I have used the "GRANT ALL ON . to user#'address' IDENTIFIED BY 'your-root-password';" and flushed privileges and restarted the service. I still am not able to connect via remote terminal I get ERROR 1045 (28000): Access denied for user username.
So I found another article that said I should go to my my.cnf file and make sure my bind settings are set correctly and such.
https://mariadb.com/kb/en/mariadb/documentation/getting-started/configuring-mariadb-for-remote-client-access/
Based on what this article shows my my.cnf file is completely different than what it should be. Doesn't contain bind-address or skip-networking or port or anything. It looks like the below.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
I was wondering if anyone else might know what's going on with this. Thanks.
You may want to investigate this link:
http://www.versatilewebsolutions.com/blog/2015/05/dealing-with-mariadb-plugin-unixsocket-is-not-loaded.html
Essentially, MariaDB switched to unix_socket authentication as a default authentication plugin. To get around it, connect to your MariaDB server and execute these queries:
USE mysql;
UPDATE user SET plugin='' WHERE User = 'root';
FLUSH PRIVILEGES;
exit
This will disable socket authentication and switch back to standard authentication. I do not think this is recommended for production.

Resources