AccuRev, command-line, How to specify server address when login? - accurev

I'm using AccuRev5.7 command-line interface.
I know that "acclient.cnf" stores some server list.
How can I choose which server to login when running the "accurev login" command?
Can I pick one of the them, or, specify a new one, by command-line?

To log into another server via the CLI, use the "-H server:port" option for login.
Example:
accurev login -H servername:5050 username password
Working with Multiple Repositories
It’s possible to have multiple AccuRev repositories active in your organization, each managed by its own AccuRev server process. For most accurev CLI commands, you can specify the AccuRev server to target on the command line, using the –H option:
accurev show -H pluto:5050 users
This mechanism bypasses the acclient.cnf file, though the file must still exist.
It does not override a specification in the wspaces file, which is described below.
Setting Up Workspaces on Multiple Repositories
If the workspaces you’ve created on your client machine are not all associated with the same AccuRev server, then you might want to use a wspaces configuration file. This text file records the workspace-toserver association for each of your workspaces. Each user can have a wspaces file. It must be located under
the user’s home directory, within the .accurev subdirectory.
The accurev program uses this file to decide which AccuRev server to use:
• If the current working directory is within one of the workspace-root-directory locations listed in the wspaces file, the CLI command is directed to the associated server listed on the same line of the file.
• Otherwise (including the case in which no wspaces file exists), the CLI command is directed to first server listed in the machine’s acclient.cnf file. This is the default behavior that we’ve mentioned in the sections above.
For example, here is a sample wspaces file recording workspaces associated with servers venus and pluto:
gizmo_dvt_john /usr/john/gizmo_dvt venus 5050
frammis_2.3maint_john /usr/john/frammis_2.3_maint pluto 6678
The format of the file is:
• workspace name, which must not contain SPACE characters
• full pathname of workspace’s root directory, which must match the pathname listed by the accurev show wspaces command, and must not contain SPACE characters. The pathname always uses forward slashes ( / ), not backslashes ( \ ), even on Windows machines.
• server machine name (or IP address) AccuRev® CLI User’s Guide 5
• IP port number on which AccuRev server program listens
The last two fields must exactly match the server and port of an existing entry in the machine’s acclient.cnf file.
Note:
If your site has a single AccuRev server (or if your workspaces are all associated with a single server), there is no need for a wspaces file: the default behavior directs each CLI command to the server listed in your machine’s acclient.cnf file.

Related

cPanel - files are not showing in File Manager after copying via SSH / scp

I have just purchased a dedicated server from a UK hosting company that uses cPanel and I have root access
I am using scp to copy a huge (> 2tb) website from another hosting company (1&1 IONOS using Plesk not that it should make any difference)
The files are copying over .. using SSH I can use the "ls" command to list all the files that I've copied over
However, when I use the File Manager option via cPanel interface, I can see the first folder name on the left hand side (i.e. public_html/my-copied-site) but on the right hand window it shows the directory as empty
If I use the "ls" command, I can see the files & folders
if I try an access any of the files directly via a web browser then I get a 403 Forbidden message
What have I done wrong?
The answer to this problem is the ownership of the folder
Using scp over SSH meant that I was logged in as "root" and therefore the owner of the folders was also "root"
Changing the owner of the folder (using "chown" command) to the account's name resolved the problem
Hope this helps someone out

TYPO3 fileadmin permission denied when created by ftp

is there any possibility to change the permission when a folder in fileadmin is created per ftp and now you cannot copy a file into this folder?
TYPO3 is version 8.7
Greeting
Volker
You will have 3 Options:
Create the folder with a user that is in apache/nginx/php group, respectively dont use the FTP-Root user on creation.
Connect via FTP and fix the permission of the folder.
Connect via SSH and fix the permission in terminal context.
Regards
Ribase
Your problem is not TYPO3 specific. It's an unix problem.
or better: you need to understand rights management on unix systems.
there are three levels: owner, group, everyone
for each level you can define the possible rights (read, write, execute)
in octal notation this matches exact the bits of coding
rwxrwxrwx
||||||+++-- everyone
|||+++----- group
+++-------- owner
Also each file holds an owner and a group.
Folders are a special kind of files which need execution rights to see the content (list of files).
Then there are default bits that are set if a file (or folder) is generated. These bits can be configured with the umask command - or the program you create the file. with TYPO3 you can define it in the install tool.
Maybe your FTP program has similar configuration.
Depending whether your FTP-user and the PHP/Apache-User are identical, share one group or have nothing in common you need to set the bits for each file to grant access each other.
be aware: independent from your BE-user which you use for login in TYPO3 BE, any file action in the BE (or FE) is done with the apache/PHP user, which probably is not your FTP user.
In a shell you have the commands chmod to change the assess bits and chown to change the owner and group of a file. (hint: chgrp will only change the default group assigned to new files)
If you do not have the writing rights for folder and file you can not change any rights of a file. Especially not the right to modify a file (remember: folders are files).
The best option to modify the rights is to use the same user than the file was created (as an owner you have the most rights).
Second best is to be root. Root is allowed to do anything, but therefore you should avoid being root, as you also can destroy anything.

SSH and FTP showing different files

I am using a host to try and deploy my Django site but I am confused by the SSH vs. FTP.
Background info:
I got the IP address, name and password from my host for the VPS.
I logged in using the same information via Putty and via WinSCP.
Both show me as having accessed root#[VPS IP Address].
Running ls on Putty shows nothing (no files or folders). So I created a file hello.txt.
WinSCP shows a lot of folders at the root, unlike Putty. I then searched all the folders for the hello.txt that I created and it's nowhere to be found.
Why would accessing the same VPS via two different methods show completely different things?
If you are indeed sure that you are logged into the same host, with the same user account you should check that you are in the same folder.
Using ssh you can issue the command pwd (print working directory) to view the current the directory you are in.
To change to another directory using the shell, use the cd command, for example:
cd .. # This moves up to the parent directory
cd /var/www/html
The Winscp user interface should also show you in what directory you are currently in.
Navigation to another directory using Winscp should be fairly straightforward.
There's no reason to think these methods will put you in the same directory location at all.
When you SSH in using Putty, you will almost certainly be put in your home directory, and that will be where your hello.txt was created.
But the FTP service has presumably been configured to put you in the common area where your service's files are located, which is not under your home directory. Where it is will be specific to the configuration of that machine.
Using SSH you will probably be able to use cd to change directory to the FTP location, if you can find out what it is; however, the reverse is not true and you almost certainly won't be able to navigate to the home directory via FTP.
(Note, this is not a question about Django, and should probably have been asked on ServerFault.)

Accurev plugin with visual studio 2012

Every time I log into the Accurev plugin in visual studio 2012 I have to re enter the server information. Has anyone else run into this issue?
What version of Windows are you running and what are the User Access Controls (UAC) settings for the system? Higher UAC settings will block writing to files located within the "Program Files (x86)" directory, which is where AccuRev is installed and maintains the "acclient.cnf" file. This is the file that lists which servers are available for you to login. Open this file with a text editor, add the server you login to by adding a line like the following:
SERVERS = myserver:5050
Please notice the spaces before and after the equals sign is intentional and needed. Your server name can use either the short name of the fully qualified domain name. The number after the colon is port number that AccuRev uses for establishing connections.
This file is located in the "AccuRev\bin" directory.

Is it possible to run more than one rabbitmq instance on one machine?

I want to build a RabbitMQ cluster in my dev machine (windows).
reason is that I would like to test and study it.
Is it possible to run more than one rabbitmq instance on one machine?
I am guessing I need to:
Change the listening port
Change the appdata folder (C:\Users\MyUser\AppData\Roaming)
Change the ui plugin port so I can view all instances.
Remove the service and run from cli
Has anyone tried it?
Is there a known guide?
This thread appears to detail what you need. From the thread responses (scroll down):
The following settings are necessary to separate the node runtimes
completely, while allowing them to share the installed code base.
RABBITMQ_CONFIG_FILE /etc/rabbitmq/rabbitmq
RABBITMQ_MNESIA_BASE /var/lib/rabbitmq/mnesia
RABBITMQ_LOG_BASE /var/log/rabbitmq
RABBITMQ_ENABLED_PLUGINS_FILE /etc/rabbitmq/enabled_plugins
Now the official RabbitMQ documentation contains a section "A Cluster on a Single Machine", which describes how to run multiple Rabbit nodes on a single machine.
See https://www.rabbitmq.com/clustering.html#single-machine
One approach that I took when testing out clustering on my dev machine was to fire up several VMs. I had several for Rabbit and one for HAProxy.
While you can, as per one of the other answers, run multiple instances on a single OS instance, the multiple VM approach allowed me to mimic the intended production environment more closely.
NB. I have chosen to interpret your 'one machine' as meaning a physical machine for the purpose of this answer. If your meaning was 'virtual' then I defer to the other answer posted against this question which details how to accomplish this.
You can run multiple RabbitMQ instances on 1 machine without clustering. You just need to change the ports and the node name in rabbitmq-defaults, rabbitmq-env and config files.
For Linux:
Make sure you have Erlang installed, then download the latest version for Generic Unix and extract it.
Go to rabbit installation folder(the folder you just extracted)/sbin -> open the rabbitmq-defaults file and change SYS_PREFIX=${RABBITMQ_HOME} to create the default folder somewhere else, you should set the path to the extracted folder, for ex. /home/YOUR-USERNAME/rabbit_server-msg(this is my extracted folder).
Change the node name. Open the rabbitmq-env file -> find NODENAME=rabbit#${HOSTNAME} and change the name rabbit (ex. rabbitMSG#${HOSTNAME}). In the same file locate and change DEFAULT_NODE_PORT, by default it’s set to 5672. The default clustering port is set by ${DEFAULT_NODE_PORT} + 20000. So if you set the default node port to 5673, the clustering port will be 25673.
Install the Management Plugin. Navigate to rabbitmq-server/sbin and run “./rabbitmq-plugins enable rabbitmq_management”
The AMQP and HTTP ports need to be chnaged in the config file. Copy the file rabbitmq.config.example and paste it in the rabbit_server-msg(again this is my extracted forlder)/etc(this is the default folder created by RabbitMQ from step 1)/rabbitmq folder, rename the file to just rabbitmq.config. If you can’t find the file rabbitmq.config.example in the rabbit folder create a file named rabbitmq.config and copy the code from their GitHub.
Open the config file and uncomment the following lines:
– {tcp_listeners, [5672]} and change the port number (It is recommended to set the same number as the DEFAULT_NODE_PORT in rabbitmq-env for example 5673).
– {listener, [{port, 12345} and change the port number (This is for the management plugin).
NOTE: Be careful with the commas and brackets. Remove the comma after {tcp_listeners, [5672]}. Also after {listener, [{port, 12345} close the brackets like so ]}. Otherwise when you try to run ./rabbitmq-server it will show errors (It will show you on which line in the config file you have an error so you can fix it).
Now start up the server and log in the manager. Check the Listening ports under Ports and contexts to see if you made the changes. Do this for the other servers and you will be able to run as many servers as you want on 1 machine all with different listening ports. To start the RabbitMQ server automatically when you log in use the Startup Application program.
For Windows:
Setting up RabbitMQ for Windows is preatty much the same as on Linux.
Make sure you have Erlang installed, then download the latest version for Windows and extract it.
Go to rabbit(the folder you just extracted)/sbin -> open the rabbitmq-defaults.bat file and change RABBITMQ_BASE to create the default folder somewhere else, you should set the path to the extracted folder, for ex. C:/rabbit_server-msg(this is my extracted folder).
Change the node name. Open the rabbitmq-env.bat file -> find RABBITMQ_NODENAME=rabbit#!HOSTNAME! and change the name rabbit (ex. rabbitMSG#!HOSTNAME!). In the same file locate and change RABBITMQ_NODE_PORT, by default it’s set to 5672. To change the default clustering port locate and change RABBITMQ_DIST_PORT, by default it’s set to 25672.
Install the Management Plugin. Navigate to rabbit-server/sbin and run “rabbitmq-plugins.bat enable rabbitmq_management”.
The AMQP and HTTP ports need to be chnaged in the config file. Create a file named rabbitmq.config and copy the code from their GitHub. Put the file in your installation folder/RabbitMQ (ex. my config is in C:/rabbit_server-msg/RabbitMQ). Also in the rabbitmq-defaults.bat file check CONFIG_FILE it should be set to CONFIG_FILE=!RABBITMQ_BASE!\rabbitmq.
Open the config file and uncomment the following lines:
– {tcp_listeners, [5672]} and change the port number (It is recommended to set the same number as the RABBITMQ_NODE_PORTin rabbitmq-env for example 5673).
– {listener, [{port, 12345} and change the port number (This is for the management plugin).
NOTE: Be careful with the commas and brackets. Remove the comma after {tcp_listeners, [5672]}. Also after {listener, [{port, 12345} close the brackets like so ]}. Otherwise when you try to run rabbitmq-server.bat it will show errors (It will show you on which line in the config file you have an error so you can fix it).
Now start up the server and log in the manager. Check the Listening ports under Ports and contexts to see if you made the changes. Do this for the other servers and you will be able to run as many servers as you want on 1 machine all with different listening ports.
Source: https://lazareski.com/multiple-rabbitmq-instances-on-1-machine/